GATK4 VariantRecalibrator resource error
1
0
Entering edit mode
4.9 years ago

My following command

java -Xmx10g -Djava.io.tmpdir=Varcalling/cohort.vcf_VQSR -jar gatk-package-4.0.1.2-local.jar VariantRecalibrator -R /xxx/REFERENCES/hg19//bwa_index/hg19.fa -V Varcalling/cohort.vcf -resource hapmap,VCF,known=false,training=true,truth=true,prior=15.0 /xxx/REFERENCES/hg19/hapmap_3.3.hg19.sites.reorder.vcf -resource omni,known=false,training=true,truth=false,prior=12.0 /xxx/REFERENCES/hg19//1000G_omni2.5.hg19.sites.reorder.vcf -resource dbsnp,known=true,training=false,truth=false,prior=6.0 /xxx//REFERENCES/hg19//dbsnp_138.hg19.reorder.vcf -resource 1000G,known=false,training=true,truth=false,prior=10.0 /xxx//REFERENCES/hg19//1000G_phase1.snps.high_confidence.hg19.sites.reorder.vcf -an SOR -an QD -an MQRankSum -an ReadPosRankSum -an MQ  -an FS -an DP -mode SNP -O Varcalling/cohort.vcf.SNP.recal --tranches-file Varcalling/cohort.vcf.SNP.tranches --rscript-file Varcalling/cohort.vcf.SNP.plots.R

gives an error for the resource

 `***********************************************************************

A USER ERROR has occurred: Invalid argument '/sc/orga/projects/PBG/REFERENCES/hg19/hapmap_3.3.hg19.sites.reorder.vcf'.

***********************************************************************

I've tried changing it all the following but keep getting errors

 --resource hapmap,VCF,known=false,training=true,truth=true,prior=15.0 /xxx/REFERENCES/hg19/hapmap_3.3.hg19.sites.reorder.vcf

same error for above.

OR

 --resource:hapmap,VCF,known=false,training=true,truth=true,prior=15.0 /xxx/REFERENCES/hg19/hapmap_3.3.hg19.sites.reorder.vcf

the error here is

A USER ERROR has occurred: The argument: "resource/resource" does not accept tags: "hapmap,VCF,known=false,training=true,truth=true,prior=15.0"

Anyone know what the mistake is that I am making here?

GATK4 NGS WES • 4.9k views
ADD COMMENT
0
Entering edit mode

Have a look at this thread

Basically you need a : between resource parameters and the resource path:

--resource hapmap,VCF,known=false,training=true,truth=true,prior=15.0:/xxx/REFERENCES/hg19/hapmap_3.3.hg19.sites.reorder.vcf

Although this also depends on your version of GATK...

ADD REPLY
0
Entering edit mode

It worked for me with a a singly hyphen before resource and no 'VCF' in the tags, like so, -resource hapmap,known=false,training=true,truth=true,prior=15.0:$HapMap_Sites

I have a similar syntax question, if its acceptable to ask here as a follow-up. HaplotypeCaller is supposed to be able to take a VCF as a comp track, I've been unable to do so without error. Only my -dbSNP argument works. from the documentation -> e.g. -comp:FOO will have 'FOO' in the INFO field). Records that are filtered in the comp track will be ignored. Note that 'dbSNP' has been special-cased (see the --dbsnp argument).

$GATK HaplotypeCaller \
        -I $INP \
        -O $OUTPUT \
        -R $REF \
        -L $Targets \
        -ERC GVCF \
        --dbsnp $DBSNP138 \
       -comp:hapmap3.3 $HapMapV3VCF \
        $infofields

Here too I've tried various combinations of spaces and colons in between -comp and the variable. Any thoughts. Is this even an important resource to use during Haplotype calling?

ADD REPLY
0
Entering edit mode

Don't do much germline mutation calling, but I think ExAC might have superseded HapMap? No idea WRT -comp. I highly recommend the GATK website, it's a bit of a mess because of versioning but the users and mods are very active, and because it's GATK your error will have occurred for others and almost certainly will have a Q/A on there.

ADD REPLY
0
Entering edit mode

Thanks, I'll go through their forum again, I've looked through before and couldn't find my query there. I can't register to post a question on GATK website, since I don't have a uni/org email (am a contractor).

ADD REPLY
0
Entering edit mode

Hello samreen.jasvi!

We believe that this post does not fit the main topic of this site.

Question solved.

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

ADD REPLY
5
Entering edit mode
3.3 years ago
DareDevil ★ 4.3k

In the latest version of GATK, there is a slight change in the syntax. You need to add : after resource and replace : with space in the begining of path to resource file.

Edit: the version is GATKv4.1

#!/bin/bash

reference="/path/to/Data/Homo_sapiens_assembly38.fasta"
interval='/path/to/Data/targetR.interval_list'
DBSNP='/path/to/Data/dbsnp_138.hg38.vcf.gz'
hapmap='/path/to/Data/hapmap_3.3.hg38.vcf.gz'
omni='/path/to/Data/1000G_omni2.5.hg38.vcf.gz'
thousand='/path/to/Data/1000G_phase1.snps.high_confidence.hg38.vcf.gz'


gatk --java-options '-Xmx24g' VariantRecalibrator -R $reference \
    -V input_raw.vcf.gz \
    --resource:hapmap,known=false,training=true,truth=true,prior=15.0 $hapmap \
    --resource:omni,known=false,training=true,truth=true,prior=12.0 $omni \
    --resource:1000G,known=false,training=true,truth=false,prior=10.0 $thousand \
    --resource:dbsnp,known=true,training=false,truth=false,prior=2.0 $DBSNP \
    -an QD -an FS -an SOR -an MQ -an MQRankSum -an ReadPosRankSum \
    --mode SNP \
    -tranche 100.0 \
    -tranche 99.9 \
    -tranche 99.0 \
    -tranche 90.0 \
    -O recalibrate_SNP.recal \
    --tranches-file recalibrate_SNP.tranches \
    --rscript-file recalibrate_SNP_plots.R
ADD COMMENT
0
Entering edit mode

when you referring to latest, it would be nice to put the version name also

ADD REPLY
0
Entering edit mode

Can you please explain the reasoning behind when you place =true or =false for the known, training and truth parameters?

ADD REPLY
2
Entering edit mode

read this

ADD REPLY

Login before adding your answer.

Traffic: 1548 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