def run(self): self.logToMaster("Setting up...\n") if not os.path.exists(self.outdir): system("mkdir -p %s" % self.outdir) #global_dir = self.getGlobalTempDir() clones = lcommon.read_list(self.clonefile) v2seq = lcommon.read_dict(self.vfile, cap=True) j2seq = lcommon.read_dict(self.jfile, cap=True) d2seq = lcommon.read_dict(self.dfile, cap=True) #get the median model model = rcommon.get_median_model(self.modeldir) modelfile = os.path.join(self.outdir, "recomb_median_model.pickle") pickle.dump(model, gzip.open(modelfile, 'wb')) self.logToMaster("Done processing the input files.\n") for clone in clones: items = clone.split('_') v = items[0] seq = items[1] j = items[2] vdels = [] for vdel, vdelfreq in model.v2del[v].iteritems(): if vdelfreq > 0: vdels.append(vdel) jdels = [] for jdel, jdelfreq in model.j2del[j].iteritems(): if jdelfreq > 0: jdels.append(jdel) vseq = v2seq[v] jseq = j2seq[j] outdir = os.path.join(self.outdir, clone) system("mkdir -p %s" % outdir) self.addChildTarget(GetCloneEvents(clone, seq, vseq, jseq, d2seq, outdir, modelfile, vdels, jdels)) self.setFollowOnTarget(CloneEventsAgg(self.outdir))
def run(self): self.logToMaster("Setting up...\n") if not os.path.exists(self.outdir): system("mkdir -p %s" % self.outdir) #global_dir = self.getGlobalTempDir() clones = lcommon.read_list(self.clonefile) v2seq = lcommon.read_dict(self.vfile, cap=True) j2seq = lcommon.read_dict(self.jfile, cap=True) d2seq = lcommon.read_dict(self.dfile, cap=True) self.logToMaster("Done processing the input files.\n") for clone in clones: items = clone.split('_') v = items[0] seq = items[1] j = items[2] vseq = v2seq[v] jseq = j2seq[j] outdir = os.path.join(self.outdir, clone) system("mkdir -p %s" % outdir) self.addChildTarget(GetCloneEvents(clone, seq, vseq, jseq, d2seq, outdir))