SnpSift: Annotate vcf file using GNOMAD
1
1
Entering edit mode
3.6 years ago
bsmith030465 ▴ 240

Hi,

I am trying to annotate my vcf file (my.vcf.gz) with gnomad using SnpEff/SnpSift. I downloaded gnomad (3.1.1) as given in the instructions GNOMAD download

I now want to annotate my vcf.gz file, containing variants from all chromosomes, with this data. The SnpSift example page SnpSift gives the example:

java -jar SnpSift.jar annotate dbSnp132.vcf variants.vcf > variants_annotated.vcf

However, the vcf file downloaded from gnomad is not a single file, but one file for each chromosome. For example:

gnomad.genomes.v3.1.1.sites.chr10.vcf.bgz.tbi gnomad.genomes.v3.1.1.sites.chr19.vcf.bgz.tbi gnomad.genomes.v3.1.1.sites.chr5.vcf.bgz.tbi

What command do I need so that it uses all the vcfs in the downloaded gnomad directory?

Thanks for your help!

GNOMAD SnpEff SnpSift • 3.6k views
ADD COMMENT
0
Entering edit mode

What command do I need so that it uses all the vcfs in the downloaded gnomad directory?

run a loop per chromosome in your vcf and then concatenate each resulting vcf/chromosome

ADD REPLY
0
Entering edit mode
18 months ago
Nawar • 0

Hi,

I use a loop for that. Something like this to inspire you:

# Enter folder where gnomAD data are here:

gnomAD="/path/to/gnomAD/database/release/3.1.2/gnomad.genomes.v3.1.2.sites."

# Enter the folder where your results are and will be annotated further

cd /path/to/your/results/folder/

# Enter the name of the final results' file from SnpSift

ann="results.ann.gnomAD.genomes.v3.1.2.vcf"

# The loop (to annotate with some fields from the INFO column for example)

for i in {1..22};
do
java -jar SnpSift.jar annotate -info AF,AF_nfe,popmax,AF_popmax ${gnomAD}chr${i}.vcf.bgz temp > temp1
mv temp1 temp
done


java -jar SnpSift.jar annotate -info AF,AF_nfe,popmax,AF_popmax ${gnomAD}chrX.vcf.bgz temp > temp1
mv temp1 temp

java -jar SnpSift.jar annotate -info AF,AF_nfe,popmax,AF_popmax ${gnomAD}chrY.vcf.bgz temp > temp1
mv temp1 temp

mv temp $ann

Hope that helps

Best

/Nawar

ADD COMMENT

Login before adding your answer.

Traffic: 1105 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6