Skip to content

Instantly share code, notes, and snippets.

@arq5x
Last active October 25, 2016 02:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arq5x/c4839c4f8ccb15ad3d395fa23b5dcff4 to your computer and use it in GitHub Desktop.
Save arq5x/c4839c4f8ccb15ad3d395fa23b5dcff4 to your computer and use it in GitHub Desktop.
# download simple repeats from UCSC and convert to BED
curl -s http://hgdownload.soe.ucsc.edu/goldenPath/hg19/database/simpleRepeat.txt.gz \
| gzcat \
| cut -f 2-5 \
> simrep.hg19.bed
# download microsatellites from UCSC and convert to bed
curl -s http://hgdownload.soe.ucsc.edu/goldenPath/hg19/database/microsat.txt.gz \
| gzcat \
| cut -f 2-5 \
> micsat.hg19.bed
# merge the twain
cat simrep.hg19.bed micsat.hg19.bed \
| sort -k1,1 -k2,2n \
| bedtools merge -i - -c 4 -o collapse \
> simrep.micsat.merge.hg19.bed
# bgzip and tabix
bgzip simrep.micsat.merge.hg19.bed
tabix -p bed simrep.micsat.merge.hg19.bed.gz
#profit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment