ApplyVQSR output restriction
AnsweredHi GATK Team,
I'd like to know if it possible to restrict the output to within a specific interval? I am running ApplyVQSR and supplying an interval file with the interval
chr1 111057913 117227796 + .
using the -L argument. The resulting output has a variant
chr1 111057911 . TCATC T .
This will cause an issue if I do the merging (with other files) without any sanity checks and try to sort the merged file if the file before this one has the same variant.
I am trying to avoid doing any sanity checks during the merging or sorting after merging as they can be expensive. Is there an argument I can use to make sure the output only contains variants within a specific interval? In the case above, the output file wouldn't have the following variant
chr1 111057911 . TCATC T .
since the file before this one will have the same variant (chr1:104888029-111057912 interval)
UPDATE
As a workaround, I've tried SelectVariants and supplying the same interval_list file used to create the VCF but somehow the variant still ends up in the final VCF. Is there an argument I am missing?
gatk SelectVariants \\
-V input.vcf.gz \\
-L scattered.interval_list \\
-O output.vcf.gz
I can achieve the desired result with bcftools the following way:
bcftools view -t chr1:111057913-117227796 input.vcf.gz --output output.vcf.gz --output-type z
UPDATE 2
The ref allele is in the specified interval, which makes sense why the variant is not removed. It would've been great though to have a feature that allowed one to choose how "strict", with regards to the position, the selection/filtering should be.
This issue can be marked as fixed. Thanks
-
Hi Lindo Nkambule,
Thank you so much for sharing your issue and progressive updates! I will most certainly communicate your feature suggestion on choosing strictness with regards to position to the development team.
We greatly appreciate you taking the time to post your workarounds and solutions to the GATK forum. Hopefully, this will help others encountering similar issues in the future.
Best,
Anthony
Please sign in to leave a comment.
1 comment