def run(self):
     logger.info('CycleStep2 object running, %s' % self.thisDir)
     lsc.verifyDirExists(self.thisDir)
     lsc.createTimestamp(os.path.join(self.thisDir, 'xml', 'cycle.step2.start.xml'))
     lsc.verifyDirExists(os.path.join(self.thisDir, 'inter'))
     lsc.verifyFileExists(os.path.join(self.thisDir, 'inter', 'inter.chrnames.txt'))
     f = open(os.path.join(self.thisDir, 'inter', 'inter.chrnames.txt'), 'r')
     for chrom in f:
         chrom = chrom.strip()
         self.addChildTarget(CycleStep2Chromosome(self.thisNewickStr, self.thisParentDir,
                                                    self.thisStepLength, chrom, self.options))
     f.close()
     self.setFollowOnTarget(CycleStep2FollowOn(self.thisNewickStr, self.thisParentDir, 
                                               self.thisStepLength, self.options))
Ejemplo n.º 2
0
def checkForFiles(options):
    """ If files are missing, complains and dies.
    """
    lsc.verifyDirExists(os.path.join(options.rootInputDir, 'stats'))
    for f in [os.path.join(options.rootInputDir, 'seq.rev'), 
              os.path.join(options.rootInputDir, 'annots.gff'), 
              os.path.join(options.paramsDir, 'model.txt'),
              os.path.join(options.rootInputDir, 'stats', 'merged_root.stats.txt'),
              os.path.join(options.rootInputDir, 'stats', 'cds_annots.gff'),
              os.path.join(options.rootInputDir, 'stats', 'exons.gff'),
              os.path.join(options.rootInputDir, 'stats', 'introns.gff'),
              os.path.join(options.rootInputDir, 'stats', 'expanded_annots.gff'),
              os.path.join(options.rootInputDir, 'stats', 'annotstats.txt')]:
        lsc.verifyFileExists(f)
    if not options.noMEs:
        lsc.verifyDirExists(os.path.join(options.rootInputDir, 'mobiles'))
        for f in [os.path.join(options.paramsDir, 'model.mes.txt'), 
                  os.path.join(options.paramsDir, 'mes.cfg'),
                  os.path.join(options.rootInputDir, 'mobiles', 'LTR.fa'),
                  os.path.join(options.rootInputDir, 'mobiles', 'ME.fa'),
                  os.path.join(options.rootInputDir, 'mobiles', 'ME.gff')]:
            lsc.verifyFileExists(f)