コード例 #1
0
ファイル: __init__.py プロジェクト: abner24/plantismash
def check_prereqs(options):
    failure_msgs = []

    if options.full_hmmer or options.inclusive:
        failure_msgs.extend(fullhmmer.check_prereqs(options))

    failure_msgs.extend(genefinding.check_prereqs(options))
    failure_msgs.extend(hmm_detection.check_prereqs())

    if options.smcogs:
        failure_msgs.extend(smcogs.check_prereqs(options))

    if options.clusterblast:
        failure_msgs.extend(clusterblast.check_prereqs(options))

    if options.subclusterblast:
        failure_msgs.extend(subclusterblast.check_prereqs(options))

    if options.knownclusterblast:
        failure_msgs.extend(knownclusterblast.check_prereqs(options))

    if options.coexpress:
        failure_msgs.extend(coexpress.check_prereqs(options))

    return failure_msgs
コード例 #2
0
ファイル: __init__.py プロジェクト: chevrm/transPACT
def check_prereqs(options):
    failure_msgs = []

    if options.full_hmmer or options.inclusive:
        failure_msgs.extend(fullhmmer.check_prereqs(options))

    failure_msgs.extend(genefinding.check_prereqs(options))
    failure_msgs.extend(hmm_detection.check_prereqs())

    if options.run_asf:
        failure_msgs.extend(active_site_finder.check_prereqs(options))

    if options.tta:
        failure_msgs.extend(tta.check_prereqs(options))

    if options.smcogs:
        failure_msgs.extend(smcogs.check_prereqs(options))

    if options.clusterblast:
        failure_msgs.extend(clusterblast.check_prereqs(options))

    if options.subclusterblast:
        failure_msgs.extend(subclusterblast.check_prereqs(options))

    if options.knownclusterblast:
        failure_msgs.extend(knownclusterblast.check_prereqs(options))

    if options.cassis:
        failure_msgs.extend(cassis.check_prereqs(options))

    return failure_msgs
コード例 #3
0
    def test_check_prereqs(self):
        "Test fullhmmer.check_prereqs()"
        config = Namespace()
        trace = """    Called antismash.utils.locate_executable('hmmscan')
    Called antismash.utils.locate_file(
        '.../antismash/generic_modules/fullhmmer/Pfam-A.hmm')
    Called antismash.utils.locate_file(
        '.../antismash/generic_modules/fullhmmer/Pfam-A.hmm.h3f')
    Called antismash.utils.locate_file(
        '.../antismash/generic_modules/fullhmmer/Pfam-A.hmm.h3i')
    Called antismash.utils.locate_file(
        '.../antismash/generic_modules/fullhmmer/Pfam-A.hmm.h3m')
    Called antismash.utils.locate_file(
        '.../antismash/generic_modules/fullhmmer/Pfam-A.hmm.h3p')"""
        expected = []
        returned = fullhmmer.check_prereqs(config)

        self.assertListEqual(expected, returned)
        assert_same_trace(self.tt, trace)
コード例 #4
0
    def test_check_prereqs_missing_exe(self):
        "Test fullhmmer.check_prereqs() with a missing executable"
        config = Namespace()
        antismash.utils.locate_executable.mock_returns = None
        trace = """    Called antismash.utils.locate_executable('hmmscan')
    Called antismash.utils.locate_file(
        '.../antismash/generic_modules/fullhmmer/Pfam-A.hmm')
    Called antismash.utils.locate_file(
        '.../antismash/generic_modules/fullhmmer/Pfam-A.hmm.h3f')
    Called antismash.utils.locate_file(
        '.../antismash/generic_modules/fullhmmer/Pfam-A.hmm.h3i')
    Called antismash.utils.locate_file(
        '.../antismash/generic_modules/fullhmmer/Pfam-A.hmm.h3m')
    Called antismash.utils.locate_file(
        '.../antismash/generic_modules/fullhmmer/Pfam-A.hmm.h3p')"""
        expected = ["Failed to locate file: 'hmmscan'"]
        returned = fullhmmer.check_prereqs(config)

        self.assertListEqual(expected, returned)
        assert_same_trace(self.tt, trace)