Esempio n. 1
0
#!/usr/bin/env python

############################################################################
# Copyright (c) 2015-2016 Saint Petersburg State University
# Copyright (c) 2011-2015 Saint Petersburg Academic University
# All Rights Reserved
# See file LICENSE for details.
############################################################################

import sys
import os
import shutil

from quast_libs import qconfig
qconfig.check_python_version()

from quast_libs.metautils import Assembly, correct_meta_references, correct_assemblies, \
    get_downloaded_refs_with_alignments, partition_contigs, calculate_ave_read_support
from quast_libs.options_parser import parse_options, remove_from_quast_py_args

from quast_libs import contigs_analyzer, reads_analyzer, search_references_meta
from quast_libs import qutils
from quast_libs.qutils import cleanup, check_dirpath

from quast_libs.log import get_logger
logger = get_logger(qconfig.LOGGER_META_NAME)
logger.set_up_console_handler()

from site import addsitedir
addsitedir(os.path.join(qconfig.LIBS_LOCATION, 'site_packages'))
Esempio n. 2
0
############################################################################
# Copyright (c) 2015-2017 Saint Petersburg State University
# Copyright (c) 2011-2015 Saint Petersburg Academic University
# All Rights Reserved
# See file LICENSE for details.
############################################################################
from __future__ import with_statement
from __future__ import division
import os
from collections import defaultdict

from quast_libs import qconfig

qconfig.check_python_version()
from quast_libs import contigs_analyzer, fastaparser, reporting, plotter_data
from quast_libs import qutils
from quast_libs.qutils import correct_seq, correct_name, get_uniq_name, is_python2

from quast_libs.log import get_logger
logger = get_logger(qconfig.LOGGER_META_NAME)


class Assembly:
    def __init__(self, fpath, label):
        self.fpath = fpath
        self.label = label
        self.name = os.path.splitext(os.path.basename(self.fpath))[0]


def parallel_partition_contigs(asm, assemblies_by_ref, corrected_dirpath, alignments_fpath_template):
    assembly_label = qutils.label_from_fpath(asm.fpath)