In [2]:
%matplotlib inline
import matplotlib as mpl
mpl.use('agg')
import os
# os.environ["DISPLAY"] = "localhost:11.0"
import numpy as np
import matplotlib.pyplot as plt
import sys,os
path='/'.join(os.getcwd().split('/')[:-4])
sys.path.insert(1,path)
import Utils.Util as utl
import Utils.Plots as pplt
import pandas as pd
pd.options.display.max_rows = 20;
pd.options.display.expand_frame_repr = True
from IPython.display import display
import pylab as plt
import seaborn as sns
import Scripts.KyrgysHAPH.Util as kutl
import Scripts.KyrgysHAPH.Plot as kplt
import Scripts.HLI.Kyrgyz.IBSScan.IBDScan as ibd
import Scripts.HLI.Kyrgyz.PBS as pbs
pd.options.display.max_colwidth = 2000;
import matplotlib as mpl

In [74]:
i=pd.Series({'CHROM':22,'start':26099429,'end':27203877})
f='/home/arya/POP/HA/GT/chr22.vcf.gz.aa.gz'
reload(kutl)
# utl.gz.FreqPop(pop='KGZ')
# kutl.AllPops()
# kutl.ID('HLT')


Out[74]:
HLT    187524477
HLT    187524476
HLT    187524475
HLT    187524470
HLT    187524469
HLT    187524459
HLT    187524460
HLT    187524461
HLT    187524462
HLT    187524466
         ...    
HLT    201852645
HLT    201852644
HLT    201852646
HLT    201852670
HLT    201852658
HLT    201852669
HLT    201852665
HLT    201852663
HLT    201852667
HLT    201852664
Length: 72, dtype: object

In [ ]:
i

In [57]:
# MINAC = 3
AFCF=0.05
# a= a[((a.sum(1) > MINAC) & (a.sum(1) < a.shape[1] * MINAC))]
print a.shape
a=a[(a[p1].mean(1) / 2 - a[p2].mean(1) / 2).abs() > AFCF]
print a.shape


(162558, 33)
(7167, 33)