Exemplo n.º 1
0
 def run(self):
     super(JobAssembly, self).run()
     if not os.path.isdir(self.assembly_dir):
         os.mkdir(self.assembly_dir)
     asm.assemble(self.args, Job.run_params, self.assembly_filename,
                  self.log_file, self.args.asm_config, )
     if os.path.getsize(self.assembly_filename) == 0:
         raise asm.AssembleException("No disjointigs were assembled - "
                                     "please check if the read type and genome "
                                     "size parameters are correct")
     asm_len, asm_n50 = scf.short_statistics(self.assembly_filename)
     logger.debug("Disjointigs length: {0}, N50: {1}".format(asm_len, asm_n50))
Exemplo n.º 2
0
    def run(self):
        super(JobContigger, self).run()
        if not os.path.isdir(self.work_dir):
            os.mkdir(self.work_dir)
        logger.info("Generating contigs")
        repeat.generate_contigs(self.args, Job.run_params,
                                self.repeat_graph_edges, self.work_dir,
                                self.log_file, self.args.asm_config,
                                self.repeat_graph, self.reads_alignment)

        if os.path.getsize(self.out_files["contigs"]) == 0:
            raise asm.AssembleException("No contigs were assembled - "
                                        "pipeline stopped")
Exemplo n.º 3
0
Arquivo: main.py Projeto: pythseq/Flye
 def run(self):
     if not os.path.isdir(self.assembly_dir):
         os.mkdir(self.assembly_dir)
     asm.assemble(
         self.args,
         Job.run_params,
         self.assembly_filename,
         self.log_file,
         self.args.asm_config,
     )
     if os.path.getsize(self.assembly_filename) == 0:
         raise asm.AssembleException(
             "No contigs were assembled - "
             "please check if the read type and genome "
             "size parameters are correct")
Exemplo n.º 4
0
    def run(self):
        super(JobPolishing, self).run()
        if not os.path.isdir(self.polishing_dir):
            os.mkdir(self.polishing_dir)

        contigs, stats = \
            pol.polish(self.in_contigs, self.args.reads, self.polishing_dir,
                       self.args.num_iters, self.args.threads, self.args.platform,
                       self.args.read_type, output_progress=True)
        #contigs = os.path.join(self.polishing_dir, "polished_1.fasta")
        #stats = os.path.join(self.polishing_dir, "contigs_stats.txt")
        pol.filter_by_coverage(self.args, stats, contigs,
                               self.out_files["stats"],
                               self.out_files["contigs"])
        pol.generate_polished_edges(self.in_graph_edges, self.in_graph_gfa,
                                    self.out_files["contigs"],
                                    self.polishing_dir, self.args.platform,
                                    stats, self.args.threads)
        os.remove(contigs)
        if os.path.getsize(self.out_files["contigs"]) == 0:
            raise asm.AssembleException("No contigs were assembled - "
                                        "pipeline stopped")