Esempio n. 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)
Esempio n. 2
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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)