Esempio n. 1
0
    def run(self):
        super(JobFinalize, self).run()
        #shutil.copy2(self.contigs_file, self.out_files["contigs"])
        shutil.copy2(self.graph_file, self.out_files["graph"])
        shutil.copy2(self.polished_gfa, self.out_files["gfa"])

        scaffolds = scf.generate_scaffolds(self.contigs_file,
                                           self.scaffold_links,
                                           self.out_files["assembly"])

        logger.debug("---Output dir contents:----")
        try:
            ls_out = subprocess.check_output(
                ["ls", "-ARGg",
                 os.path.abspath(self.args.out_dir)])
            logger.debug("\n\n" + ls_out)
        except (subprocess.CalledProcessError, OSError):
            pass
        logger.debug("--------------------------")

        scf.generate_stats(self.repeat_stats, self.polished_stats, scaffolds,
                           self.out_files["stats"])
        try:
            os.symlink(self.out_files["assembly"], self.out_files["scaffolds"])
        except OSError as e:
            logger.debug(e)
        logger.info("Final assembly: {0}".format(self.out_files["assembly"]))
Esempio n. 2
0
    def run(self):
        super(JobFinalize, self).run()
        #shutil.copy(self.contigs_file, self.out_files["contigs"])
        shutil.copy(self.graph_file, self.out_files["graph"])
        shutil.copy(self.polished_gfa, self.out_files["gfa"])

        scaffolds = scf.generate_scaffolds(self.contigs_file,
                                           self.scaffold_links,
                                           self.out_files["assembly"])

        #create the scaffolds.fasta symlink for backward compatability
        #try:
        #    if os.path.lexists(self.out_files["scaffolds"]):
        #        os.remove(self.out_files["scaffolds"])
        #    relative_link = os.path.relpath(self.out_files["assembly"],
        #                                    self.work_dir)
        #    os.symlink(relative_link, self.out_files["scaffolds"])
        #except OSError as e:
        #    logger.debug(e)

        logger.debug("---Output dir contents:----")
        _list_files(os.path.abspath(self.args.out_dir))
        logger.debug("--------------------------")
        scf.generate_stats(self.repeat_stats, self.polished_stats, scaffolds,
                           self.out_files["stats"])
        logger.info("Final assembly: %s", self.out_files["assembly"])
Esempio n. 3
0
File: main.py Progetto: pythseq/Flye
    def run(self):
        #shutil.copy2(self.contigs_file, self.out_files["contigs"])
        shutil.copy2(self.graph_file, self.out_files["graph"])
        shutil.copy2(self.polished_gfa, self.out_files["gfa"])

        scaffolds = scf.generate_scaffolds(self.contigs_file,
                                           self.scaffold_links,
                                           self.out_files["scaffolds"])
        scf.generate_stats(self.repeat_stats, self.polished_stats, scaffolds,
                           self.out_files["stats"])

        logger.info("Final assembly: {0}".format(self.out_files["scaffolds"]))