def install_mosaik(env): """MOSAIK: reference-guided aligner for next-generation sequencing technologies http://code.google.com/p/mosaik-aligner/ """ version = "2.1.73" url = "http://mosaik-aligner.googlecode.com/files/" "MOSAIK-%s-binary.tar" % version _get_install(url, env, _make_copy("find -perm -100 -type f", do_make=False))
def install_protvis(env): """ Installs Andrew Brock's proteomics visualize tool. https://bitbucket.org/Andrew_Brock/proteomics-visualise/ """ _setup_protvis_env(env) default_revision = "8cc6af1c492c" protvis_home = env["protvis_home"] revision = env.get("protvis_revision", default_revision) url = _get_bitbucket_download_url(revision, "https://bitbucket.org/Andrew_Brock/proteomics-visualise") galaxy_data_dir = env.get('galaxy_data_dir', "/mnt/galaxyData/") protvis_converted_files_dir = env.get('protvis_converted_files_dir') env.safe_sudo("sudo apt-get -y --force-yes install libxml2-dev libxslt-dev") def _make(env): env.safe_sudo("rsync -avur --delete-after . %s" % (protvis_home)) _chown_galaxy(env, protvis_home) with cd(protvis_home): env.safe_sudo("./setup.sh", user=env.get("galaxy_user", "galaxy")) _get_install(url, env, _make) _write_to_file('''GALAXY_ROOT = "%s" PATH_WHITELIST = ["%s/files/", "%s"] CONVERTED_FILES = "%s" ''' % (env.galaxy_home, galaxy_data_dir, protvis_converted_files_dir, protvis_converted_files_dir), "%s/conf.py" % protvis_home, 0755) _setup_protvis_service(env)
def install_gmap(env): """GMAP and GSNAP: A Genomic Mapping and Alignment Program for mRNA EST and short reads. http://research-pub.gene.com/gmap/ """ version = "2012-11-09" url = "http://research-pub.gene.com/gmap/src/gmap-gsnap-%s.tar.gz" % version _get_install(url, env, _configure_make)
def install_bedtools(env): """A flexible suite of utilities for comparing genomic features. https://code.google.com/p/bedtools/ """ version = "github" repository = "git clone git://github.com/arq5x/bedtools.git" _get_install(repository, env, _make_copy("ls -1 bin/*"))
def install_lumpy(env): """a general probabilistic framework for structural variant discovery https://github.com/arq5x/lumpy-sv """ version = "fca4706573" repository = "git clone https://github.com/arq5x/lumpy-sv.git" _get_install(repository, env, _make_copy("ls -1 bin/*"), revision=version)
def install_bedtools(env): """A flexible suite of utilities for comparing genomic features. https://code.google.com/p/bedtools/ """ version = "2.17.0" url = "https://bedtools.googlecode.com/files/" "BEDTools.v%s.tar.gz" % version _get_install(url, env, _make_copy("ls -1 bin/*"))
def install_transproteomic_pipeline(env): """ """ ## version should be of form X.X.X-codename default_version = "4.6.2-occupy" version = env.get("tool_version", default_version) version_parts = re.match("(\d\.\d)\.(\d)-(.*)", version) major_version = version_parts.group(1) revision = version_parts.group(2) codename = version_parts.group(3) if revision == "0": download_rev = "" else: download_rev = ".%s" % revision download_version = ("%s%s" % (major_version, download_rev)) url_pieces = (major_version, codename, revision, download_version) url = 'http://sourceforge.net/projects/sashimi/files/Trans-Proteomic Pipeline (TPP)/TPP v%s (%s) rev %s/TPP-%s.tgz' % url_pieces #install_dir = os.path.join(env["system_install"], "bin") def _chdir_src(work_cmd): def do_work(env): with cd("src"): append("Makefile.config.incl", "TPP_ROOT=%s/" % env["system_install"]) append("Makefile.config.incl", "TPP_WEB=/tpp/") append("Makefile.config.incl", "XSLT_PROC=/usr/bin/xsltproc") append("Makefile.config.incl", "CGI_USERS_DIR=${TPP_ROOT}cgi-bin") work_cmd(env) return do_work def _make(env): run("make") env.safe_sudo("make install") _get_install(url, env, _chdir_src(_make))
def install_macs(env): """Model-based Analysis for ChIP-Seq. http://liulab.dfci.harvard.edu/MACS/ """ version = "1.4.2" url = "https://github.com/downloads/taoliu/MACS/" "MACS-%s.tar.gz" % version _get_install(url, env, _python_make)
def install_samtools(env): """SAM Tools provide various utilities for manipulating alignments in the SAM format. http://samtools.sourceforge.net/ """ version = "0.1.18" url = "http://downloads.sourceforge.net/project/samtools/samtools/" "%s/samtools-%s.tar.bz2" % (version, version) _get_install(url, env, _make_copy("find -perm -100 -type f"))
def install_tabix(env): """Generic indexer for TAB-delimited genome position files http://samtools.sourceforge.net/tabix.shtml """ version = "0.2.6" url = "http://downloads.sourceforge.net/project/samtools/tabix/tabix-%s.tar.bz2" % version _get_install(url, env, _make_copy("ls -1 tabix bgzip"))
def install_snap(env): """Scalable Nucleotide Alignment Program http://snap.cs.berkeley.edu/ """ version = "0.15" url = "http://github.com/downloads/amplab/snap/" "snap-%s-linux.tar.gz" % version _get_install(url, env, _make_copy("find -perm -100 -type f", do_make=False))
def install_omssa(env): print "Installing OMSSA" default_version = "2.1.9" version = env.get("tool_version", default_version) url = 'ftp://ftp.ncbi.nih.gov/pub/lewisg/omssa/%s/omssa-%s.linux.tar.gz' % (version, version) env.safe_sudo("mkdir -p '%s'" % env["system_install"]) _get_install(url, env, _make_copy(find_cmd="find -perm -100 -name 'omssa*'", do_make=False))
def install_bowtie2(env): """bowtie2 short read aligner, with gap support. http://bowtie-bio.sourceforge.net/bowtie2/index.shtml """ version = "2.0.0-beta6" url = "http://downloads.sourceforge.net/project/bowtie-bio/bowtie2/%s/" "bowtie2-%s-source.zip" % (version, version) _get_install(url, env, _make_copy("find -perm -100 -name 'bowtie2*'"))
def install_s3fs(env): """FUSE-based file system backed by Amazon S3. https://code.google.com/p/s3fs/ """ version = "1.61" url = "http://s3fs.googlecode.com/files/s3fs-{0}.tar.gz".format(version) _get_install(url, env, _configure_make)
def install_freebayes(env): repository = "git clone --recursive git://github.com/ekg/freebayes.git" def _fix_library_order(env): sed("vcflib/tabixpp/Makefile", "-ltabix", "-ltabix -lz") _get_install(repository, env, _make_copy("ls -1 bin/*"), post_unpack_fn=_fix_library_order)
def install_varianttools(env): version = "1.0.1" version_ext = "a" url = "http://downloads.sourceforge.net/project/varianttools/" "{ver}/variant_tools-{ver}{ext}.tar.gz".format( ver=version, ext=version_ext ) _get_install(url, env, _python_make)
def install_gnu_parallel(env): """GNU parallel: build and execute command lines from standard input in parallel. https://savannah.gnu.org/projects/parallel/ """ version = "20130122" url = "ftp://ftp.gnu.org/gnu/parallel/parallel-%s.tar.bz2" % version _get_install(url, env, _configure_make)
def install_samtools(env): """SAM Tools provide various utilities for manipulating alignments in the SAM format. http://samtools.sourceforge.net/ """ default_version = "0.1.19" version = env.get("tool_version", default_version) if versioncheck.up_to_date(env, "samtools", version, stdout_flag="Version:"): env.logger.info("samtools version {0} is up to date; not installing" .format(version)) return url = "http://downloads.sourceforge.net/project/samtools/samtools/" \ "%s/samtools-%s.tar.bz2" % (version, version) def _safe_ncurses_make(env): """Combine samtools, removing ncurses refs if not present on system. """ with settings(warn_only=True): result = env.safe_run("make") # no ncurses, fix Makefile and rebuild if result.failed: env.safe_sed("Makefile", "-D_CURSES_LIB=1", "-D_CURSES_LIB=0") env.safe_sed("Makefile", "-lcurses", "# -lcurses") env.safe_run("make clean") env.safe_run("make") install_dir = shared._get_bin_dir(env) for fname in env.safe_run_output("ls -1 samtools bcftools/bcftools bcftools/vcfutils.pl misc/wgsim").split("\n"): env.safe_sudo("cp -f %s %s" % (fname.rstrip("\r"), install_dir)) _get_install(url, env, _safe_ncurses_make)
def install_abyss(env): # XXX check for no sparehash on non-ubuntu systems version = "1.2.7" url = "http://www.bcgsc.ca/downloads/abyss/abyss-%s.tar.gz" % version def _remove_werror(env): sed("configure", " -Werror", "") _get_install(url, env, _configure_make, post_unpack_fn=_remove_werror)
def install_bx_python(env): """Tools for manipulating biological data, particularly multiple sequence alignments https://bitbucket.org/james_taylor/bx-python/wiki/Home """ version = "bitbucket" url = "hg clone http://bitbucket.org/james_taylor/bx-python" _get_install(url, env, _python_make)
def install_hydra(env): version = "0.5.3" url = "http://hydra-sv.googlecode.com/files/Hydra.v{0}.tar.gz".format(version) def clean_libs(env): run("make clean") _get_install(url, env, _make_copy("ls -1 bin/* scripts/*"), post_unpack_fn=clean_libs)
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_bowtie(env): """The bowtie short read aligner. http://bowtie-bio.sourceforge.net/index.shtml """ version = "0.12.7" url = "http://downloads.sourceforge.net/project/bowtie-bio/bowtie/%s/" "bowtie-%s-src.zip" % (version, version) _get_install(url, env, _make_copy("find -perm -100 -name 'bowtie*'"))
def install_stacks(env): """Stacks: build loci out of a set of short-read sequenced samples. http://creskolab.uoregon.edu/stacks/ """ version = "0.998" url = "http://creskolab.uoregon.edu/stacks/source/" "stacks-{0}.tar.gz".format(version) _get_install(url, env, _configure_make)
def _install_boost(env): version = "1.49.0" url = "http://downloads.sourceforge.net/project/boost/boost" "/%s/boost_%s.tar.bz2" % ( version, version.replace(".", "_"), ) check_version = "_".join(version.split(".")[:2]) boost_dir = os.path.join(env.system_install, "boost") boost_version_file = os.path.join(boost_dir, "include", "boost", "version.hpp") def _boost_build(env): run("./bootstrap.sh --prefix=%s --with-libraries=thread" % boost_dir) run("./b2") env.safe_sudo("./b2 install") thread_lib = "libboost_thread.so.%s" % version final_thread_lib = os.path.join(env.system_install, "lib", thread_lib) if ( not exists(boost_version_file) or not contains(boost_version_file, check_version) or not exists(final_thread_lib) ): _get_install(url, env, _boost_build) orig_lib = os.path.join(boost_dir, "lib", thread_lib) if not exists(final_thread_lib): env.safe_sudo("ln -s %s %s" % (orig_lib, final_thread_lib))
def install_mosaik(env): """MOSAIK: reference-guided aligner for next-generation sequencing technologies http://code.google.com/p/mosaik-aligner/ """ version = "2.2.3" url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/mosaik-aligner/" \ "MOSAIK-%s-Linux-x64.tar" % version _get_install(url, env, _make_copy("find . -perm -100 -type f", do_make=False))
def install_grabix(env): """a wee tool for random access into BGZF files https://github.com/arq5x/grabix """ version = "fda4d2609" repository = "git clone https://github.com/arq5x/grabix.git" _get_install(repository, env, _make_copy("ls -1 grabix"), revision=version)
def install_varianttools(env): """Annotation, selection, and analysis of variants in the context of next-gen sequencing analysis. http://varianttools.sourceforge.net/ """ version = "1.0.6" url = "http://downloads.sourceforge.net/project/varianttools/" \ "{ver}/variant_tools-{ver}-src.tar.gz".format(ver=version) _get_install(url, env, _python_make)
def install_ogap(env): """gap opening realigner for BAM data streams https://github.com/ekg/ogap """ version = "652c525" repository = "git clone --recursive https://github.com/ekg/ogap.git" _get_install(repository, env, _make_copy("ls ogap"), revision=version)
def install_bamutil(env): """Utilities for working with BAM files, from U of M Center for Statistical Genetics. http://genome.sph.umich.edu/wiki/BamUtil """ version = "1.0.7" url = "http://genome.sph.umich.edu/w/images/5/5d/BamUtilLibStatGen.%s.tgz" % version _get_install(url, env, _make_copy("ls -1 bamUtil/bin/bam"), dir_name="bamUtil_%s" % version)
def install_delly(env): """DELLY: Structural variant discovery by integrated paired-end and split-read analysis http://www.embl.de/~rausch/delly.html """ version = "0.0.11" if versioncheck.up_to_date(env, "delly", version, stdout_flag="Deletion finder"): return url = "http://www.embl.de/~rausch/delly_v%s.tar.gz" % version _get_install(url, env, _make_copy("find -perm -100 -type f", do_make=False))
def install_emboss(env): """EMBOSS: A high-quality package of free, Open Source software for molecular biology. http://emboss.sourceforge.net/ Emboss target for platforms without packages (CentOS -- rpm systems). """ default_version = "6.6.0" version = env.get("tool_version", default_version) url = "https://science-annex.org/pub/emboss/EMBOSS-%s.tar.gz" % version #url = "ftp://emboss.open-bio.org/pub/EMBOSS/EMBOSS-%s.tar.gz" % version _get_install(url, env, _configure_make)
def SRC_install_cufflinks(env): """Cufflinks assembles transcripts and tests for differential expression and regulation in RNA-Seq samples. http://cufflinks.cbcb.umd.edu/ """ _install_samtools_libs(env) _install_boost(env) default_version = "2.0.2" version = env.get("tool_version", default_version) url = "http://cufflinks.cbcb.umd.edu/downloads/cufflinks-%s.tar.gz" % version _get_install(url, env, _cufflinks_configure_make)
def SRC_install_tophat(env): """TopHat is a fast splice junction mapper for RNA-Seq reads http://tophat.cbcb.umd.edu/ """ _install_samtools_libs(env) _install_boost(env) default_version = "2.0.7" version = env.get("tool_version", default_version) url = "http://tophat.cbcb.umd.edu/downloads/tophat-%s.tar.gz" % version _get_install(url, env, _cufflinks_configure_make)
def install_tophat(env): """TopHat is a fast splice junction mapper for RNA-Seq reads http://tophat.cbcb.umd.edu/ """ default_version = "2.0.8b" version = env.get("tool_version", default_version) url = "http://tophat.cbcb.umd.edu/downloads/" \ "tophat-%s.Linux_x86_64.tar.gz" % version _get_install(url, env, _make_copy("find -perm -100 -type f", do_make=False))
def install_cufflinks(env): """Cufflinks assembles transcripts and tests for differential expression and regulation in RNA-Seq samples. http://cufflinks.cbcb.umd.edu/ """ default_version = "2.1.1" version = env.get("tool_version", default_version) url = "http://cufflinks.cbcb.umd.edu/downloads/" \ "cufflinks-%s.Linux_x86_64.tar.gz" % version _get_install(url, env, _make_copy("find -perm -100 -type f", do_make=False))
def install_vcftools(env): version = "0.1.7" url = "http://downloads.sourceforge.net/project/vcftools/vcftools_{v}.tar.gz".format( v=version) def _vcf_make(env): env.safe_sudo("make install PREFIX={dir}".format(dir=env.system_install)) for perl_module in ["FaSlice.pm", "Vcf.pm", "VcfStats.pm"]: env.safe_sudo("cp perl/%s %s/lib/perl5" % (perl_module, env.system_install)) env.safe_sudo("make clean") _get_install(url, env, _vcf_make)
def install_freebayes(env): """Bayesian haplotype-based polymorphism discovery and genotyping. https://github.com/ekg/freebayes """ version = "github" repository = "git clone --recursive git://github.com/ekg/freebayes.git" def _fix_library_order(env): sed("vcflib/tabixpp/Makefile", "-ltabix", "-ltabix -lz") _get_install(repository, env, _make_copy("ls -1 bin/*"), post_unpack_fn=_fix_library_order)
def install_hydra(env): """Hydra detects structural variation breakpoints in both unique and duplicated genomic regions. https://code.google.com/p/hydra-sv/ """ version = "0.5.3" url = "http://hydra-sv.googlecode.com/files/Hydra.v{0}.tar.gz".format(version) def clean_libs(env): env.safe_run("make clean") _get_install(url, env, _make_copy("ls -1 bin/* scripts/*"), post_unpack_fn=clean_libs)
def install_fastx_toolkit(env): version = "0.0.13" gtext_version = "0.6" url_base = "http://hannonlab.cshl.edu/fastx_toolkit/" fastx_url = "%sfastx_toolkit-%s.tar.bz2" % (url_base, version) gtext_url = "%slibgtextutils-%s.tar.bz2" % (url_base, gtext_version) def _remove_werror(env): sed("configure", " -Werror", "") _get_install(gtext_url, env, _configure_make, post_unpack_fn=_remove_werror) _get_install(fastx_url, env, _configure_make, post_unpack_fn=_remove_werror)
def install_star(env): """The STAR spliced short read aligner. http://code.google.com/p/rna-star/ """ default_version = "2.3.1z" version = env.get("tool_version", default_version) # Need latest alpha release to work around 13.04 compile error # https://groups.google.com/forum/#!topic/rna-star/13S344Jknf4 url = "ftp://ftp2.cshl.edu/gingeraslab/tracks/STARrelease/Alpha/STAR_{version}.tgz" _get_install(url.format(version=version), env, _make_copy("find . -name 'STAR'"))
def install_bwa(env): version = "0.5.9" url = "http://downloads.sourceforge.net/project/bio-bwa/bwa-%s.tar.bz2" % ( version) def _fix_makefile(): arch = run("uname -m") # if not 64bit, remove the appropriate flag if arch.find("x86_64") == -1: run("sed -i.bak -r -e 's/-O2 -m64/-O2/g' Makefile") _get_install(url, env, _make_copy("ls -1 bwa solid2fastq.pl qualfa2fq.pl", _fix_makefile))
def install_plink_seq(env): """A toolset for working with human genetic variation data. http://atgu.mgh.harvard.edu/plinkseq/ """ version = "0.08" url = "http://atgu.mgh.harvard.edu/plinkseq/dist/" \ "version-{v}/plinkseq-{v}-x86_64.tar.gz".format(v=version) def _plink_copy(env): for x in ["pseq"]: env.safe_sudo("cp {0} {1}/bin".format(x, env.system_install)) _get_install(url, env, _plink_copy)
def install_abyss(env): # XXX check for no sparehash on non-ubuntu systems version = "1.3.1" url = "http://www.bcgsc.ca/downloads/abyss/abyss-%s.tar.gz" % version def _remove_werror_get_boost(env): sed("configure", " -Werror", "") # http://osdir.com/ml/abyss-users-science/2011-10/msg00108.html run("wget http://downloads.sourceforge.net/project/boost/boost/1.47.0/boost_1_47_0.tar.bz2") run("tar jxf boost_1_47_0.tar.bz2") run("ln -s boost_1_47_0/boost boost") _get_install(url, env, _configure_make, post_unpack_fn=_remove_werror_get_boost)
def install_velvet(env): version = "1.1.06" url = "http://www.ebi.ac.uk/~zerbino/velvet/velvet_%s.tgz" % version def _fix_library_order(env): """Fix library order problem in recent gcc versions http://biostar.stackexchange.com/questions/13713/ error-installing-velvet-assembler-1-1-06-on-ubuntu-server """ sed("Makefile", "Z_LIB_FILES=-lz", "Z_LIB_FILES=-lz -lm") _get_install(url, env, _make_copy("find -perm -100 -name 'velvet*'"), post_unpack_fn=_fix_library_order)
def install_ray(env): """Ray -- Parallel genome assemblies for parallel DNA sequencing http://denovoassembler.sourceforge.net/ """ default_version = "2.2.0" version = env.get("tool_version", default_version) url = "http://downloads.sourceforge.net/project/denovoassembler/Ray-v%s.tar.bz2" % version def _ray_do_nothing(env): return _get_install(url, env, _make_copy("find -name Ray"), post_unpack_fn=_ray_do_nothing)
def install_mosaik(env): repository = "git clone git://github.com/wanpinglee/MOSAIK.git" def _chdir_src(work_cmd): def do_work(env): with cd("src"): work_cmd(env) return do_work _get_install(repository, env, _chdir_src(_make_copy("ls -1 ../bin/*")))
def install_bfast(env): """BFAST: Blat-like Fast Accurate Search Tool. http://sourceforge.net/apps/mediawiki/bfast/index.php?title=Main_Page """ default_version = "0.7.0a" version = env.get("tool_version", default_version) major_version_regex = "\d+\.\d+\.\d+" major_version = re.search(major_version_regex, version).group(0) url = "http://downloads.sourceforge.net/project/bfast/bfast/%s/bfast-%s.tar.gz"\ % (major_version, version) _get_install(url, env, _configure_make)
def install_weblogo(env): """Weblogo http://weblogo.berkeley.edu/ """ version = "2.8.2" url = "http://weblogo.berkeley.edu/release/weblogo.%s.tar.gz" % version _get_install(url, env, _make_copy("find -perm -100 -type f", do_make=False)) def _cp_pm(env): for perl_module in ["template.pm", "logo.pm", "template.eps"]: env.safe_sudo("cp %s %s/lib/perl5" % (perl_module, env.system_install)) _get_install(url, env, _cp_pm(env))
def install_lastz(env): """LASTZ sequence alignment program. http://www.bx.psu.edu/miller_lab/dist/README.lastz-1.02.00/README.lastz-1.02.00a.html """ default_version = "1.02.00" version = env.get("tool_version", default_version) url = "http://www.bx.psu.edu/miller_lab/dist/" \ "lastz-%s.tar.gz" % version def _remove_werror(env): env.safe_sed("src/Makefile", " -Werror", "") _get_install(url, env, _make_copy("find -perm -100 -name 'lastz'"), post_unpack_fn=_remove_werror)
def install_crisp(env): """Detect SNPs and short indels from pooled sequencing data. https://sites.google.com/site/vibansal/software/crisp/ """ version = "5" url = "https://sites.google.com/site/vibansal/software/crisp/" \ "CRISP-linux-v{0}.tar.gz".format(version) def _make_executable(): env.safe_run("chmod a+x *.py") _get_install(url, env, _make_copy("ls -1 CRISP.py crisp_to_vcf.py", premake_cmd=_make_executable, do_make=False))
def install_mosaik(env): """MOSAIK: reference-guided aligner for next-generation sequencing technologies http://code.google.com/p/mosaik-aligner/ """ version = "github" repository = "git clone git://github.com/wanpinglee/MOSAIK.git" def _chdir_src(work_cmd): def do_work(env): with cd("src"): work_cmd(env) return do_work _get_install(repository, env, _chdir_src(_make_copy("ls -1 ../bin/*")))
def install_perm(env): version = "3.6" url = "http://perm.googlecode.com/files/PerM_%s_Source.tar.gz" % version def gcc44_makefile_patch(): gcc_cmd = "g++44" with settings(hide('warnings', 'running', 'stdout', 'stderr'), warn_only=True): result = run("%s -v" % gcc_cmd) print result.return_code if result.return_code == 0: sed("makefile", "g\+\+", gcc_cmd) _get_install(url, env, _make_copy("ls -1 perm", gcc44_makefile_patch))
def install_bedtools(env): """A flexible suite of utilities for comparing genomic features. https://code.google.com/p/bedtools/ """ version = "2.17.0" if versioncheck.up_to_date(env, "bedtools --version", version, stdout_flag="bedtools"): return url = "https://bedtools.googlecode.com/files/" \ "BEDTools.v%s.tar.gz" % version _get_install(url, env, _make_copy("ls -1 bin/*"))
def install_dwgsim(env): version = "0.1.8" samtools_version = "0.1.18" url = "http://downloads.sourceforge.net/project/dnaa/dwgsim/" \ "dwgsim-{0}.tar.gz".format(version) samtools_url = "http://downloads.sourceforge.net/project/samtools/samtools/" \ "{ver}/samtools-{ver}.tar.bz2".format(ver=samtools_version) def _get_samtools(env): run("wget {0}".format(samtools_url)) run("tar jxf samtools-{0}.tar.bz2".format(samtools_version)) run("ln -s samtools-{0} samtools".format(samtools_version)) _get_install(url, env, _make_copy("ls -1 dwgsim dwgsim_eval scripts/dwgsim_pileup_eval.pl"), post_unpack_fn=_get_samtools)
def _install_samtools_libs(env): repository = "svn co --non-interactive " \ "https://samtools.svn.sourceforge.net/svnroot/samtools/trunk/samtools" def _samtools_lib_install(env): lib_dir = _get_lib_dir(env) include_dir = os.path.join(env.system_install, "include", "bam") env.safe_run("make") env.safe_sudo("mv -f libbam* %s" % lib_dir) env.safe_sudo("mkdir -p %s" % include_dir) env.safe_sudo("mv -f *.h %s" % include_dir) check_dir = os.path.join(_get_include_dir(env), "bam") if not env.safe_exists(check_dir): _get_install(repository, env, _samtools_lib_install)
def install_vcflib(env): """Utilities for parsing and manipulating VCF files. https://github.com/ekg/vcflib """ version = "06e664c" repository = "git clone --recursive https://github.com/ekg/vcflib.git" def _fix_tabixpp_library_order(env): env.safe_sed("tabixpp/Makefile", "-ltabix", "-ltabix -lz") _get_install(repository, env, _make_copy("find -perm -100 -type f -name 'vcf*'" " | grep -v '.sh$' | grep -v '.r$'"), post_unpack_fn=_fix_tabixpp_library_order, revision=version)
def install_freec(env): """Control-FREEC: a tool for detection of copy number changes and allelic imbalances. http://bioinfo-out.curie.fr/projects/freec/ """ version = "6.4" if env.distribution in ["ubuntu", "debian"]: if env.is_64bit: url = "http://bioinfo-out.curie.fr/projects/freec/src/FREEC_Linux64.tar.gz" else: url = "http://bioinfo-out.curie.fr/projects/freec/src/FREEC_LINUX32.tar.gz" if not versioncheck.up_to_date(env, "freec", version, stdout_index=1): _get_install(url, env, _make_copy("find -name 'freec'"), dir_name=".")
def install_percolator(env): default_version = "2_04" version = env.get("tool_version", default_version) url = "https://github.com/downloads/percolator/percolator/percolator_%s_full_src.tar.gz" % version def make(env): with cd(".."): run("env") run("cmake -DCMAKE_INSTALL_PREFIX='%s' . " % env.system_install) run("make -j8") env.safe_sudo("make install") _get_install(url, env, make)