Entering edit mode
3.1 years ago
smrutimayipanda
▴
20
Hi, I want to extract the columns of zygosity, variant supporting reads, reads frequencies and variant coverage from VEP. Please, anyone, tell me how to extract that? Thanks in advance
Sorry I didn't get these things from the given page. Please explain once if you can.
Can please someone tell me how to get variant supporting reads from VCF file?
You need to extract the AD field which means "Allelic depths for the ref and alt alleles in the order listed". You can access specific VCF fields using bcftools query (https://samtools.github.io/bcftools/howtos/query.html). Examples are already mentioned in the link.
Thank you for your answer but it didnt relate to my question. I am asking about how to get variant supporting reads from VCF file?
If you have the BAM file, this post may help: Finding The Number Of Reads Which Support A Variant In Vcf
Sorry I didnt get the number of variant supporting reads from the link. Do you have any other alternative to this?
Check out this link: https://github.com/broadinstitute/VariantBam
Check specifically example use 9. You probably want this. You obviously need the exact BAM file used to generate you VCF.
See I think you are not understanding my point. I am asking for variant reads only, if it is present in vcf file or annotated file or I have to use any tool, please let me know. I dont have any other file to use for calculation of variant reads. Please let me know if I can get variant supporting reads from freebayes or any other variant calling pipeline.
If you need only the count of variant supporting reads, how did bcftools query not help you? If you want the count of every read on a variant site irrespective of the allele, extract the FORMAT/DP field using bcftools query. If you are only interested in the alternate allele (the variant with respect to the reference sequence), extract the AD field and get the alt. How did bcftools query not help you?
If you need the actual reads, you need the alignment file.
You can also use SnpSift extract to extract any VCF field: http://pcingola.github.io/SnpEff/ss_extractfields/.
Please go through the examples as they are self explainatory. As long as you know which field you need (check the metadata of the VCF file), you should be good to go.