Example #1
0
np.set_printoptions(linewidth=200, precision=5, suppress=True)
import pandas as pd;

pd.options.display.max_rows = 20;
pd.options.display.expand_frame_repr = False
import os;

import popgen.Util as utl
import pylab as plt
import popgen.Plots as pplt
import popgen.Estimate as est
# reload(dta)
import popgen.hypoxia.Utils as hutl


a=hutl.load()['L']
d=a.xs('D',level='READ',axis=1)

reload(pplt)
print d
dd=d.groupby(level=[0,1],axis=1).apply(lambda xx: utl.scanGenome(xx,f=lambda x:x.max(),winSize=500000,step=500000).iloc[:,0])
pplt.Manhattan(dd)
# plt.savefig(utl.home+'L.coverage.png', format='png', dpi=100)

L17=hutl.loadscores('L',17).max(1).rename('L17')

L=hutl.loadscores('L',180).max(1)
C=hutl.loadscores('C',180).max(1)
H=hutl.loadscores('H',180).max(1)
all=pd.concat([L,C,H],1);all.columns=['L','C','H']
# H=L.apply(lambda x: x.idxmax(),1).rename('h')
Example #2
0
'''
Copyleft Nov 13, 2016 Arya Iranmehr, PhD Student, Bafna Lab, UC San Diego,  Email: [email protected]
'''
import numpy as np;

np.set_printoptions(linewidth=200, precision=5, suppress=True)
import pandas as pd;

pd.options.display.max_rows = 20;
pd.options.display.expand_frame_repr = False
import seaborn as sns
import pylab as plt;
import matplotlib as mpl
import os;
import popgen.Util as utl
import popgen.hypoxia.Utils as hutl
# utl.createAnnotation(vcf='/home/arya/storage/Data/Dmelanogaster/Hypoxia/pops/all.vcf')

hutl.scanCMH()
hutl.scanSFSAll()
hutl.saveAnnotationUCSC()