Can I specify a targets file with Haplotypecaller?
I want to provide a target file (similar to -T option in bcftools call) along with the interval list file in GATK. Is there a way in GATK to do the same? Currently I am using mpileup and call to do the calling using the following code:
bcftools mpileup -Ou -a FORMAT/AD,INFO/AD \
-R amplicon_targets.bed \
-d 9999999 \
-f Homo_sapiens_assembly38.fasta \
$BAM | \
bcftools call --keep-alts -C alleles \
-T vcf_filtered_ucsc.tsv.gz \
-m -Ov - > ${PREFIX}_allels.vcf
-
Hi Asma Riyaz
Yes you can. -L parameter works for this purpose. You can provide a compatible interval_list or a bed file, vcf file or a direct coordinate as value to this parameter.
Regards.
-
Hello,
I understand the -L option is for interval list file. This provides a means to look at specific regions, however my question is can I use a certain targets file as well (this is similar to the -T option in bcftools call)?
In the bcftools code, I use the interval file (amplicon_targets.bed) in the mpileup tool to subset the genomic regions I am interested in and in the call tool subsequently I use known POS coordinates ONLY.
-
Hi again.
Can you clearify what you mean by targets?
HaplotypeCaller has --alleles option to force call variants of interest if that is what you mean.
-
Hello again,
Following is an example of few snps targets that I want to focus on while calling variants.
chr6 154010049 T,C
chr6 154039662 A,G
chr6 154087567 G,A -
Hi Asma Riyaz
You need to provide them in VCF format to HaplotypeCaller using the option
--alleles
Regards.
-
Hello, I tried using the --alleles parameter with a interval list file whose contents below.
chr6 154010049 154010049 + rs1319339
chr6 154039662 154039662 + rs1799971I get error as below:
A USER ERROR has occurred: File file:///cromwell-executions/variant_analysis/3e9a9f7f-9ce6-4d83-a1dd-2e7a6344b479/call-HaplotypeCaller/shard-0/inputs/-376436541/vcf_filtered_ucsc.interval_list
is of the wrong type. It should contain Features of type VariantContext, but instead contains Features of type(s): [Interval]Could you help me understand what format is --alleles expecting?
-
Hi Asma Riyaz
--alleles parameter is specifically looking for a VCF input therefore it will not work with an interval file.
I hope this helps.
Please sign in to leave a comment.
7 comments