• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python shared._make_tmp_dir函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中shared._make_tmp_dir函数的典型用法代码示例。如果您正苦于以下问题:Python _make_tmp_dir函数的具体用法?Python _make_tmp_dir怎么用?Python _make_tmp_dir使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了_make_tmp_dir函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: install_novoalign

def install_novoalign(env):
    base_version = "V2.07.09"
    cs_version = "V1.01.09"
    _url = "http://www.novocraft.com/downloads/%s/" % base_version
    ref_url = "http://www.novocraft.com/main/downloadpage.php"
    base_url = "%s/novocraft%s.gcc.tar.gz" % (_url, base_version)
    cs_url = "%s/novoalignCS%s.gcc.tar.gz" % (_url, cs_version)
    install_dir = os.path.join(env.system_install, "bin")
    with _make_tmp_dir() as work_dir:
        with cd(work_dir):
            _wget_with_cookies(ref_url, base_url)
            run("tar -xzvpf novocraft%s.gcc.tar.gz" % base_version)
            with cd("novocraft"):
                for fname in ["isnovoindex", "novo2maq", "novo2paf",
                        "novo2sam.pl", "novoalign", "novobarcode",
                        "novoindex", "novope2bed.pl", "novorun.pl",
                        "novoutil"]:
                    env.safe_sudo("mv %s %s" % (fname, install_dir))
    with _make_tmp_dir() as work_dir:
        with cd(work_dir):
            _wget_with_cookies(ref_url, cs_url)
            run("tar -xzvpf novoalignCS%s.gcc.tar.gz" % cs_version)
            with cd("novoalignCS"):
                for fname in ["novoalignCS"]:
                    env.safe_sudo("mv %s %s" % (fname, install_dir))
开发者ID:leebryanp,项目名称:gists,代码行数:25,代码来源:bio_nextgen.py


示例2: install_novoalign

def install_novoalign(env):
    """Novoalign short read aligner using Needleman-Wunsch algorithm with affine gap penalties.
    http://www.novocraft.com/main/index.php
    """
    base_version = "V3.00.02"
    cs_version = "V1.03.02"
    _url = "http://www.novocraft.com/downloads/%s/" % base_version
    ref_url = "http://www.novocraft.com/main/downloadpage.php"
    base_url = "%s/novocraft%s.gcc.tar.gz" % (_url, base_version)
    cs_url = "%s/novoalignCS%s.gcc.tar.gz" % (_url, cs_version)
    install_dir = shared._get_bin_dir(env)
    with _make_tmp_dir() as work_dir:
        with cd(work_dir):
            _wget_with_cookies(ref_url, base_url)
            env.safe_run("tar -xzvpf novocraft%s.gcc.tar.gz" % base_version)
            with cd("novocraft"):
                for fname in ["isnovoindex", "novo2maq", "novo2paf",
                              "novo2sam.pl", "novoalign", "novobarcode",
                              "novoindex", "novope2bed.pl", "novorun.pl",
                              "novoutil"]:
                    env.safe_sudo("mv %s %s" % (fname, install_dir))
    with _make_tmp_dir() as work_dir:
        with cd(work_dir):
            _wget_with_cookies(ref_url, cs_url)
            env.safe_run("tar -xzvpf novoalignCS%s.gcc.tar.gz" % cs_version)
            with cd("novoalignCS"):
                for fname in ["novoalignCS"]:
                    env.safe_sudo("mv %s %s" % (fname, install_dir))
开发者ID:ccp0101,项目名称:cloudbiolinux,代码行数:28,代码来源:bio_nextgen.py


示例3: install_pydoop

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))
开发者ID:jingwen,项目名称:bcbb,代码行数:33,代码来源:distributed.py


示例4: install_snpeff

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))
开发者ID:leebryanp,项目名称:gists,代码行数:25,代码来源:bio_nextgen.py


示例5: install_snpeff

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))
开发者ID:ccp0101,项目名称:cloudbiolinux,代码行数:29,代码来源:bio_nextgen.py


示例6: install_gatk_protected

def install_gatk_protected(env):
    """Installation script for recent versions of GATK. Requires manual download from user.
    http://www.broadinstitute.org/gatk/
    """
    min_version = "2.7-2"
    version = "%s-g6bda569" % min_version
    if shared._symlinked_dir_exists("gatk", version, env, "java"):
        return
    dl_fname = "GenomeAnalysisTK-%s.tar.bz2" % min_version
    print "**** Manual intervention needed"
    print "Recent GATK versions require manual download from the GATK website"
    print "Please retrieve the latest versions from:"
    print "http://www.broadinstitute.org/gatk/download"
    print "and place %s in your home directory" % dl_fname
    userin = raw_input("**** Press <enter> when complete or type 'skip' to avoid the installation: ")
    if userin.find("skip") >= 0:
        return
    with _make_tmp_dir() as work_dir:
        work_fname = os.path.join(work_dir, dl_fname)
        def manual_gatk_download(env):
            try:
                fname = env.safe_run_output("ls $HOME/%s" % dl_fname)
            except:
                raise IOError("Could not find %s in your home directory. Please download and retry" % dl_fname)
            env.safe_put(fname, work_fname)
            return work_fname
        _java_install("gatk", version, work_fname, env, pre_fetch_fn=manual_gatk_download)
开发者ID:ccp0101,项目名称:cloudbiolinux,代码行数:27,代码来源:bio_nextgen.py


示例7: install_anaconda

def install_anaconda(env):
    """Pre-packaged Anaconda Python installed from Continuum.
    http://docs.continuum.io/anaconda/index.html
    """
    version = "2.0.0"
    outdir = os.path.join(env.system_install, "anaconda")
    if env.distribution in ["ubuntu", "centos", "scientificlinux", "debian", "arch", "suse"]:
        platform = "Linux"
    elif env.distribution in ["macosx"]:
        platform = "MacOSX"
    else:
        raise ValueError("Unexpected distribution: %s" % env.distribution)
    url = "http://09c8d0b2229f813c1b93-c95ac804525aac4b6dba79b00b39d1d3.r79.cf1.rackcdn.com/" \
          "Anaconda-%s-%s-x86_64.sh" % (version, platform)
    if not env.safe_exists(outdir):
        with _make_tmp_dir() as work_dir:
            with cd(work_dir):
                installer = shared._remote_fetch(env, url)
                env.safe_sed(os.path.basename(url), "more <<EOF", "cat  <<EOF")
                env.safe_sudo("echo -e '\nyes\n%s\nyes\n' | bash %s" % (outdir, installer))
                env.safe_sudo("chown -R %s %s" % (env.user, outdir))
                comment_line = "# added by Ananconda %s installer" % version
                if not env.safe_contains(env.shell_config, comment_line):
                    env.safe_append(env.shell_config, comment_line)
                    env.safe_append(env.shell_config, "export PATH=%s/bin:$PATH" % outdir)
                # remove curl library with broken certificates
                env.safe_run("%s/bin/conda remove --yes curl" % outdir)
                env.safe_run("%s/bin/conda install --yes pip" % outdir)
开发者ID:Fredus14,项目名称:cloudbiolinux,代码行数:28,代码来源:bio_general.py


示例8: _unzip_install

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)
开发者ID:janusz005,项目名称:cloudbiolinux,代码行数:8,代码来源:bio_proteomics.py


示例9: install_solexaqa

def install_solexaqa(env):
    version = "1.4"
    url = "http://downloads.sourceforge.net/project/solexaqa/src/" "SolexaQA_v.%s.pl.zip" % version
    with _make_tmp_dir() as work_dir:
        with cd(work_dir):
            run("wget %s" % url)
            run("unzip %s" % os.path.basename(url))
            env.safe_sudo("mv SolexaQA.pl %s" % os.path.join(env.system_install, "bin"))
开发者ID:hjanime,项目名称:cloudbiolinux,代码行数:8,代码来源:bio_nextgen.py


示例10: _download_executables

def _download_executables(env, base_url, tools):
    install_dir = shared._get_bin_dir(env)
    with _make_tmp_dir() as work_dir:
        with cd(work_dir):
            for tool in tools:
                final_tool = os.path.join(install_dir, tool)
                if not env.safe_exists(final_tool) and shared._executable_not_on_path(tool):
                    shared._remote_fetch(env, "%s%s" % (base_url, tool))
                    env.safe_sudo("cp -f %s %s" % (tool, install_dir))
开发者ID:ccp0101,项目名称:cloudbiolinux,代码行数:9,代码来源:bio_nextgen.py


示例11: _install_tar_ball

def _install_tar_ball(env, url, tool):
    install_dir = shared._get_bin_dir(env)
    install_dir_parent = os.path.abspath(os.path.join(install_dir, os.pardir))
    with _make_tmp_dir() as work_dir:
        with cd(work_dir):
            _remote_fetch(env, url + tool + ".tar.gz")
            env.safe_sudo("tar -xzvpf %s.tar.gz -C %s" % (tool, install_dir_parent))
            env.safe_sudo("chown -R %s:%s '%s'" % (env.user, env.user, install_dir))
            env.safe_sudo("chgrp -R %s '%s'" % (env.user, install_dir))
开发者ID:jianwuwang,项目名称:cloudbiolinux,代码行数:9,代码来源:bio_kepler.py


示例12: install_leinengin

def install_leinengin(env):
    """Standard clojure build tool: http://github.com/technomancy/leiningen
    """
    with _make_tmp_dir() as work_dir:
        with cd(work_dir):
            run("wget --no-check-certificate https://github.com/technomancy/leiningen/raw/stable/bin/lein")
            run("chmod a+rwx lein")
            env.safe_sudo("mv lein %s" % os.path.join(env.system_install, "bin"))
            run("lein self-install")
开发者ID:OpenSourceCancer,项目名称:cloudbiolinux,代码行数:9,代码来源:java.py


示例13: install_bx_python

def install_bx_python(env):
    """Install bx-python
    """
    clone_url = "http://bitbucket.org/james_taylor/bx-python"
    with _make_tmp_dir() as work_dir:
        with cd(work_dir):
            run("hg clone %s" % clone_url)
            with cd(os.path.split(clone_url)[-1]):
                run("python setup.py build")
                sudo("python setup.py install --skip-build")
开发者ID:CosteaPaul,项目名称:bcbb,代码行数:10,代码来源:python.py


示例14: install_leinengin

def install_leinengin(env):
    """Clojure tool for project configuration and automation.
    http://github.com/technomancy/leiningen
    """
    with _make_tmp_dir() as work_dir:
        with cd(work_dir):
            run("wget --no-check-certificate https://raw.github.com/technomancy/leiningen/preview/bin/lein")
            run("chmod a+rwx lein")
            env.safe_sudo("mv lein %s" % os.path.join(env.system_install, "bin"))
            run("lein self-install")
开发者ID:i000,项目名称:cloudbiolinux,代码行数:10,代码来源:java.py


示例15: install_mutect

def install_mutect(env):
    version = "1.1.5"
    url = "https://github.com/broadinstitute/mutect/releases/download/" \
          "%s/muTect-%s-bin.zip" % (version, version)
    install_dir = _symlinked_java_version_dir("mutect", version, env)
    if install_dir:
        with _make_tmp_dir() as work_dir:
            with cd(work_dir):
                out_file = shared._remote_fetch(env, url)
                env.safe_run("unzip %s" % out_file)
                env.safe_sudo("mv *.jar version.txt LICENSE* %s" % install_dir)
开发者ID:ccp0101,项目名称:cloudbiolinux,代码行数:11,代码来源:bio_nextgen.py


示例16: install_mutect

def install_mutect(env):
    version = "1.1.5"
    url = "https://github.com/broadinstitute/mutect/releases/download/" \
          "%s/muTect-%s-bin.zip" % (version, version)
    install_dir = _symlinked_java_version_dir("mutect", version, env)
    if install_dir:
        with _make_tmp_dir() as work_dir:
            with cd(work_dir):
                env.safe_run("wget --no-check-certificate %s" % url)
                env.safe_run("unzip %s" % os.path.basename(url))
                env.safe_sudo("mv *.jar version.txt LICENSE* %s" % install_dir)
开发者ID:tanglingfung,项目名称:cloudbiolinux,代码行数:11,代码来源:bio_nextgen.py


示例17: install_sambamba

def install_sambamba(env):
    """Library for working with SAM/BAM formats written in D programming language
    https://github.com/lomereiter/sambamba/wiki
    """
    version = "0.2.9"
    url = "https://github.com/downloads/lomereiter/sambamba/" "sambamba-{0}_amd64.deb".format(version)
    if env.distribution in ["ubuntu", "debian"] and env.is_64bit:
        with _make_tmp_dir() as work_dir:
            with cd(work_dir):
                run("wget {0}".format(url))
                env.safe_sudo("sudo dpkg -i {0}".format(os.path.basename(url)))
开发者ID:nldowell,项目名称:cloudbiolinux,代码行数:11,代码来源:bio_nextgen.py


示例18: install_leiningen

def install_leiningen(env):
    """Clojure tool for project configuration and automation.
    http://github.com/technomancy/leiningen
    """
    bin_dir = os.path.join(env.system_install, "bin")
    with _make_tmp_dir() as work_dir:
        with cd(work_dir):
            shared._remote_fetch(env, "https://raw.github.com/technomancy/leiningen/stable/bin/lein")
            env.safe_run("chmod a+rwx lein")
            env.safe_sudo("mv lein %s" % bin_dir)
            env.safe_run("%s/lein" % bin_dir)
开发者ID:Altoros,项目名称:cloudbiolinux,代码行数:11,代码来源:java.py


示例19: install_morpheus

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))
开发者ID:Altoros,项目名称:cloudbiolinux,代码行数:11,代码来源:bio_proteomics_wine.py


示例20: install_solexaqa

def install_solexaqa(env):
    """SolexaQA creates visual representations of data quality from FASTQ files.
    http://solexaqa.sourceforge.net/
    """
    version = "1.4"
    url = "http://downloads.sourceforge.net/project/solexaqa/src/" "SolexaQA_v.%s.pl.zip" % version
    with _make_tmp_dir() as work_dir:
        with cd(work_dir):
            run("wget %s" % url)
            run("unzip %s" % os.path.basename(url))
            env.safe_sudo("mv SolexaQA.pl %s" % os.path.join(env.system_install, "bin"))
开发者ID:hmenager,项目名称:cloudbiolinux,代码行数:11,代码来源:bio_nextgen.py



注:本文中的shared._make_tmp_dir函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python shared._symlinked_java_version_dir函数代码示例发布时间:2022-05-27
下一篇:
Python shared._make_copy函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap