Esempio n. 1
0
def install_snpeff(env):
    """Variant annotation and effect prediction tool.
    http://snpeff.sourceforge.net/
    """
    version = "3_3"
    genomes = ["GRCh37.71", "hg19", "GRCm38.71"]
    #genomes_notinstalled = ["NCBIM37.66","athalianaTair10"]
    url = "http://downloads.sourceforge.net/project/snpeff/" \
          "snpEff_v%s_core.zip" % version
    genome_url_base = "http://downloads.sourceforge.net/project/snpeff/"\
                      "databases/v%s/snpEff_v%s_%s.zip"
    install_dir = _symlinked_java_version_dir("snpeff", version, env)
    if install_dir:
        with _make_tmp_dir() as work_dir:
            with cd(work_dir):
                dir_name = _fetch_and_unpack(url)
                with cd(dir_name):
                    env.safe_sudo("mv *.jar %s" % install_dir)
                    env.safe_run("sed -i.bak -r -e 's/^data_dir.*=.*/data_dir = %s\/data/' %s" %
                                 (install_dir.replace("/", "\/"), "snpEff.config"))
                    env.safe_run("chmod a+r *.config")
                    env.safe_sudo("mv *.config %s" % install_dir)
                    data_dir = os.path.join(install_dir, "data")
                    env.safe_sudo("mkdir %s" % data_dir)
                    for org in genomes:
                        if not env.safe_exists(os.path.join(data_dir, org)):
                            gurl = genome_url_base % (version, version, org)
                            _fetch_and_unpack(gurl, need_dir=False)
                            env.safe_sudo("mv data/%s %s" % (org, data_dir))
Esempio n. 2
0
def install_snpeff(env):
    """Variant annotation and effect prediction tool.
    http://snpeff.sourceforge.net/
    """
    version = "3_4"
    genomes = []
    #genomes = ["GRCh37.74", "hg19", "GRCm38.74", "athalianaTair10"]
    url = "http://downloads.sourceforge.net/project/snpeff/" \
          "snpEff_v%s_core.zip" % version
    genome_url_base = "http://downloads.sourceforge.net/project/snpeff/"\
                      "databases/v%s/snpEff_v%s_%s.zip"
    install_dir = _symlinked_java_version_dir("snpeff", version, env)
    if install_dir:
        with _make_tmp_dir() as work_dir:
            with cd(work_dir):
                dir_name = _fetch_and_unpack(url)
                with cd(dir_name):
                    env.safe_sudo("mv *.jar %s" % install_dir)
                    env.safe_run(
                        "sed -i.bak -e 's/^data_dir.*=.*/data_dir = %s\/data/' %s"
                        % (install_dir.replace("/", "\/"), "snpEff.config"))
                    env.safe_run("chmod a+r *.config")
                    env.safe_sudo("mv *.config %s" % install_dir)
                    data_dir = os.path.join(install_dir, "data")
                    env.safe_sudo("mkdir %s" % data_dir)
                    for org in genomes:
                        if not env.safe_exists(os.path.join(data_dir, org)):
                            gurl = genome_url_base % (version, version, org)
                            _fetch_and_unpack(gurl, need_dir=False)
                            env.safe_sudo("mv data/%s %s" % (org, data_dir))
Esempio n. 3
0
def install_snpeff(env):
    version = "1_9_5"
    genomes = ["hg37.61", "mm37.61"]
    url = "http://downloads.sourceforge.net/project/snpeff/" \
          "snpEff_v%s_core.zip" % version
    genome_url_base = "http://downloads.sourceforge.net/project/snpeff/"\
                      "databases/v%s/snpEff_v%s_%s.zip"
    install_dir = _symlinked_java_version_dir("snpeff", version, env)
    if install_dir:
        with _make_tmp_dir() as work_dir:
            with cd(work_dir):
                dir_name = _fetch_and_unpack(url)
                with cd(dir_name):
                    env.safe_sudo("mv *.jar %s" % install_dir)
                    run("sed -i.bak -r -e 's/data_dir = \.\/data\//data_dir = %s\/data/' %s" %
                        (install_dir.replace("/", "\/"), "snpEff.config"))
                    run("chmod a+r *.config")
                    env.safe_sudo("mv *.config %s" % install_dir)
                    data_dir = os.path.join(install_dir, "data")
                    env.safe_sudo("mkdir %s" % data_dir)
                    for org in genomes:
                        if not exists(os.path.join(data_dir, org)):
                            gurl = genome_url_base % (version, version, org)
                            _fetch_and_unpack(gurl, need_dir=False)
                            env.safe_sudo("mv data/%s %s" % (org, data_dir))
Esempio n. 4
0
def install_snpeff(env):
    version = "1_9_5"
    genomes = ["hg37.61", "mm37.61"]
    url = "http://downloads.sourceforge.net/project/snpeff/" \
          "snpEff_v%s_core.zip" % version
    genome_url_base = "http://downloads.sourceforge.net/project/snpeff/"\
                      "databases/v%s/snpEff_v%s_%s.zip"
    install_dir = _symlinked_java_version_dir("snpeff", version, env)
    if install_dir:
        with _make_tmp_dir() as work_dir:
            with cd(work_dir):
                dir_name = _fetch_and_unpack(url)
                with cd(dir_name):
                    env.safe_sudo("mv *.jar %s" % install_dir)
                    run("sed -i.bak -r -e 's/data_dir = \.\/data\//data_dir = %s\/data/' %s"
                        % (install_dir.replace("/", "\/"), "snpEff.config"))
                    run("chmod a+r *.config")
                    env.safe_sudo("mv *.config %s" % install_dir)
                    data_dir = os.path.join(install_dir, "data")
                    env.safe_sudo("mkdir %s" % data_dir)
                    for org in genomes:
                        if not exists(os.path.join(data_dir, org)):
                            gurl = genome_url_base % (version, version, org)
                            _fetch_and_unpack(gurl, need_dir=False)
                            env.safe_sudo("mv data/%s %s" % (org, data_dir))
Esempio n. 5
0
def install_pydoop(env):
    """Install pydoop; provides Hadoop access for Python.

    http://pydoop.sourceforge.net/docs/installation.html
    """
    hadoop_version = "0.20.2"
    pydoop_version = "0.3.7_rc1"
    ubuntu_hadoop_src = "/usr/src/hadoop-0.20"
    hadoop_url = "http://apache.mirrors.hoobly.com/hadoop/core/" \
            "hadoop-%s/hadoop-%s.tar.gz" % (hadoop_version, hadoop_version)
    pydoop_url ="http://downloads.sourceforge.net/project/pydoop/" \
                "Pydoop-%s/pydoop-%s.tar.gz" % (pydoop_version, pydoop_version)
    java_home = env.java_home if env.has_key(
        "java_home") else os.environ["JAVA_HOME"]
    pyext = env.python_version_ext if env.has_key("python_version_ext") else ""

    with _make_tmp_dir() as work_dir:
        with cd(work_dir):
            pydoop_dir = _fetch_and_unpack(pydoop_url)
            # Use native supplied Hadoop source to match installed defaults. On
            # Ubuntu this is currently 0.20.2.
            if exists(ubuntu_hadoop_src):
                hadoop_dir = ubuntu_hadoop_src
                with cd(pydoop_dir):
                    sed("setup.py", "src/c", "c")
            else:
                hadoop_dir = _fetch_and_unpack(hadoop_url)
            with cd(pydoop_dir):
                export_str = "export HADOOP_VERSION=%s && export HADOOP_HOME=%s " \
                             "&& export JAVA_HOME=%s" % (hadoop_version,
                                os.path.join(os.pardir, hadoop_dir), java_home)
                run("%s && python%s setup.py build" % (export_str, pyext))
                env.safe_sudo("%s && python%s setup.py install --skip-build" %
                              (export_str, pyext))
