コード例 #1
0
        /// <summary>
        /// Scalpel installation folder cannot be moved and still work. There must be some hard-coded path references.
        /// If needed, delete and reinstall in another location.
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns>true if no fix needed, false if fix performed</returns>
        public bool CheckInstallation(string spritzDirectory)
        {
            // Don't go further if installation hasn't been run at all
            string scalpelLocationFile = Path.Combine(spritzDirectory, "Tools", ScalpelLocationCheckFilename);

            if (!File.Exists(scalpelLocationFile))
            {
                return(false);
            }

            // Remove and reinstall if it moved
            string removeScriptPath = WriteRemoveScript(spritzDirectory);
            string scriptPath       = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "CheckScalpelInstallation.bash");
            string expectedLocation = WrapperUtility.ConvertWindowsPath(Path.Combine(spritzDirectory, "Tools", "scalpel-" + ScalpelVersion));
            bool   isSame           = File.ReadAllText(scalpelLocationFile).TrimEnd() == expectedLocation.Trim('"');

            if (!isSame)
            {
                WrapperUtility.GenerateAndRunScript(scriptPath, new List <string>
                {
                    WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                    "bash " + WrapperUtility.ConvertWindowsPath(removeScriptPath),
                    "bash " + WrapperUtility.ConvertWindowsPath(WriteInstallScript(spritzDirectory)),
                }).WaitForExit();
            }
            return(isSame);
        }
コード例 #2
0
        /// <summary>
        /// Writes a script for removing STAR and seqtk.
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns></returns>
        public string WriteRemoveScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "RemoveStar.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "rm -rf seqtk STAR-" + STARVersion + " /usr/local/bin/STAR /usr/local/bin/STARlong",
            });
            return(scriptPath);
        }
コード例 #3
0
        /// <summary>
        /// Writes a script for removing RSEM.
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns></returns>
        public string WriteRemoveScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "RemoveRSEM.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "rm -rf RSEM-1.3.0",
            });
            return(scriptPath);
        }
コード例 #4
0
        /// <summary>
        /// Writes a script for removing cufflinks.
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns></returns>
        public string WriteRemoveScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "InstallScalpel.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "rm -rf stringtie-" + StringtieVersion,
            });
            return(scriptPath);
        }
コード例 #5
0
        /// <summary>
        /// Writes an install script for BEDOPS.
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns></returns>
        public string WriteInstallScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "InstallBedops.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "rsync -aP rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/ /usr/local/bin"
            });
            return(scriptPath);
        }
コード例 #6
0
        /// <summary>
        /// Writes an installation script for slncky.
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns></returns>
        public string WriteInstallScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "InstallSlncky.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "if [ ! -d slncky ]; then git clone https://github.com/slncky/slncky.git; fi",
                "cd slncky",
                "if [ ! -d annotations ]; then wget " + SlnckyAnnotationsLocation + "; fi",
                "if [ ! -d annotations ]; then tar -xvf annotations.tar.gz; fi",
                "if [ -d annotations ]; then rm annotations.tar.gz; fi",
            });
            return(scriptPath);
        }
コード例 #7
0
        public string WriteInstallScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "InstallNanonet.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "if [ ! -d nanonet ]; then",
                "  git clone https://github.com/nanoporetech/nanonet.git",
                "  cd nanonet",
                "  python setup.py install",
                "fi"
            });
            return(scriptPath);
        }
コード例 #8
0
        /// <summary>
        /// Writes an installation script for RSeQC.
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns></returns>
        public string WriteInstallScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "InstallRSeQC.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "if [ ! -d RSeQC-2.6.4 ]; then",
                "  wget https://downloads.sourceforge.net/project/rseqc/RSeQC-2.6.4.tar.gz",
                "  tar -xvf RSeQC-2.6.4.tar.gz", // infer_experiment.py is in the scripts folder
                "  rm RSeQC-2.6.4.tar.gz",
                "fi"
            });
            return(scriptPath);
        }
コード例 #9
0
        /// <summary>
        /// Writes an install script for BLAST+.
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns></returns>
        public string WriteInstallScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "InstallBLAST.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "if [ ! -d ncbi-blast-2.7.1+ ]; then",
                "  wget --no-check ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.7.1/ncbi-blast-2.7.1+-x64-linux.tar.gz",
                "  tar -xvf ncbi-blast-2.7.1+-x64-linux.tar.gz; rm ncbi-blast-2.7.1+-x64-linux.tar.gz",
                "  cp ncbi-blast-2.7.1+/bin/* /usr/local/bin",
                "fi"
            });
            return(scriptPath);
        }
コード例 #10
0
        /// <summary>
        /// Writes an installation script for the program MELTING.
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns></returns>
        public string WriteInstallScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "InstallMelting.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "if [ ! -d MELTING5.1.1 ]; then",
                "  wget --no-check -O MELTING5.1.1.tar.gz http://sourceforge.net/projects/melting/files/meltingJava/melting5/MELTING5.1.1.tar.gz/download",
                "  tar -xvf MELTING5.1.1.tar.gz; rm MELTING5.1.1.tar.gz",
                "  cd MELTING5.1.1",
                "  ./Install.unices",
                "fi"
            });
            return(scriptPath);
        }
コード例 #11
0
        /// <summary>
        /// Writes an installation script for HISAT2.
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns></returns>
        public string WriteInstallScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "InstallHisat2.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "if [ ! -d hisat2-2.1.0 ]; then",
                "  wget --no-check ftp://ftp.ccb.jhu.edu/pub/infphilo/hisat2/downloads/hisat2-2.1.0-Linux_x86_64.zip",
                "  unzip hisat2-2.1.0-Linux_x86_64.zip",
                "  rm hisat2-2.1.0-Linux_x86_64.zip",
                "  mv hisat2-2.1.0-Linux_x86_64 hisat2-2.1.0",
                "fi"
            });
            return(scriptPath);
        }
コード例 #12
0
        /// <summary>
        /// Write an installation script for scalpel. Requires cmake.
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns></returns>
        public string WriteInstallScript(string spritzDirectory)
        {
            string compressedFilename = "rmats." + RMatsVersion + ".tgz";
            string scriptPath         = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "InstallScalpel.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "if [ ! -d rMATS." + RMatsVersion + " ]; then",
                "  wget --no-check https://sourceforge.net/projects/rnaseq-mats/files/MATS/rMATS." + RMatsVersion + ".tgz/download -O " + compressedFilename,
                "  tar -xzf " + compressedFilename,
                "  rm " + compressedFilename,
                "fi"
            });
            return(scriptPath);
        }
コード例 #13
0
        /// <summary>
        /// Write an installation script for scalpel. Requires cmake.
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns></returns>
        public string WriteInstallScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "InstallScalpel.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "if [ ! -d scalpel-" + ScalpelVersion + " ]; then",
                "  wget --no-check http://sourceforge.net/projects/scalpel/files/scalpel-" + ScalpelVersion + ".tar.gz; tar zxvf scalpel-" + ScalpelVersion + ".tar.gz; cd scalpel-" + ScalpelVersion + "; make",
                "  cd ..",
                "  rm scalpel-" + ScalpelVersion + ".tar.gz",
                "  readlink -f scalpel-" + ScalpelVersion + " > " + ScalpelLocationCheckFilename,
                "fi"
            });
            return(scriptPath);
        }
コード例 #14
0
        /// <summary>
        /// Writes an installation script for RSEM.
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns></returns>
        public string WriteInstallScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "InstallRSEM.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "if [ ! -d RSEM-1.3.0 ]; then",
                "  wget https://github.com/deweylab/RSEM/archive/v1.3.0.tar.gz",
                "  tar -xvf v1.3.0.tar.gz; rm v1.3.0.tar.gz",
                "  cd RSEM-1.3.0",
                "  make",
                "fi"
            });
            return(scriptPath);
        }
コード例 #15
0
        /// <summary>
        /// Writes an installation script for lastz.
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns></returns>
        public string WriteInstallScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "InstallTrinity.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "if [ ! -d trinityrnaseq-Trinity-v" + TrinityVersion + " ]; then",
                "  wget https://github.com/trinityrnaseq/trinityrnaseq/archive/Trinity-v" + TrinityVersion + ".tar.gz",
                "  tar xvf Trinity-v" + TrinityVersion + ".tar.gz",
                "  rm Trinity-v" + TrinityVersion + ".tar.gz",
                "  cd trinityrnaseq-Trinity-v" + TrinityVersion,
                "  make",
                "fi"
            });
            return(scriptPath);
        }
コード例 #16
0
        /// <summary>
        /// Writes an installation script for installing GATK from pre-built binaries.
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns></returns>
        public string WriteInstallScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "InstallGatk.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "if [ ! -d gatk ]; then",
                $"  wget --no-check https://github.com/broadinstitute/gatk/releases/download/{Version}/gatk-{Version}.zip",
                $"  unzip gatk-{Version}.zip",
                $"  rm gatk-{Version}.zip",
                $"  mv gatk-{Version} gatk",
                "fi",
                "if [ ! -d ChromosomeMappings ]; then git clone https://github.com/dpryan79/ChromosomeMappings.git; fi",
            });
            return(scriptPath);
        }
コード例 #17
0
        /// <summary>
        /// Writes an installation script for installing GATK from source. Requires root permissions to install gradle the first time.
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns></returns>
        public static string WriteGitCloneInstallScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "InstallGatk.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "if [ ! -f gatk/build/libs/gatk.jar ]; then",
                "  git clone https://github.com/broadinstitute/gatk.git",
                "  cd gatk",
                "  ./gradlew localJar",
                "  cd ..",
                "fi",
                "if [ ! -d ChromosomeMappings ]; then git clone https://github.com/dpryan79/ChromosomeMappings.git; fi",
            });
            return(scriptPath);
        }
コード例 #18
0
        /// <summary>
        /// Writes a script for installing cufflinks.
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns></returns>
        public string WriteInstallScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "InstallCufflinks.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "if [ ! -d cufflinks-2.2.1 ]; then",
                "  wget --no-check http://cole-trapnell-lab.github.io/cufflinks/assets/downloads/cufflinks-2.2.1.Linux_x86_64.tar.gz",
                "  tar -xvf cufflinks-2.2.1.Linux_x86_64.tar.gz",
                "  rm cufflinks-2.2.1.Linux_x86_64.tar.gz",
                "  mv cufflinks-2.2.1.Linux_x86_64 cufflinks-2.2.1",
                "  cp cufflinks-2.2.1/* /usr/local/bin",
                "fi"
            });
            return(scriptPath);
        }
コード例 #19
0
        /// <summary>
        /// Writes a script for installing cufflinks.
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns></returns>
        public string WriteInstallScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "InstallStringTie.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "if [ ! -d stringtie-" + StringtieVersion + " ]; then",
                "  wget --no-check http://ccb.jhu.edu/software/stringtie/dl/stringtie-" + StringtieVersion + ".Linux_x86_64.tar.gz",
                "  tar -xvf stringtie-" + StringtieVersion + ".Linux_x86_64.tar.gz",
                "  rm stringtie-" + StringtieVersion + ".Linux_x86_64.tar.gz",
                "  mv stringtie-" + StringtieVersion + ".Linux_x86_64 stringtie-" + StringtieVersion,
                "  cp stringtie-" + StringtieVersion + "/stringtie /usr/local/bin",
                "fi"
            });
            return(scriptPath);
        }
コード例 #20
0
        /// <summary>
        /// Writes a script for installing skewer.
        /// </summary>
        /// <param name="currentDirectory"></param>
        /// <returns></returns>
        public string WriteInstallScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "InstallSkewer.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "if [ ! -d BBMap ]; then git clone https://github.com/BioInfoTools/BBMap.git; fi", // has adapter sequences in the resources file
                "if [ ! -d skewer-0.2.2 ]; then",
                "  wget https://github.com/relipmoc/skewer/archive/0.2.2.tar.gz",
                "  tar -xvf 0.2.2.tar.gz",
                "  rm 0.2.2.tar.gz",
                "  cd skewer-0.2.2",
                "  make",
                "fi"
            });
            return(scriptPath);
        }
コード例 #21
0
        /// <summary>
        /// Writes an install script for bedtools
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns></returns>
        public string WriteInstallScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "InstallBedtools.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "if [ ! -d bedtools2 ]; then",
                // (v2.24 is the highest slncky allows)
                "  wget --no-check https://github.com/arq5x/bedtools2/releases/download/v2.24.0/bedtools-2.24.0.tar.gz",
                "  tar -xvf bedtools-2.24.0.tar.gz",
                "  rm bedtools-2.24.0.tar.gz",
                "  cd bedtools2",
                "  make install",
                "fi"
            });
            return(scriptPath);
        }
コード例 #22
0
        /// <summary>
        /// Writes an installation script for lastz.
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns></returns>
        public string WriteInstallScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "InstallLastz.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "if [ ! -d lastz-1.04.00 ]; then",
                "  wget https://github.com/lastz/lastz/archive/1.04.00.tar.gz",
                "  tar -xvf 1.04.00.tar.gz",
                "  rm 1.04.00.tar.gz",
                "  cd lastz-1.04.00",
                "  make",
                "  chmod +X src/lastz",
                "  sudo cp src/lastz /usr/local/bin",
                "fi"
            });
            return(scriptPath);
        }
コード例 #23
0
        /// <summary>
        /// Writes an installation script for mfold.
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns></returns>
        public string WriteInstallScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "InstallMfold.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "if [ ! -d mfold-3.6 ]; then",
                "  wget --no-check http://unafold.rna.albany.edu/download/mfold-3.6.tar.gz",
                "  tar -xvf mfold-3.6.tar.gz",
                "  rm mfold-3.6.tar.gz",
                "  cd mfold-3.6",
                "  ./configure",
                "  make",
                "  sudo make install",
                "fi"
            });
            return(scriptPath);
        }
コード例 #24
0
        /// <summary>
        /// Writes an installation script for TopHat and bowtie2.
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns></returns>
        public string WriteInstallScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "InstallTophat.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "if [ ! -d tophat-2.1.1 ]; then",
                "  wget --no-check https://ccb.jhu.edu/software/tophat/downloads/tophat-2.1.1.Linux_x86_64.tar.gz",
                "  wget --no-check -O bowtie.zip https://sourceforge.net/projects/bowtie-bio/files/bowtie2/2.3.4/bowtie2-2.3.4-linux-x86_64.zip/download",
                "  tar -xvf tophat-2.1.1.Linux_x86_64.tar.gz; unzip bowtie.zip",
                "  rm tophat-2.1.1.Linux_x86_64.tar.gz bowtie.zip",
                "  mv tophat-2.1.1.Linux_x86_64 tophat-2.1.1",
                "  mv bowtie2-2.3.4-linux-x86_64 bowtie2-2.3.4",
                "  cp bowtie2-2.3.4/* tophat-2.1.1",
                "fi"
            });
            return(scriptPath);
        }
コード例 #25
0
        /// <summary>
        /// Writes an install script for bedtools
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns></returns>
        public string WriteInstallScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "InstallVcfTools.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "if [ ! -d vcftools-0.1.15 ]; then",
                "  wget --no-check https://github.com/vcftools/vcftools/releases/download/v0.1.15/vcftools-0.1.15.tar.gz",
                "  tar -xvf vcftools-0.1.15.tar.gz",
                "  rm vcftools-0.1.15.tar.gz",
                "  cd vcftools-0.1.15",
                "  ./configure",
                "  make",
                "  make install",
                "fi"
            });
            return(scriptPath);
        }
コード例 #26
0
        /// <summary>
        /// Writes an install script for BEDOPS.
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns></returns>
        public string WriteInstallScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "InstallBedops.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "if [ ! -d bedops ]; then wget https://github.com/bedops/bedops/releases/download/v2.4.29/bedops_linux_x86_64-v2.4.29.tar.bz2; fi",
                "if [ ! -d bedops ]; then tar -jxvf bedops_linux_x86_64-v2.4.29.tar.bz2; fi",
                "if [ ! -d bedops ]; then rm bedops_linux_x86_64-v2.4.29.tar.bz2; fi",
                "if [ ! -d bedops ]; then mv bin bedops; fi",
                "cd bedops",
                "if [ ! -f gtfToGenePred ]; then wget http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/gtfToGenePred; fi",
                "if [ ! -f gff3ToGenePred ]; then wget http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/gff3ToGenePred; fi",
                "if [ ! -f genePredToBed ]; then wget http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/genePredToBed; fi",
                "if [ ! -f liftOver ]; then wget http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/liftOver; fi",
                "cd ..",
                "sudo cp bedops/* /usr/local/bin"
            });
            return(scriptPath);
        }
コード例 #27
0
        /// <summary>
        /// Writes a script for installing STAR-Fusion.
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns></returns>
        public string WriteInstallScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "InstallStarFusion.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "if [ ! -d " + StarFusionDirectoryName + " ]; then",
                "  wget https://github.com/STAR-Fusion/STAR-Fusion/releases/download/STAR-Fusion-v1.4.0/STAR-Fusion-v1.4.0.FULL.tar.gz",
                "  tar -xvf STAR-Fusion-v1.4.0.FULL.tar.gz",
                "  rm STAR-Fusion-v1.4.0.FULL.tar.gz",
                "  cd STAR-Fusion-v1.4.0",
                "  make",
                "  cd ..",

                // need hmmer for building STAR-Fusion references
                "  " + WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "  wget http://eddylab.org/software/hmmer3/3.1b2/hmmer-3.1b2-linux-intel-x86_64.tar.gz",
                "  tar zxvf hmmer-3.1b2-linux-intel-x86_64.tar.gz",
                "  rm hmmer-3.1b2-linux-intel-x86_64.tar.gz",
                "  cd hmmer-3.1b2-linux-intel-x86_64",
                "  cp binaries/* /usr/local/bin",

                // jellyfish
                "  " + WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "  wget https://github.com/gmarcais/Jellyfish/releases/download/v2.2.7/jellyfish-2.2.7.tar.gz",
                "  tar xvf jellyfish-2.2.7.tar.gz; rm jellyfish-2.2.7.tar.gz",
                "  cd jellyfish-2.2.7",
                "  ./configure; make; make install",

                // salmon
                "  " + WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "  wget https://github.com/COMBINE-lab/salmon/releases/download/v0.9.1/Salmon-0.9.1_linux_x86_64.tar.gz",
                "  tar xvf Salmon-0.9.1_linux_x86_64.tar.gz; rm Salmon-0.9.1_linux_x86_64.tar.gz",
                "  cp tar xvf Salmon-0.9.1_linux_x86_64/bin/salmon /usr/local/bin",
                "fi",
            });
            return(scriptPath);
        }
コード例 #28
0
        /// <summary>
        /// Writes a script for installing SnpEff.
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns></returns>
        public string WriteInstallScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "InstallSnpEff.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "if [ ! -d SnpEff ]; then git clone --depth=1 https://github.com/smith-chem-wisc/SnpEff; fi",
                "if [ ! -f SnpEff/snpEff.jar ]; then",
                "  cd SnpEff",
                "  mvn install:install-file -Dfile=lib/antlr-4.5.1-complete.jar -DgroupId=org.antlr -DartifactId=antlr -Dversion=4.5.1 -Dpackaging=jar",
                "  mvn install:install-file -Dfile=lib/biojava3-core-3.0.7.jar -DgroupId=org.biojava -DartifactId=biojava3-core -Dversion=3.0.7 -Dpackaging=jar",
                "  mvn install:install-file -Dfile=lib/biojava3-structure-3.0.7.jar -DgroupId=org.biojava -DartifactId=biojava3-structure -Dversion=3.0.7 -Dpackaging=jar",
                "  export VERSION=4.3",
                "  export VERSION_UND=`echo $VERSION | tr '.' '_'`",
                "  mvn clean compile assembly:assembly",
                "  mvn install:install-file -Dfile=target/SnpEff-$VERSION.jar -DgroupId=org.snpeff -DartifactId=SnpEff -Dversion=$VERSION -Dpackaging=jar -DgeneratePom=true --quiet",
                "  cp target/SnpEff-$VERSION-jar-with-dependencies.jar snpEff.jar",
                "fi"
            });
            return(scriptPath);
        }
コード例 #29
0
        /// <summary>
        /// Writes a script to install samtools.
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns></returns>
        public string WriteInstallScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "InstallSamtools.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                $"if [ ! -d samtools-{SamtoolsVersion} ]; then",
                $"  wget --no-check https://github.com/samtools/samtools/releases/download/{SamtoolsVersion}/samtools-{SamtoolsVersion}.tar.bz2",
                $"  tar -jxvf samtools-{SamtoolsVersion}.tar.bz2",
                $"  rm samtools-{SamtoolsVersion}.tar.bz2",
                $"  cd samtools-{SamtoolsVersion}/htslib-{SamtoolsVersion}",
                "  ./configure", // configures install to /usr/local/bin and /usr/local/share
                "  make",
                "  make install",
                "  cd ..",
                "  ./configure",
                "  make",
                "  make install",
                "fi",
            });
            return(scriptPath);
        }
コード例 #30
0
        /// <summary>
        /// Writes an installation script for STAR. Also installs seqtk, which is useful for subsetting fastq files.
        /// </summary>
        /// <param name="spritzDirectory"></param>
        /// <returns></returns>
        public string WriteInstallScript(string spritzDirectory)
        {
            string scriptPath = WrapperUtility.GetInstallationScriptPath(spritzDirectory, "InstallStar.bash");

            WrapperUtility.GenerateScript(scriptPath, new List <string>
            {
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "if [ ! -d seqtk ]; then ",
                "  git clone https://github.com/lh3/seqtk.git",
                "  cd seqtk; make",
                "fi",
                WrapperUtility.ChangeToToolsDirectoryCommand(spritzDirectory),
                "if [ ! -d STAR-" + STARVersion + " ]; then ",
                "  wget https://github.com/alexdobin/STAR/archive/" + STARVersion + ".tar.gz; tar xvf " + STARVersion + ".tar.gz; rm " + STARVersion + ".tar.gz",
                "  cd STAR-" + STARVersion + "/source",
                "  make STAR",
                "  cp STAR /usr/local/bin",
                "  make clean",
                "  make STARlong",
                "  cp STARlong /usr/local/bin",
                "fi"
            });
            return(scriptPath);
        }