Created
January 27, 2014 23:13
-
-
Save afrendeiro/8659303 to your computer and use it in GitHub Desktop.
Takes a bed file with gene annotation ("annotationFile.bed") and makes another with TSS annotation ("annotationFile.TSSs.bed")
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 -v OFS='\t' '$6 == "+" {print $1, $2, $2+1, $4, $5, $6}' annotationFile.bed > tmp | |
awk -v OFS='\t' '$6 == "-" {print $1, $3, $3+1, $4, $5, $6}' annotationFile.bed >> tmp | |
bedtools sort -i tmp > annotationFile.TSSs.bed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment