Created
October 23, 2015 12:09
-
-
Save sp00nman/3a78c3297eb0b0fffc55 to your computer and use it in GitHub Desktop.
sort bed file by chromosome; then by position
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
#!/bin/bash | |
BED_FILE=$1 | |
sort -k1,1 -k2,2n $BED_FILE >${BED_FILE}_sorted.bed | |
## format | |
#chr1 12 | |
#chr2 56 | |
#chr10 13 | |
#chr11 9 ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment