Entering edit mode
18 months ago
namck
•
0
I am trying to filter a VCF file so that the filtered file has a VAF of less than 50% and a depth of at least 200 for variant supporting bases. The output VCF file should be sorted by chromosome and should retain the VCF header, so that it can be used as input for other tools that accept VCF files.
So far, I have tried running this code using Pandas library, but that only resulted in an empty dataframe.
Could you please let me know what I am doing wrong?
Thank you so much!
I am also attaching the format of my VCF file here.
Did you try
bcftools view
?E.g.,
Or, use
SnpEff
Note: This is just an example I did not test the command myself.
There must be tools which would do the job easily, but I was just wondering if I could do that using Python.
There are already Python packages for that, as an example cyvcf2