This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Annotate VCF with RepeatMasker

Hai,

I have bunch of VCF files and I want to see if the coordinates fall in the repetitive regions of the genome, I know RepeatMasker can do it, I just don't know how. I know there is a existing thread (Annotate VCF with RepeatMasker) on the same topic, but it does not quite answer the question.

I would highly appreciate if someone can help.

Thanks in advance

repeatmasker vcf annotation

1 answer

I use the following:

  1. Download the repatmasker regions as a bed file and sort and index.
    url="https://genome.ucsc.edu/cgi-bin/hgTables?hgsid=1237006675_NR5drEgvZ85edZVWA5an0D0VQBC4&boolshad.hgta_printCustomTrackHeaders=0&hgta_ctName=tb_rmsk&hgta_ctDesc=table+browser+query+on+rmsk&hgta_ctVis=pack&hgta_ctUrl=&fbQual=whole&fbUpBases=200&fbDownBases=200&hgta_doGetBed=get+BED"
    wget  -O- -q  "$url" | 
    grep -v "#" | 
    sort -k1,1 -k2,2n -k3,3n -t$'\t' | 
    bgzip -c > repeatmasker.GRCh38.bed.gz
    tabix -p bed repeatmasker.GRCh38.bed.gz
    
  2. Use ensembl VEP custom annotation:
    ...other vep commandline stuff...
    --custom repeatmasker.GRCh38.bed.gz,RepeatMasker,bed,overlap,1
    

Log in to answer this question.