In [6]:
import pandas
filename = "m8/mS/reads_seed0.tsv"
df = pandas.read_table(filename, delimiter = "\t", skiprows=3)
In [7]:
df.head()
Out[7]:
In [8]:
df['vaf'] = df.apply(lambda x: float(x['var'])/(x['ref']+x['var']), axis=1)
df[df['vaf'] > 0]['sample_label'].unique()
Out[8]:
In [9]:
dfpivot = df.pivot(index = "character_index", columns = "sample_label", values = "vaf")
In [10]:
%matplotlib inline
from matplotlib import pyplot
import seaborn
seaborn.stripplot(data = df[df['vaf'] > 0], y= 'vaf',x = 'sample_label')
pyplot.gcf().set_size_inches(10,10)
In [12]:
seaborn.pairplot(dfpivot, vars = [d for d in dfpivot.columns], diag_kind = 'kde', diag_kws={'bw' : 0.03})
pyplot.savefig("Simul_0.pdf")
In [15]:
df[df['vaf'] > 0][df['sample_label'] == 'P_0']['vaf'].hist(bins=20)
Out[15]:
In [ ]: