It looks like you're new here. If you want to get involved, click one of these buttons!
Hi Team,
I have a multi-sample VCF file produced by UnifiedGenotyper. I now want to filter this file marking those variants with a low depth. However the DP entry in the info field is across all samples, and even if it were possible to assess the individual's DPs, I would then have to resolve the issue of a variant having low depth in one sample, and high in another. Any suggestions are appreciated.
Thanks for your time
Geraldine_VdAuwera
Posts: 2,238 admin
I'm guessing you used the --filterExpression argument; that only looks at INFO field annotations. I think what you want is --genotypeFilterExpression, which looks at FORMAT field annotations.
Geraldine Van der Auwera, PhD
Answers
Try using the DP from the sample fields.
Eric Banks, PhD -- Group Leader, Methods Development, MPG, Broad Institute of Harvard and MIT
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like WTF •That is what I was looking to do, but when I used DP in a JEXL expression it seems to only look at the aggregate depth. I have been looking through the documentation for VariantFiltration and VariantAnnotator, but can't find how to do this.
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like WTF •Excellent! Thanks a million.
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like WTF •Just in case you still need help with that issue, I just wrote a walker that allow you to print out the sites (as intervals) that more than X% of them have at list Y coverage (based on their DP as Eric suggested). This walker will be part of the next release.
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like WTF •Hi Ami, I'm very interested in to apply that filter (to print out the sites from which 90% of samples have more than x DP). Do you now when the next release is going to be available? Thanks a lot.
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like WTF •The new version will come out very soon -- today if things go to plan.
Geraldine Van der Auwera, PhD
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like WTF •Great! Thanks a lot, Ester
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like WTF •Hi, I have already downloaded the new version. Could you please tell me which is the walker that allows you to print out the sites with more than x DP in x% of samples? Thanks a lot!
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like WTF •Hi,
The new walker is called CoveredByNSamplesSites and I hope it will help you in your tasks. As far as I know, I'm the only one that used it so far and it was before most of the changes in the last GATK version were done, so please try it and let me know if you find any problems with it. http://www.broadinstitute.org/gatk/gatkdocs/org_broadinstitute_sting_gatk_walkers_diagnostics_CoveredByNSamplesSites.html
- Spam
- Abuse
- Troll
1 • Off Topic Disagree Agree 1Like WTF •Hi Ami, sorry I didn't realized that you had answered me (I usually receive an e-mail). The job is now running, I let you know at the end of the day. There is typo in the GATK documentation: --precentageOfSamples Thanks a lot, Best,
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like WTF •Hi Ami, no problems using this walker with the new version of GATK. It works perfectly! Thank you very much! Best,
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like WTF •Thanks for letting us know (both that it works fine and about the typo).
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like WTF •As stated in the documentation of VariantFiltration for the --genotypeFilterExpression tag, "VariantFiltration will add the sample-level FT tag to the FORMAT field of filtered samples (this does not affect the record's FILTER tag). "
My question is: How can I select variants from my VariantFiltration output vcf file using the information that was written in the FORMAT FT tag by Variant Filtration? I did not see an option for this in SelectVariant with which I can only select variants which have FILTER == PASS
Is there a GATK option / tool for that? Thank you. Eva
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like WTF •Hi Eva,
There is no built-in tool to do this. You'll need to use a JEXL expression using Variant Context methods. I think it's something like vc.isFiltered(). Let me know if that doesn't work, I'll help you find the right one.
Geraldine Van der Auwera, PhD
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like WTF •Thanks for the info Geraldine, I think I'll manage.
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like WTF •