Exemplo n.º 1
0
    def run(self):
        super(JobPolishing, self).run()
        if not os.path.isdir(self.polishing_dir):
            os.mkdir(self.polishing_dir)

        pol.polish(self.in_contigs, self.args.reads, self.polishing_dir,
                   self.args.num_iters, self.args.threads, self.args.platform,
                   output_progress=True)

        polished_file = os.path.join(self.polishing_dir, "polished_{0}.fasta"
                                     .format(self.args.num_iters))
        pol.generate_polished_edges(self.in_graph_edges, self.in_graph_gfa,
                                    polished_file,
                                    self.polishing_dir, self.args.platform,
                                    self.args.threads)
Exemplo n.º 2
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,
                       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,
                                    self.args.threads)
        os.remove(contigs)
Exemplo n.º 3
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")