예제 #1
0
 def preprocess(self):
     matplotlib.use("Agg")
     gs = GenomicSubset(self.params.region)
     A = SnpSubset(self.refpanel, bedtool=gs.bedtool)
     W = A.expanded_by(self.params.ld_window / 1000.0)
     R = BlockDiag.ld_matrix(self.refpanel, W.irs.ranges(), 300, band_units="SNPs")
     pickle.dump(R, self.R_file(mode="wb"), 2)
     # R.plot(A.irs, filename=self.R_plotfilename())
     RA = R.zero_outside_irs(A.irs)
     pickle.dump(RA, self.RA_file(mode="wb"), 2)
예제 #2
0
파일: truth.py 프로젝트: yakirr/statgen_y1
 def preprocess(self):
     matplotlib.use('Agg')
     gs = GenomicSubset(self.params.region)
     ss = SnpSubset(self.refpanel, bedtool=gs.bedtool)
     RA = BlockDiag.ld_matrix(self.refpanel, ss.irs.ranges(), self.params.ld_bandwidth / 1000.)
     try: # if the plotting has some error we don't want to not save the stuff
         # RA.plot(ss.irs, filename=self.RA_plotfilename())
         pass
     except:
         pass
     pickle.dump(RA, self.RA_file(mode='wb'), 2)
예제 #3
0
 def preprocess(self):
     matplotlib.use('Agg')
     gs = GenomicSubset(self.params.region)
     ss = SnpSubset(self.refpanel, bedtool=gs.bedtool)
     RA = BlockDiag.ld_matrix(self.refpanel, ss.irs.ranges(),
                              self.params.ld_bandwidth / 1000.)
     try:  # if the plotting has some error we don't want to not save the stuff
         # RA.plot(ss.irs, filename=self.RA_plotfilename())
         pass
     except:
         pass
     pickle.dump(RA, self.RA_file(mode='wb'), 2)
예제 #4
0
 def preprocess(self):
     matplotlib.use('Agg')
     gs = GenomicSubset(self.params.region)
     A = SnpSubset(self.refpanel, bedtool=gs.bedtool)
     W = A.expanded_by(self.params.ld_window / 1000.)
     R = BlockDiag.ld_matrix(self.refpanel,
                             W.irs.ranges(),
                             300,
                             band_units='SNPs')
     pickle.dump(R, self.R_file(mode='wb'), 2)
     # R.plot(A.irs, filename=self.R_plotfilename())
     RA = R.zero_outside_irs(A.irs)
     pickle.dump(RA, self.RA_file(mode='wb'), 2)
예제 #5
0
 def preprocess(self):
     matplotlib.use("Agg")
     gs = GenomicSubset(self.params.region)
     A = SnpSubset(self.refpanel, bedtool=gs.bedtool)
     W = self.window(A)
     R = BlockDiag.ld_matrix(self.refpanel, W.irs.ranges(), 1000000)  # bandwidth=infty
     pickle.dump(R, self.R_file(mode="wb"), 2)
     try:  # if the plotting has some error we don't want to not save the stuff
         # R.plot(A.irs, filename=self.R_plotfilename())
         pass
     except:
         pass
     RA = R.zero_outside_irs(A.irs)
     pickle.dump(RA, self.RA_file(mode="wb"), 2)
예제 #6
0
 def preprocess(self):
     matplotlib.use('Agg')
     gs = GenomicSubset(self.params.region)
     A = SnpSubset(self.refpanel, bedtool=gs.bedtool)
     W = self.window(A)
     R = BlockDiag.ld_matrix(self.refpanel, W.irs.ranges(),
                             1000000)  # bandwidth=infty
     pickle.dump(R, self.R_file(mode='wb'), 2)
     try:  # if the plotting has some error we don't want to not save the stuff
         # R.plot(A.irs, filename=self.R_plotfilename())
         pass
     except:
         pass
     RA = R.zero_outside_irs(A.irs)
     pickle.dump(RA, self.RA_file(mode='wb'), 2)