plotting AF in vcf files

plotting AF in vcf files

2

Hello everyone,
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.


AF


vcf


plotting

• 266 views

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
common.load_dataset('pyvcf')
vcf_file="~/fuc-data/pyvcf/normal-tumor.vcf"
vf = pyvcf.VcfFrame.from_file(vcf_file)
vf.plot_hist('DP')

enter image description here

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")

enter image description here

We can show AF instead of DP:

vf.plot_hist('AF')

enter image description here


Login
before adding your answer.

Traffic: 1092 users visited in the last hour

Source link