Esempio n. 6
0
def install_pydoop(env):
    """Install pydoop; provides Hadoop access for Python.

    http://pydoop.sourceforge.net/docs/installation.html
    """
    hadoop_version = "0.20.2"
    pydoop_version = "0.3.7_rc1"
    ubuntu_hadoop_src = "/usr/src/hadoop-0.20"
    hadoop_url = "http://apache.mirrors.hoobly.com/hadoop/core/" \
            "hadoop-%s/hadoop-%s.tar.gz" % (hadoop_version, hadoop_version)
    pydoop_url ="http://downloads.sourceforge.net/project/pydoop/" \
                "Pydoop-%s/pydoop-%s.tar.gz" % (pydoop_version, pydoop_version)
    java_home = env.java_home if env.has_key("java_home") else os.environ["JAVA_HOME"]
    pyext = env.python_version_ext if env.has_key("python_version_ext") else ""

    with _make_tmp_dir() as work_dir:
        with cd(work_dir):
            pydoop_dir = _fetch_and_unpack(pydoop_url)
            # Use native supplied Hadoop source to match installed defaults. On
            # Ubuntu this is currently 0.20.2.
            if exists(ubuntu_hadoop_src):
                hadoop_dir = ubuntu_hadoop_src
                with cd(pydoop_dir):
                    sed("setup.py", "src/c", "c")
            else:
                hadoop_dir = _fetch_and_unpack(hadoop_url)
            with cd(pydoop_dir):
                export_str = "export HADOOP_VERSION=%s && export HADOOP_HOME=%s " \
                             "&& export JAVA_HOME=%s" % (hadoop_version,
                                os.path.join(os.pardir, hadoop_dir), java_home)
                run("%s && python%s setup.py build" % (export_str, pyext))
                sudo("%s && python%s setup.py install --skip-build" %
                     (export_str, pyext))
Esempio n. 7
0
def _install_tabb_tool(env, default_version, download_name, exec_names):
    version = env.get("tool_version", default_version)
    url = "%s/%s-%s.tar.bz2" \
        % (PROTEOMICS_APP_ARCHIVE_URL, download_name, version.replace(".", "_"))
    _fetch_and_unpack(url, False)
    env.safe_sudo("mkdir -p '%s/bin'" % env["system_install"])
    for exec_name in exec_names:
        env.safe_sudo("mv %s '%s/bin'" % (exec_name, env["system_install"]))
Esempio n. 8
0
def _unzip_install(pname, version, url, env, install_fn, dir_name="."):
    install_dir = _symlinked_java_version_dir(pname, version, env)
    if install_dir:
        with _make_tmp_dir() as work_dir:
            with cd(work_dir):
                _fetch_and_unpack(url, need_dir=False)
                with cd(dir_name):
                    install_fn(env, install_dir)
Esempio n. 9
0
def _install_tabb_tool(env, default_version, download_name, exec_names):
    version = env.get("tool_version", default_version)
    url = "%s/%s-%s.tar.bz2" \
        % (PROTEOMICS_APP_ARCHIVE_URL, download_name, version.replace(".", "_"))
    _fetch_and_unpack(url, False)
    env.safe_sudo("mkdir -p '%s/bin'" % env["system_install"])
    for exec_name in exec_names:
        env.safe_sudo("mv %s '%s/bin'" % (exec_name, env["system_install"]))
Esempio n. 10
0
def _unzip_install(pname, version, url, env, install_fn, dir_name="."):
    install_dir = _symlinked_java_version_dir(pname, version, env)
    if install_dir:
        with _make_tmp_dir() as work_dir:
            with cd(work_dir):
                _fetch_and_unpack(url, need_dir=False)
                with cd(dir_name):
                    install_fn(env, install_dir)
Esempio n. 11
0
def install_morpheus(env):
    url = "http://www.chem.wisc.edu/~coon/Downloads/Morpheus/latest/Morpheus.zip"  # TODO:
    install_dir = env.get("install_dir")
    share_dir = "%s/share/morpheus" % install_dir
    with _make_tmp_dir() as work_dir:
        with cd(work_dir):
            _fetch_and_unpack(url, need_dir=False)
            env.safe_sudo("cp -r Morpheus '%s'" % share_dir)
    morpheus_exes = ["morpheus_cl.exe", "Morpheus.exe"]
    for app in morpheus_exes:
        setup_wine_wrapper(env, "%s/%s" % (share_dir, app))
