Created
May 17, 2014 15:08
-
-
Save ianyfchang/308acd7e9e6f9a9d2dc2 to your computer and use it in GitHub Desktop.
Labeling HMR direction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk -F "\t" –v S=”Sample” -v OFS="\t" '{ | |
if($12=="-" && $25=="-" && $36=="-" && $13==0 && $26==0 && $37==0) print $4,$5,$6,"-",S,$10,$12,$13,$23,$25,$26,$34,$36,$37,$NF; | |
else if($12=="-" && $25=="-" && $13==0 && $26==0 && $37!=0) print $4,$5,$6,"-",S,$10,$12,$13,$23,$25,$26,$34,$36,$37,$NF; | |
else if($12=="-" && $36=="-" && $13==0 && $26!=0 && $37==0) print $4,$5,$6,"-",S,$10,$12,$13,$23,$25,$26,$34,$36,$37,$NF; | |
else if($12=="-" && $13==0 && $26!=0 && $37!=0) print $4,$5,$6,"-",S,$10,$12,$13,$23,$25,$26,$34,$36,$37,$NF; | |
else if( $25=="-" && $36=="-" && $13!=0 && $26==0 && $37==0) print $4,$5,$6,"-",S,$10,$12,$13,$23,$25,$26,$34,$36,$37,$NF; | |
else if( $25=="-" && $13!=0 && $26==0 && $37!=0) print $4,$5,$6,"-",S,$10,$12,$13,$23,$25,$26,$34,$36,$37,$NF; | |
else if( $36=="-" && $13!=0 && $26!=0 && $37==0) print $4,$5,$6,"-",S,$10,$12,$13,$23,$25,$26,$34,$36,$37,$NF; | |
else print $4,$5,$6,"+",S,$10,$12,$13,$23,$25,$26,$34,$36,$37,$NF; | |
}' snippet.hmr.bed.5prime.3prime.cloestKnownGFeneTSS1000 > snippet.hmr.overlap.tss.cpgisland |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment