示例#1
0
    def __init__(
        self,
        root_ctg,
        ctgfasta_path,
        reads_ctg_bam_path,
        input_fqs,
        asmrootdir_path,
        # FIXME hack to get stdout logged
        logger,
    ):
        self.root_ctg = root_ctg
        self.ctgfasta_path = ctgfasta_path
        self.reads_ctg_bam_path = reads_ctg_bam_path
        self.asmrootdir_path = asmrootdir_path
        self.logger = logger

        self.tenxfq_paths = list(glob.glob(input_fqs))

        self.fqdir_path = os.path.join(self.asmrootdir_path, 'fqs')
        util.mkdir_p(self.asmrootdir_path)
        util.mkdir_p(self.fqdir_path)
        self.debugdir_path = os.path.join(self.asmrootdir_path, 'debug')
        util.mkdir_p(self.debugdir_path)

        self.ctg_size_map = util.get_fasta_sizes(self.ctgfasta_path)
示例#2
0
def run(options):
    """
  1. create output directories
  2. collect args for each stage
  3. check which stages need to run
  4. iterate through stages and submit jobs
  5. validate that we're done running
  """

    util.mkdir_p(options.output_dir)
    util.mkdir_p(options.results_dir)
    util.mkdir_p(options.working_dir)
    util.mkdir_p(options.log_dir)

    stages = get_stages(options)
    runner = pipeline.Runner(options)

    for stage_name, stage in stages.items():
        runner.run_stage(stage, stage_name)