本文整理汇总了Python中shared._fetch_and_unpack函数的典型用法代码示例。如果您正苦于以下问题:Python _fetch_and_unpack函数的具体用法?Python _fetch_and_unpack怎么用?Python _fetch_and_unpack使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_fetch_and_unpack函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: 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
示例2: 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
示例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_tabb_tool
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"]))
开发者ID:janusz005,项目名称:cloudbiolinux,代码行数:8,代码来源:bio_proteomics.py
示例5: _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
示例6: 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
示例7: install_proteowizard
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))
开发者ID:BishuDas,项目名称:cloudbiolinux,代码行数:11,代码来源:bio_proteomics_wine.py
示例8: install_multiplierz
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)
开发者ID:BishuDas,项目名称:cloudbiolinux,代码行数:13,代码来源:bio_proteomics_wine.py
注:本文中的shared._fetch_and_unpack函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论