This is a test version of Biostars. For the public version, visit https://www.biostars.org.
identify the type of repeat genomic region of a BED file

Hi, I have a BED file containing different human genomic regions. I would like to know if these genomic regions belong to repeat regions, and what type of repeat regions they belong to, such as Microsatellite, Minisatellite, LINES, SINES, etc. Is there a tool that can do the task? Thanks!

genome sequence

1 answer

Get RepeatMasker-masked regions, convert them to BED with BEDOPS convert2bed — or grab UCSC data and permute it into BED — sort your BED file with BEDOPS sort-bed, and then map the IDs of the RepeatMasker regions to your regions with BEDOPS bedmap.

For example, for reference genome hg38:

$ wget -qO- http://hgdownload.cse.ucsc.edu/goldenpath/hg38/database/rmsk.txt.gz \ 
  | gunzip -c - \
  | awk -v OFS="\t" '{ print $6, $7, $8, $12, $11, $10 }' - \
  | sort-bed - \
  > rmsk.bed

$ sort-bed my-regions.unsorted.bed > my-regions.bed

$ bedmap --echo --echo-map-id-uniq my-regions.bed rmsk.bed > answer.bed

Log in to answer this question.