def install_proteowizard(env):
    url = "http://teamcity.labkey.org:8080/repository/download/bt36/77483:id/pwiz-bin-windows-x86-vc100-release-3_0_4360.tar.bz2?guest=1"
    install_dir = env.get("install_dir")
    share_dir = "%s/share/proteowizard" % install_dir
    with _make_tmp_dir() as work_dir:
        with cd(work_dir):
            _fetch_and_unpack(url, need_dir=False)
            env.safe_sudo("cp -r . '%s'" % share_dir)
    proteowizard_apps = ["msconvert", "msaccess", "chainsaw", "msdiff", "mspicture", "mscat", "txt2mzml", "MSConvertGUI", "Skyline", "Topograph", "SeeMS"]
    for app in proteowizard_apps:
        setup_wine_wrapper(env, "%s/%s" % (share_dir, app))
Esempio n. 13
0
def install_morpheus(env):
    url = "http://www.chem.wisc.edu/~coon/Downloads/Morpheus/latest/Morpheus.zip"  # TODO:
    install_dir = env.get("install_dir")
    share_dir = "%s/share/morpheus" % install_dir
    with _make_tmp_dir() as work_dir:
        with cd(work_dir):
            _fetch_and_unpack(url, need_dir=False)
            env.safe_sudo("cp -r Morpheus '%s'" % share_dir)
    morpheus_exes = ["morpheus_cl.exe", "Morpheus.exe"]
    for app in morpheus_exes:
        setup_wine_wrapper(env, "%s/%s" % (share_dir, app))
def install_multiplierz(env):
    """
    Assumes your wine environment contains an install Python 2.6
    in C:\Python26.
    """
    wine_user = _get_wine_user(env)
    env.safe_sudo("setup_proteomics_wine_env.sh", user=wine_user)
    with _make_tmp_dir() as work_dir:
        with cd(work_dir):
            _fetch_and_unpack("hg clone http://multiplierz.hg.sourceforge.net:8000/hgroot/multiplierz/multiplierz")
            with cd("multiplierz"):
                wine_prefix = _get_wine_prefix(env)
                env.safe_sudo("%s; wine %s/drive_c/Python26/python.exe setup.py install" % (_conf_wine(env), wine_prefix), user=wine_user)
def install_proteowizard(env):
    build_id = "83083"
    version = "3_0_4472"
    url = "http://teamcity.labkey.org:8080/repository/download/bt36/%s:id/pwiz-bin-windows-x86-vc100-release-%s.tar.bz2?guest=1" % (
        build_id, version)
    install_dir = env.get("install_dir")
    share_dir = "%s/share/proteowizard" % install_dir
    with _make_tmp_dir() as work_dir:
        with cd(work_dir):
            _fetch_and_unpack(url, need_dir=False)
            env.safe_sudo("cp -r . '%s'" % share_dir)
    proteowizard_apps = [
        "msconvert", "msaccess", "chainsaw", "msdiff", "mspicture", "mscat",
        "txt2mzml", "MSConvertGUI", "Skyline", "Topograph", "SeeMS"
    ]
    for app in proteowizard_apps:
        setup_wine_wrapper(env, "%s/%s" % (share_dir, app))
def install_multiplierz(env):
    """
    Assumes your wine environment contains an install Python 2.6
    in C:\Python26.
    """
    wine_user = _get_wine_user(env)
    env.safe_sudo("setup_proteomics_wine_env.sh", user=wine_user)
    with _make_tmp_dir() as work_dir:
        with cd(work_dir):
            _fetch_and_unpack(
                "hg clone http://multiplierz.hg.sourceforge.net:8000/hgroot/multiplierz/multiplierz"
            )
            with cd("multiplierz"):
                wine_prefix = _get_wine_prefix(env)
                env.safe_sudo(
                    "%s; wine %s/drive_c/Python26/python.exe setup.py install"
                    % (_conf_wine(env), wine_prefix),
                    user=wine_user)