plotting AF in vcf files
I want to plot AF distribution for all my vcf files.
Is there any software to do that.
I tried using vcfstats but its showing error in my vcf files.
Here is a Python API solution using the
pyvcf.VcfFrame.plot_hist method I wrote.
Below is a simple example:
from fuc import common, pyvcf
vcf_file = '~/fuc-data/pyvcf/normal-tumor.vcf'
vf = pyvcf.VcfFrame.from_file(vcf_file)
We can draw multiple histograms with hue mapping:
annot_file = '~/fuc-data/pyvcf/normal-tumor-annot.tsv'
af = common.AnnFrame.from_file(annot_file, sample_col='Sample')
vf.plot_hist('DP', af=af, group_col='Tissue')
We can show AF instead of DP:
Traffic: 2639 users visited in the last hour