creating a simple variant analysis table

Hi, I am pretty green at this, but have done the mapping etc. and now have my variant analysis vcf file. What I want is a table with the position, the changes, the number of alleles showing the alteration, read depth at that position, and total # of relevant reads(paired, hi quality). I am flummoxed as to how to get there. I can do it by hand, but think I should learn how to make the computer do it for me!
Thanks for your patience!

Hi @ajr
you can extract relevant fields from the vcf file. Contig/chromosome, position, ref and alt alleles are obvious, however, check 0/1 offset for position (some formats use zero offset for start). For high quality coverage you are after DP4. The description is available either in the header or VCF specification. Maybe try bcftools query Extracts fields from VCF/BCF file and prints them in user-defined format.

Hope that helps.

Kind regards,


1 Like