Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# 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