예제 #1
0
파일: picard.py 프로젝트: CarlesV/paleomix
def _picard_version(config, jar_file):
    if jar_file not in _PICARD_VERSION_CACHE:
        params = AtomicJavaCmdBuilder(jar_file,
                                      temp_root=config.temp_root,
                                      jre_options=config.jre_options)
        params.add_value("--version")

        name = "Picard " + os.path.basename(jar_file)
        requirement = versions.Requirement(call=params.finalized_call,
                                           name=name,
                                           search=r"^(\d+)\.(\d+)",
                                           checks=versions.GE(1, 82))
        _PICARD_VERSION_CACHE[jar_file] = requirement
    return _PICARD_VERSION_CACHE[jar_file]
예제 #2
0
def _picard_version(config, jar_file):
    if jar_file not in _PICARD_VERSION_CACHE:
        params = AtomicJavaCmdBuilder(jar_file,
                                      temp_root=config.temp_root,
                                      jre_options=config.jre_options)
        params.add_value("--version")

        name = "Picard " + os.path.basename(jar_file)
        requirement = versions.Requirement(call=params.finalized_call,
                                           name=name,
                                           search=r"^(\d+)\.(\d+)",
                                           checks=versions.GE(1, 82))
        _PICARD_VERSION_CACHE[jar_file] = requirement
    return _PICARD_VERSION_CACHE[jar_file]
예제 #3
0
def _get_gatk_version_check(config):
    """Returns a version-check object for the "GenomeAnalysisTK.jar" located at
    config.jar_root; for now, this check only serves to verify that the JAR can
    be executed, which may not be the case if the JRE is outdated.
    """
    jar_file = os.path.join(config.jar_root, "GenomeAnalysisTK.jar")
    if jar_file not in _GATK_VERSION:
        params = AtomicJavaCmdBuilder(jar_file, temp_root=config.temp_root, jre_options=config.jre_options)
        params.add_value("--version")

        # Any version is fine; for now just catch old JREs
        requirement = versions.Requirement(
            call=params.finalized_call, name="GenomeAnalysisTK", search=r"^(\d+)\.(\d+)", checks=versions.Any()
        )
        _GATK_VERSION[jar_file] = requirement
    return _GATK_VERSION[jar_file]
예제 #4
0
파일: gatk.py 프로젝트: health1987/paleomix
def _get_gatk_version_check(config):
    """Returns a version-check object for the "GenomeAnalysisTK.jar" located at
    config.jar_root; for now, this check only serves to verify that the JAR can
    be executed, which may not be the case if the JRE is outdated.
    """
    jar_file = os.path.join(config.jar_root, "GenomeAnalysisTK.jar")
    if jar_file not in _GATK_VERSION:
        params = AtomicJavaCmdBuilder(jar_file,
                                      temp_root=config.temp_root,
                                      jre_options=config.jre_options)
        params.add_value("--version")

        # Any version is fine; for now just catch old JREs
        requirement = versions.Requirement(call=params.finalized_call,
                                           name="GenomeAnalysisTK",
                                           search=r"^(\d+)\.(\d+)",
                                           checks=versions.Any())
        _GATK_VERSION[jar_file] = requirement
    return _GATK_VERSION[jar_file]