def install_peptide_shaker(env): default_version = "0.20.1" version = env.get("tool_version", default_version) url = "http://peptide-shaker.googlecode.com/files/PeptideShaker-%s.zip" % version def install_fn(env, install_dir): _get_gist_script( env, "https://gist.github.com/jmchilton/5002161/raw/f1fe76d6e6eed99a768ed0b9f41c2d0a6a4b24b7/PeptideShaker" ) _get_gist_script( env, "https://gist.github.com/jmchilton/5002161/raw/8a17d5fb589984365284e55a98a455c2b47da54f/PeptideShakerCLI" ) # Hack for multi-user environment. env.safe_sudo("chmod -R o+w resources") env.safe_sudo("mv * '%s'" % install_dir) bin_dir = os.path.join(env.get("system_install"), "bin") env.safe_sudo("mkdir -p '%s'" % bin_dir) env.safe_sudo("ln -s '%s' %s" % (os.path.join(install_dir, "PeptideShaker"), os.path.join(bin_dir, "PeptideShaker"))) env.safe_sudo("ln -s '%s' %s" % (os.path.join(install_dir, "PeptideShakerCLI"), os.path.join(bin_dir, "PeptideShakerCLI"))) _java_install("PeptideShaker", version, url, env, install_fn)
def install_gatk(env): """GATK-lite: library for writing efficient analysis tools using next-generation sequencing data http://www.broadinstitute.org/gatk/ """ # Install main gatk executable version = "2.3-9-gdcdccbb" ext = ".tar.bz2" url = "ftp://ftp.broadinstitute.org/pub/gsa/GenomeAnalysisTK/"\ "GenomeAnalysisTKLite-%s%s" % (version, ext) _java_install("gatk", version, url, env) # Install R gsalib for report and pdf generation # XXX Currently have issues with gsalib R installation. # Need to make this into a proper R package and re-enable if False: with quiet(): have_gsalib = run( "Rscript -e '\"gsalib\" %in% installed.packages()'") if have_gsalib and "FALSE" in have_gsalib: # install dependencies for gsalib rlib_config = get_config_file(env, "r-libs.yaml").base with open(rlib_config) as in_handle: config = yaml.load(in_handle) config["bioc"] = [] config["update_packages"] = False config["cran"] = ["ggplot2", "gplots"] libraries.r_library_installer(config) # install gsalib git_repo = "git clone --depth 1 https://github.com/broadgsa/gatk.git" def install_gsalib(env): env.safe_sudo("ant gsalib") _get_install(git_repo, env, install_gsalib)
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 dl_fname = "GenomeAnalysisTK-%s.tar.bz2" % min_version with _make_tmp_dir() as work_dir: work_fname = os.path.join(work_dir, dl_fname) def manual_gatk_download(env): 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 None else: 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)
def install_picard(env): """Command-line utilities that manipulate BAM files with a Java API. http://picard.sourceforge.net/ """ version = "1.68" url = "http://downloads.sourceforge.net/project/picard/" "picard-tools/%s/picard-tools-%s.zip" % (version, version) _java_install("picard", version, url, env)
def install_gatk(env): """GATK-lite: library for writing efficient analysis tools using next-generation sequencing data http://www.broadinstitute.org/gatk/ """ # Install main gatk executable version = "2.3-9-gdcdccbb" ext = ".tar.bz2" url = "ftp://ftp.broadinstitute.org/pub/gsa/GenomeAnalysisTK/"\ "GenomeAnalysisTKLite-%s%s" % (version, ext) _java_install("gatk", version, url, env) # Install R gsalib for report and pdf generation # XXX Currently have issues with gsalib R installation. # Need to make this into a proper R package and re-enable if False: with quiet(): have_gsalib = env.safe_run("Rscript -e '\"gsalib\" %in% installed.packages()'") if have_gsalib and "FALSE" in have_gsalib: # install dependencies for gsalib rlib_config = get_config_file(env, "r-libs.yaml").base with open(rlib_config) as in_handle: config = yaml.load(in_handle) config["bioc"] = [] config["update_packages"] = False config["cran"] = ["ggplot2", "gplots"] libraries.r_library_installer(config) # install gsalib git_repo = "git clone --depth 1 https://github.com/broadgsa/gatk.git" def install_gsalib(env): env.safe_sudo("ant gsalib") _get_install(git_repo, env, install_gsalib)
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)
def install_gatk(env): """GATK: library for writing efficient analysis tools using next-generation sequencing data http://www.broadinstitute.org/gsa/wiki/index.php/Home_Page """ version = "1.6-11-g3b2fab9" ext = ".tar.bz2" url = "ftp://ftp.broadinstitute.org/pub/gsa/GenomeAnalysisTK/" "GenomeAnalysisTK-%s%s" % (version, ext) _java_install("gatk", version, url, env)
def install_gatk_queue(env): """Command-line scripting framework for defining multi-stage genomic analysis pipelines. http://www.broadinstitute.org/gsa/wiki/index.php/GATK-Queue """ version = "1.6-11-g3b2fab9" ext = ".tar.bz2" url = "ftp://ftp.broadinstitute.org/pub/gsa/Queue/" "Queue-%s%s" % (version, ext) _java_install("gatk_queue", version, url, env)
def install_picard(env): """Command-line utilities that manipulate BAM files with a Java API. http://picard.sourceforge.net/ """ version = "1.96" url = "http://downloads.sourceforge.net/project/picard/" \ "picard-tools/%s/picard-tools-%s.zip" % (version, version) _java_install("picard", version, url, env)
def install_gatk_queue(env): """Command-line scripting framework for defining multi-stage genomic analysis pipelines. http://www.broadinstitute.org/gsa/wiki/index.php/GATK-Queue """ version = "2.1-1-g426e8e7" ext = ".tar.bz2" url = "ftp://ftp.broadinstitute.org/pub/gsa/Queue/"\ "QueueLite-%s%s" % (version, ext) _java_install("gatk_queue", version, url, env)
def install_alientrimmer(env): """ Adapter removal tool http://www.ncbi.nlm.nih.gov/pubmed/23912058 """ version = "0.3.2" url = ("ftp://ftp.pasteur.fr/pub/gensoft/projects/AlienTrimmer/" "AlienTrimmer_%s.tar.gz" % version) _java_install("AlienTrimmer", version, url, env)
def install_gatk(env): """GATK-lite: library for writing efficient analysis tools using next-generation sequencing data http://www.broadinstitute.org/gatk/ """ version = "2.1-1-g426e8e7" ext = ".tar.bz2" url = "ftp://ftp.broadinstitute.org/pub/gsa/GenomeAnalysisTK/"\ "GenomeAnalysisTKLite-%s%s" % (version, ext) _java_install("gatk", version, url, env)
def install_gatk(env): """GATK-lite: library for writing efficient analysis tools using next-generation sequencing data http://www.broadinstitute.org/gatk/ """ # Install main gatk executable version = "2.3-9-gdcdccbb" ext = ".tar.bz2" url = "ftp://*****:*****@ftp.broadinstitute.org/pub/gsa/GenomeAnalysisTK/"\ "GenomeAnalysisTKLite-%s%s" % (version, ext) _java_install("gatk", version, url, env)
def install_bio4j(env): """Bio4j graph based database: http://www.bio4j.com/ """ version = "0.7" url = "https://s3-eu-west-1.amazonaws.com/bio4j-public/releases/" \ "{v}/bio4j-{v}.zip".format(v=version) def _install_fn(env, install_dir): targets = ["conf", "doc", "jars", "lib", "README"] for x in targets: env.safe_sudo("mv {0} {1}".format(x, install_dir)) _java_install("bio4j", version, url, env, install_fn=_install_fn)
def install_tint_proteomics_scripts(env): default_version = "1.19.19" version = env.get("tool_version", default_version) url = "http://artifactory.msi.umn.edu/simple/ext-release-local/msi/umn/edu/tint-proteomics-scripts/%s/tint-proteomics-scripts-%s.zip" % (version, version) def install_fn(env, install_dir): env.safe_sudo("mv * '%s'" % install_dir) bin_dir = _get_bin_dir(env) for script in ["ITraqScanSummarizer", "LTQ-iQuant", "LTQ-iQuant-cli", "MgfFormatter"]: env.safe_sudo("ln -s '%s' %s" % (os.path.join(install_dir, script), bin_dir)) env.safe_sudo("chmod +x '%s'/*" % bin_dir) _java_install("tint-proteomics-scripts", version, url, env, install_fn)
def install_mzmine(env): default_version = "2.9.1" version = env.get("tool_version", default_version) point_version = version.rsplit('.', 1)[0] url = "http://downloads.sourceforge.net/project/mzmine/mzmine2/%s/MZmine-%s.zip" % (point_version, version) def install_fn(env, install_dir): env.safe_sudo("mv * '%s'" % install_dir) bin_dir = os.path.join(env.get("system_install"), "bin") env.safe_sudo("mkdir -p '%s'" % bin_dir) env.safe_sudo("ln -s '%s' %s" % (os.path.join(install_dir, "startMZmine_Linux.sh"), os.path.join(bin_dir, "MZmine"))) _java_install("mzmine2", version, url, env, install_fn)
def install_peptide_shaker(env): default_version = "0.19.0" version = env.get("tool_version", default_version) url = "http://peptide-shaker.googlecode.com/files/PeptideShaker-%s.zip" % version def install_fn(env, install_dir): _get_gist_script(env, "https://gist.github.com/jmchilton/5002161/raw/ed9b48a0f01cb975f8a9e6e126965c955bbee848/PeptideShaker") _get_gist_script(env, "https://gist.github.com/jmchilton/5002161/raw/8a17d5fb589984365284e55a98a455c2b47da54f/PeptideShakerCLI") env.safe_sudo("mv * '%s'" % install_dir) bin_dir = os.path.join(env.get("system_install"), "bin") env.safe_sudo("mkdir -p '%s'" % bin_dir) env.safe_sudo("ln -s '%s' %s" % (os.path.join(install_dir, "PeptideShaker"), os.path.join(bin_dir, "PeptideShaker"))) env.safe_sudo("ln -s '%s' %s" % (os.path.join(install_dir, "PeptideShakerCLI"), os.path.join(bin_dir, "PeptideShakerCLI"))) _java_install("PeptideShaker", version, url, env, install_fn)
def install_pgdspider(env): """PGDSpider format conversion for population genetics programs. """ version = "2.0.1.2" url = "http://www.cmpg.unibe.ch/software/PGDSpider/PGDSpider_{v}.zip".format( v=version) def _install_fn(env, install_dir): env.safe_sudo("mv *.jar %s" % install_dir) bin_dir = os.path.join(env.system_install, "bin") exe_file = "PGDSpider2.sh" jar = "PGDSpider2.jar" sed(exe_file, jar, "{dir}/{jar}".format(dir=install_dir, jar=jar)) run("chmod a+x {0}".format(exe_file)) env.safe_sudo("mv {exe} {bin}".format(exe=exe_file, bin=bin_dir)) _java_install("PGDSpider", version, url, env, install_fn=_install_fn)
def install_mzmine(env): default_version = "2.10" version = env.get("tool_version", default_version) url = "http://downloads.sourceforge.net/project/mzmine/mzmine2/%s/MZmine-%s.zip" % (version, version) def install_fn(env, install_dir): ## Enhanced MZmine startup script that works when used a symbolic link and tailored for CloudBioLinux. _get_gist_script(env, "https://gist.github.com/jmchilton/5474421/raw/15f3b817fa82d5f5e2143ee08bd248efee951d6a/MZmine") # Hack for multi-user environment. env.safe_sudo("chmod -R o+w conf") env.safe_sudo("mv * '%s'" % install_dir) bin_dir = os.path.join(env.get("system_install"), "bin") env.safe_sudo("mkdir -p '%s'" % bin_dir) env.safe_sudo("ln -s '%s' %s" % (os.path.join(install_dir, "MZmine"), os.path.join(bin_dir, "MZmine"))) _java_install("mzmine2", version, url, env, install_fn)
def install_peptide_shaker(env): default_version = "0.20.0" version = env.get("tool_version", default_version) url = "http://peptide-shaker.googlecode.com/files/PeptideShaker-%s.zip" % version def install_fn(env, install_dir): _get_gist_script(env, "https://gist.github.com/jmchilton/5002161/raw/f1fe76d6e6eed99a768ed0b9f41c2d0a6a4b24b7/PeptideShaker") _get_gist_script(env, "https://gist.github.com/jmchilton/5002161/raw/8a17d5fb589984365284e55a98a455c2b47da54f/PeptideShakerCLI") # Hack for multi-user environment. env.safe_sudo("chmod -R o+w resources") env.safe_sudo("mv * '%s'" % install_dir) bin_dir = os.path.join(env.get("system_install"), "bin") env.safe_sudo("mkdir -p '%s'" % bin_dir) env.safe_sudo("ln -s '%s' %s" % (os.path.join(install_dir, "PeptideShaker"), os.path.join(bin_dir, "PeptideShaker"))) env.safe_sudo("ln -s '%s' %s" % (os.path.join(install_dir, "PeptideShakerCLI"), os.path.join(bin_dir, "PeptideShakerCLI"))) _java_install("PeptideShaker", version, url, env, install_fn)
def install_gatk(env): """GATK-lite: library for writing efficient analysis tools using next-generation sequencing data http://www.broadinstitute.org/gatk/ """ # Install main gatk executable version = "2.3-9-gdcdccbb" ext = ".tar.bz2" url = "ftp://ftp.broadinstitute.org/pub/gsa/GenomeAnalysisTK/"\ "GenomeAnalysisTKLite-%s%s" % (version, ext) _java_install("gatk", version, url, env) # Install R gsalib for report and pdf generation with quiet(): have_gsalib = run("Rscript -e '\"gsalib\" %in% installed.packages()'") if have_gsalib and "FALSE" in have_gsalib: git_repo = "git clone --depth 1 git://github.com/broadgsa/gatk.git" def install_gsalib(env): env.safe_sudo("ant gsalib") _get_install(git_repo, env, install_gsalib)
def install_pgdspider(env): """PGDSpider format conversion for population genetics programs. http://www.cmpg.unibe.ch/software/PGDSpider/ """ if os.path.exists(os.path.join(shared._get_bin_dir(env), "PGDSpider2.sh")): return version = "2.0.2.0" url = "http://www.cmpg.unibe.ch/software/PGDSpider/PGDSpider_{v}.zip".format( v=version) def _install_fn(env, install_dir): env.safe_sudo("mv *.jar %s" % install_dir) bin_dir = shared._get_bin_dir(env) exe_file = "PGDSpider2.sh" jar = "PGDSpider2.jar" env.safe_sed(exe_file, jar, "{dir}/{jar}".format(dir=install_dir, jar=jar)) env.safe_run("chmod a+x {0}".format(exe_file)) env.safe_sudo("mv {exe} {bin}".format(exe=exe_file, bin=bin_dir)) _java_install("PGDSpider", version, url, env, install_fn=_install_fn)
def install_tint_proteomics_scripts(env): default_version = "1.19.19" version = env.get("tool_version", default_version) url = "http://artifactory.msi.umn.edu/simple/ext-release-local/msi/umn/edu/tint-proteomics-scripts/%s/tint-proteomics-scripts-%s.zip" % ( version, version) def install_fn(env, install_dir): env.safe_sudo("mv * '%s'" % install_dir) bin_dir = _get_bin_dir(env) for script in [ "ITraqScanSummarizer", "LTQ-iQuant", "LTQ-iQuant-cli", "MgfFormatter" ]: env.safe_sudo("ln -s '%s' %s" % (os.path.join(install_dir, script), bin_dir)) env.safe_sudo("chmod +x '%s'/*" % bin_dir) _java_install("tint-proteomics-scripts", version, url, env, install_fn)
def install_mzmine(env): default_version = "2.10" version = env.get("tool_version", default_version) url = "http://downloads.sourceforge.net/project/mzmine/mzmine2/%s/MZmine-%s.zip" % ( version, version) def install_fn(env, install_dir): ## Enhanced MZmine startup script that works when used a symbolic link and tailored for CloudBioLinux. _get_gist_script( env, "https://gist.github.com/jmchilton/5474421/raw/15f3b817fa82d5f5e2143ee08bd248efee951d6a/MZmine" ) # Hack for multi-user environment. env.safe_sudo("chmod -R o+w conf") env.safe_sudo("mv * '%s'" % install_dir) bin_dir = os.path.join(env.get("system_install"), "bin") env.safe_sudo("mkdir -p '%s'" % bin_dir) env.safe_sudo("ln -s '%s' %s" % (os.path.join( install_dir, "MZmine"), os.path.join(bin_dir, "MZmine"))) _java_install("mzmine2", version, url, env, install_fn)
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.6-5" version = "%s-gba531bd" % min_version dl_fname = "GenomeAnalysisTK-%s.tar.bz2" % min_version with _make_tmp_dir() as work_dir: work_fname = os.path.join(work_dir, dl_fname) def manual_gatk_download(env): 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 raw_input("**** Press <enter> when complete ") 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)
def install_gatk(env): version = "1.4-8-g63b7a70" ext = ".tar.bz2" url = "ftp://ftp.broadinstitute.org/pub/gsa/GenomeAnalysisTK/" "GenomeAnalysisTK-%s%s" % (version, ext) _java_install("gatk", version, url, env)
def install_picard(env): version = "1.52" url = "http://downloads.sourceforge.net/project/picard/" \ "picard-tools/%s/picard-tools-%s.zip" % (version, version) _java_install("picard", version, url, env)
def install_gatk(env): version = "1.1-35-ge253f6f" ext = ".tar.bz2" url = "ftp://ftp.broadinstitute.org/pub/gsa/GenomeAnalysisTK/"\ "GenomeAnalysisTK-%s%s" % (version, ext) _java_install("gatk", version, url, env)
def install_gatk_queue(env): version = "1.0.4052" ext = ".tar.bz2" url = "ftp://ftp.broadinstitute.org/pub/gsa/Queue/"\ "Queue-%s%s" % (version, ext) _java_install("gatk_queue", version, url, env)
def install_picard(env): version = "1.60" url = "http://downloads.sourceforge.net/project/picard/" "picard-tools/%s/picard-tools-%s.zip" % (version, version) _java_install("picard", version, url, env)
def install_gatk_queue(env): version = "1.4-8-g63b7a70" ext = ".tar.bz2" url = "ftp://ftp.broadinstitute.org/pub/gsa/Queue/" "Queue-%s%s" % (version, ext) _java_install("gatk_queue", version, url, env)