Esempio n. 1
0
def install_data_local(config_source,
                       system_installdir,
                       data_filedir,
                       galaxy_home=None,
                       tool_data_table_conf_file=None,
                       cores=None,
                       approaches=None):
    """Local installation of biological data, avoiding fabric usage.
    """
    if not cores:
        cores = 1
    PREP_FNS = {
        "s3": _download_s3_index,
        "ggd": _install_with_ggd,
        "raw": _prep_raw_index
    }
    if approaches is None: approaches = ["ggd", "s3", "raw"]
    ready_approaches = []
    Env = collections.namedtuple(
        "Env", "system_install, galaxy_home, tool_data_table_conf_file, cores")
    env = Env(system_installdir, galaxy_home, tool_data_table_conf_file, cores)
    for approach in approaches:
        ready_approaches.append((approach, PREP_FNS[approach]))
    # Append a potentially custom system install path to PATH so tools are found
    os.environ["PATH"] = "%s/bin:%s" % (os.path.join(system_installdir),
                                        os.environ["PATH"])
    genomes, genome_indexes, config = _get_genomes(config_source)
    genome_indexes = [
        x for x in DEFAULT_GENOME_INDEXES if x not in genome_indexes
    ] + genome_indexes
    _make_genome_directories(genomes, data_filedir)
    rnaseq.cleanup(genomes, data_filedir)
    _prep_genomes(env, genomes, genome_indexes, ready_approaches, data_filedir)
    rnaseq.finalize(genomes, data_filedir)
Esempio n. 2
0
def install_data_s3(config_source):
    """Install data using pre-existing genomes present on Amazon s3.
    """
    _check_version()
    genomes, genome_indexes, config = _get_genomes(config_source)
    genome_indexes += [x for x in DEFAULT_GENOME_INDEXES if x not in genome_indexes]
    _make_genome_directories(env, genomes)
    rnaseq.cleanup(genomes, env)
    _download_genomes(genomes, genome_indexes)
    rnaseq.finalize(genomes, env)
    _install_additional_data(genomes, genome_indexes, config)
Esempio n. 3
0
def install_data_s3(config_source):
    """Install data using pre-existing genomes present on Amazon s3.
    """
    _check_version()
    genomes, genome_indexes, config = _get_genomes(config_source)
    genome_indexes += [x for x in DEFAULT_GENOME_INDEXES if x not in genome_indexes]
    _make_genome_directories(env, genomes)
    rnaseq.cleanup(genomes, env)
    _download_genomes(genomes, genome_indexes)
    rnaseq.finalize(genomes, env)
    _install_additional_data(genomes, genome_indexes, config)
Esempio n. 4
0
def install_data(config_source, approaches=None):
    """Main entry point for installing useful biological data.
    """
    PREP_FNS = {"s3": _download_s3_index,
                "ggd": _install_with_ggd,
                "raw": _prep_raw_index}
    if approaches is None: approaches = ["ggd", "s3", "raw"]
    ready_approaches = []
    for approach in approaches:
        ready_approaches.append((approach, PREP_FNS[approach]))
    _check_version()
    # Append a potentially custom system install path to PATH so tools are found
    with path(os.path.join(env.system_install, 'bin')):
        genomes, genome_indexes, config = _get_genomes(config_source)
        genome_indexes = [x for x in DEFAULT_GENOME_INDEXES if x not in genome_indexes] + genome_indexes
        _make_genome_directories(env, genomes)
        rnaseq.cleanup(genomes, env)
        _prep_genomes(env, genomes, genome_indexes, ready_approaches)
        rnaseq.finalize(genomes, env)
        _install_additional_data(genomes, genome_indexes, config)
Esempio n. 5
0
def install_data(config_source, approaches=None):
    """Main entry point for installing useful biological data.
    """
    PREP_FNS = {"s3": _download_s3_index,
                "ggd": _install_with_ggd,
                "raw": _prep_raw_index}
    if approaches is None: approaches = ["ggd", "s3", "raw"]
    ready_approaches = []
    for approach in approaches:
        ready_approaches.append((approach, PREP_FNS[approach]))
    _check_version()
    # Append a potentially custom system install path to PATH so tools are found
    with path(os.path.join(env.system_install, 'bin')):
        genomes, genome_indexes, config = _get_genomes(config_source)
        genome_indexes = [x for x in DEFAULT_GENOME_INDEXES if x not in genome_indexes] + genome_indexes
        _make_genome_directories(env, genomes)
        rnaseq.cleanup(genomes, env)
        _prep_genomes(env, genomes, genome_indexes, ready_approaches)
        rnaseq.finalize(genomes, env)
        _install_additional_data(genomes, genome_indexes, config)
Esempio n. 6
0
def install_data_local(config_source, system_installdir, data_filedir,
                       galaxy_home=None, tool_data_table_conf_file=None,
                       cores=None, approaches=None):
    """Local installation of biological data, avoiding fabric usage.
    """
    if not cores:
        cores = 1
    PREP_FNS = {"s3": _download_s3_index,
                "ggd": _install_with_ggd,
                "raw": _prep_raw_index}
    if approaches is None: approaches = ["ggd", "s3", "raw"]
    ready_approaches = []
    Env = collections.namedtuple("Env", "system_install, galaxy_home, tool_data_table_conf_file, cores")
    env = Env(system_installdir, galaxy_home, tool_data_table_conf_file, cores)
    for approach in approaches:
        ready_approaches.append((approach, PREP_FNS[approach]))
    # Append a potentially custom system install path to PATH so tools are found
    os.environ["PATH"] = "%s/bin:%s" % (os.path.join(system_installdir), os.environ["PATH"])
    genomes, genome_indexes, config = _get_genomes(config_source)
    genome_indexes = [x for x in DEFAULT_GENOME_INDEXES if x not in genome_indexes] + genome_indexes
    _make_genome_directories(genomes, data_filedir)
    rnaseq.cleanup(genomes, data_filedir)
    _prep_genomes(env, genomes, genome_indexes, ready_approaches, data_filedir)
    rnaseq.finalize(genomes, data_filedir)