]> git.donarmstrong.com Git - rsem.git/commitdiff
Use PATH env to instead the variable
authorBo Li <bli@cs.wisc.edu>
Thu, 3 Apr 2014 17:30:24 +0000 (12:30 -0500)
committerBo Li <bli@cs.wisc.edu>
Thu, 3 Apr 2014 19:59:06 +0000 (14:59 -0500)
31 files changed:
EBSeq/BiocInstaller/DESCRIPTION [deleted file]
EBSeq/BiocInstaller/INDEX [deleted file]
EBSeq/BiocInstaller/Meta/Rd.rds [deleted file]
EBSeq/BiocInstaller/Meta/hsearch.rds [deleted file]
EBSeq/BiocInstaller/Meta/links.rds [deleted file]
EBSeq/BiocInstaller/Meta/nsInfo.rds [deleted file]
EBSeq/BiocInstaller/Meta/package.rds [deleted file]
EBSeq/BiocInstaller/NAMESPACE [deleted file]
EBSeq/BiocInstaller/NEWS [deleted file]
EBSeq/BiocInstaller/R/BiocInstaller [deleted file]
EBSeq/BiocInstaller/R/BiocInstaller.rdb [deleted file]
EBSeq/BiocInstaller/R/BiocInstaller.rdx [deleted file]
EBSeq/BiocInstaller/help/AnIndex [deleted file]
EBSeq/BiocInstaller/help/BiocInstaller.rdb [deleted file]
EBSeq/BiocInstaller/help/BiocInstaller.rdx [deleted file]
EBSeq/BiocInstaller/help/aliases.rds [deleted file]
EBSeq/BiocInstaller/help/paths.rds [deleted file]
EBSeq/BiocInstaller/html/00Index.html [deleted file]
EBSeq/BiocInstaller/html/R.css [deleted file]
EBSeq/BiocInstaller/scripts/biocLite.R [deleted file]
EBSeq/BiocInstaller/unitTests/test_BiocUpgrade.R [deleted file]
EBSeq/BiocInstaller/unitTests/test_biocinstallRepos.R [deleted file]
EBSeq/makefile
README.md
convert-sam-for-rsem
rsem-calculate-expression
rsem-generate-ngvector
rsem-plot-transcript-wiggles
rsem-prepare-reference
rsem-run-ebseq
rsem_perl_utils.pm

diff --git a/EBSeq/BiocInstaller/DESCRIPTION b/EBSeq/BiocInstaller/DESCRIPTION
deleted file mode 100644 (file)
index 269c539..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Package: BiocInstaller
-Title: Install/Update Bioconductor and CRAN Packages
-Description: Installs/updates Bioconductor and CRAN packages
-Version: 1.12.0
-Author: Dan Tenenbaum and Biocore Team
-Maintainer: Bioconductor Package Maintainer
-        <maintainer@bioconductor.org>
-biocViews: Software
-Depends: R (>= 3.0.0)
-Suggests: RUnit, BiocGenerics
-License: Artistic-2.0
-Packaged: 2013-10-15 04:03:53 UTC; biocbuild
-Built: R 3.0.2; ; 2013-10-15 11:47:50 UTC; unix
diff --git a/EBSeq/BiocInstaller/INDEX b/EBSeq/BiocInstaller/INDEX
deleted file mode 100644 (file)
index ec33cf3..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-BiocUpgrade             Upgrade Bioconductor to the latest version
-                        available for this version of R
-biocLite                Install or update Bioconductor and CRAN
-                        packages
-biocValid               Validate installed package versions against
-                        biocLite versions.
-biocVersion             Bioconductor version
-biocases_group          Convenience functions to return package names
-                        associated with Bioconductor publications.
-biocinstallRepos        Display current Bioconductor and CRAN
-                        repositories.
-useDevel                Get the 'devel' version of the BiocInstaller
-                        package.
diff --git a/EBSeq/BiocInstaller/Meta/Rd.rds b/EBSeq/BiocInstaller/Meta/Rd.rds
deleted file mode 100644 (file)
index e07c822..0000000
Binary files a/EBSeq/BiocInstaller/Meta/Rd.rds and /dev/null differ
diff --git a/EBSeq/BiocInstaller/Meta/hsearch.rds b/EBSeq/BiocInstaller/Meta/hsearch.rds
deleted file mode 100644 (file)
index e320f87..0000000
Binary files a/EBSeq/BiocInstaller/Meta/hsearch.rds and /dev/null differ
diff --git a/EBSeq/BiocInstaller/Meta/links.rds b/EBSeq/BiocInstaller/Meta/links.rds
deleted file mode 100644 (file)
index cc993be..0000000
Binary files a/EBSeq/BiocInstaller/Meta/links.rds and /dev/null differ
diff --git a/EBSeq/BiocInstaller/Meta/nsInfo.rds b/EBSeq/BiocInstaller/Meta/nsInfo.rds
deleted file mode 100644 (file)
index f32ede4..0000000
Binary files a/EBSeq/BiocInstaller/Meta/nsInfo.rds and /dev/null differ
diff --git a/EBSeq/BiocInstaller/Meta/package.rds b/EBSeq/BiocInstaller/Meta/package.rds
deleted file mode 100644 (file)
index 8dee4bd..0000000
Binary files a/EBSeq/BiocInstaller/Meta/package.rds and /dev/null differ
diff --git a/EBSeq/BiocInstaller/NAMESPACE b/EBSeq/BiocInstaller/NAMESPACE
deleted file mode 100644 (file)
index 2415823..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-import("utils")
-
-export(biocLite, biocVersion, biocinstallRepos, useDevel, biocValid,
-    monograph_group, RBioinf_group, biocases_group, all_group)
diff --git a/EBSeq/BiocInstaller/NEWS b/EBSeq/BiocInstaller/NEWS
deleted file mode 100644 (file)
index 67c3189..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-CHANGES IN VERSION 1.10.0
--------------------------
-
-NEW FEATURES
-
-    o biocValid() checks that installed packages are consistent with
-    those available via biocLite().
-
-    o biocVersion() returns the version of Bioconductor expected with
-    this version of the BiocInstaller package.
-
-USER-VISIBLE CHANGES
-
-    o biocLite() invoked with no arguments updates currently installed
-    packages to their most-recent version.
-
diff --git a/EBSeq/BiocInstaller/R/BiocInstaller b/EBSeq/BiocInstaller/R/BiocInstaller
deleted file mode 100644 (file)
index 3b65e3c..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#  File share/R/nspackloader.R
-#  Part of the R package, http://www.R-project.org
-#
-#  Copyright (C) 1995-2012 The R Core Team
-#
-#  This program is free software; you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation; either version 2 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
-
-local({
-    info <- loadingNamespaceInfo()
-    pkg <- info$pkgname
-    ns <- .getNamespace(as.name(pkg))
-    if (is.null(ns))
-        stop("cannot find namespace environment for ", pkg, domain = NA);
-    dbbase <- file.path(info$libname, pkg, "R", pkg)
-    lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
-})
diff --git a/EBSeq/BiocInstaller/R/BiocInstaller.rdb b/EBSeq/BiocInstaller/R/BiocInstaller.rdb
deleted file mode 100644 (file)
index 2e70858..0000000
Binary files a/EBSeq/BiocInstaller/R/BiocInstaller.rdb and /dev/null differ
diff --git a/EBSeq/BiocInstaller/R/BiocInstaller.rdx b/EBSeq/BiocInstaller/R/BiocInstaller.rdx
deleted file mode 100644 (file)
index bbce4ec..0000000
Binary files a/EBSeq/BiocInstaller/R/BiocInstaller.rdx and /dev/null differ
diff --git a/EBSeq/BiocInstaller/help/AnIndex b/EBSeq/BiocInstaller/help/AnIndex
deleted file mode 100644 (file)
index 93ce51c..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-all_group      packageGroups
-biocases_group packageGroups
-biocinstallRepos       biocinstallRepos
-biocLite       biocLite
-BiocUpgrade    BiocUpgrade
-biocValid      biocValid
-biocVersion    biocVersion
-monograph_group        packageGroups
-RBioinf_group  packageGroups
-useDevel       useDevel
diff --git a/EBSeq/BiocInstaller/help/BiocInstaller.rdb b/EBSeq/BiocInstaller/help/BiocInstaller.rdb
deleted file mode 100644 (file)
index e88fe48..0000000
Binary files a/EBSeq/BiocInstaller/help/BiocInstaller.rdb and /dev/null differ
diff --git a/EBSeq/BiocInstaller/help/BiocInstaller.rdx b/EBSeq/BiocInstaller/help/BiocInstaller.rdx
deleted file mode 100644 (file)
index 82d8f93..0000000
Binary files a/EBSeq/BiocInstaller/help/BiocInstaller.rdx and /dev/null differ
diff --git a/EBSeq/BiocInstaller/help/aliases.rds b/EBSeq/BiocInstaller/help/aliases.rds
deleted file mode 100644 (file)
index 9b2af13..0000000
Binary files a/EBSeq/BiocInstaller/help/aliases.rds and /dev/null differ
diff --git a/EBSeq/BiocInstaller/help/paths.rds b/EBSeq/BiocInstaller/help/paths.rds
deleted file mode 100644 (file)
index 7b4a225..0000000
Binary files a/EBSeq/BiocInstaller/help/paths.rds and /dev/null differ
diff --git a/EBSeq/BiocInstaller/html/00Index.html b/EBSeq/BiocInstaller/html/00Index.html
deleted file mode 100644 (file)
index 33a3a2e..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head><title>R: Install/Update Bioconductor and CRAN Packages</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<link rel="stylesheet" type="text/css" href="R.css">
-</head><body>
-<h1> Install/Update Bioconductor and CRAN Packages
-<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
-</h1>
-<hr>
-<div align="center">
-<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
-<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
-</div><h2>Documentation for package &lsquo;BiocInstaller&rsquo; version 1.12.0</h2>
-
-<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
-<li><a href="../NEWS">Package NEWS</a>.</li>
-</ul>
-
-<h2>Help Pages</h2>
-
-
-<table width="100%">
-<tr><td width="25%"><a href="packageGroups.html">all_group</a></td>
-<td>Convenience functions to return package names associated with Bioconductor publications.</td></tr>
-<tr><td width="25%"><a href="packageGroups.html">biocases_group</a></td>
-<td>Convenience functions to return package names associated with Bioconductor publications.</td></tr>
-<tr><td width="25%"><a href="biocinstallRepos.html">biocinstallRepos</a></td>
-<td>Display current Bioconductor and CRAN repositories.</td></tr>
-<tr><td width="25%"><a href="biocLite.html">biocLite</a></td>
-<td>Install or update Bioconductor and CRAN packages</td></tr>
-<tr><td width="25%"><a href="BiocUpgrade.html">BiocUpgrade</a></td>
-<td>Upgrade Bioconductor to the latest version available for this version of R</td></tr>
-<tr><td width="25%"><a href="biocValid.html">biocValid</a></td>
-<td>Validate installed package versions against biocLite versions.</td></tr>
-<tr><td width="25%"><a href="biocVersion.html">biocVersion</a></td>
-<td>Bioconductor version</td></tr>
-<tr><td width="25%"><a href="packageGroups.html">monograph_group</a></td>
-<td>Convenience functions to return package names associated with Bioconductor publications.</td></tr>
-<tr><td width="25%"><a href="packageGroups.html">RBioinf_group</a></td>
-<td>Convenience functions to return package names associated with Bioconductor publications.</td></tr>
-<tr><td width="25%"><a href="useDevel.html">useDevel</a></td>
-<td>Get the 'devel' version of the BiocInstaller package.</td></tr>
-</table>
-</body></html>
diff --git a/EBSeq/BiocInstaller/html/R.css b/EBSeq/BiocInstaller/html/R.css
deleted file mode 100644 (file)
index 6f058f3..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-BODY{          background: white;
-               color: black }
-
-A:link{         background: white;
-                color: blue }
-A:visited{     background: white;
-               color: rgb(50%, 0%, 50%) }
-
-H1{            background: white;
-               color: rgb(55%, 55%, 55%);
-               font-family: monospace;
-               font-size: x-large;
-               text-align: center }
-
-H2{            background: white;
-               color: rgb(40%, 40%, 40%);
-               font-family: monospace;
-               font-size: large;
-               text-align: center }
-
-H3{            background: white;
-               color: rgb(40%, 40%, 40%);
-               font-family: monospace;
-               font-size: large }
-
-H4{            background: white;
-               color: rgb(40%, 40%, 40%);
-               font-family: monospace;
-               font-style: italic;
-               font-size: large }
-
-H5{            background: white;
-               color: rgb(40%, 40%, 40%);
-               font-family: monospace }
-
-H6{            background: white;
-               color: rgb(40%, 40%, 40%);
-               font-family: monospace;
-               font-style: italic }
-               
-IMG.toplogo{   vertical-align: middle }
-
-IMG.arrow{     width: 30px;
-               height: 30px;
-               border: 0 }
-
-span.acronym{font-size: small}
-span.env{font-family: monospace}
-span.file{font-family: monospace}
-span.option{font-family: monospace}
-span.pkg{font-weight: bold}
-span.samp{font-family: monospace}
-
-div.vignettes a:hover {
-  background: rgb(85%, 85%, 85%);
-}
-
diff --git a/EBSeq/BiocInstaller/scripts/biocLite.R b/EBSeq/BiocInstaller/scripts/biocLite.R
deleted file mode 100644 (file)
index 9940cfb..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-## Mirrors: uncomment the following and change to your favorite CRAN mirror
-## if you don't want to use the default (cran.fhcrc.org, Seattle, USA).
-## options("repos" = c(CRAN="http://cran.fhcrc.org"))
-
-## Mirrors: uncomment the following and change to your favorite Bioconductor
-## mirror, if you don't want to use the default (www.bioconductor.org,
-## Seattle, USA)
-## options("BioC_mirror" = "http://www.bioconductor.org")
-
-local({
-    currBiocVers <- 
-        package_version(readLines("http://bioconductor.org/bioc-version",
-        warn=FALSE))
-    vers <- getRversion()
-    biocVers <- tryCatch({
-        BiocInstaller::biocVersion() # recent BiocInstaller
-    }, error=function(...) {         # no / older BiocInstaller
-        tools:::.BioC_version_associated_with_R_version
-    })
-
-    if (biocVers < currBiocVers) {
-        txt <- strwrap(sprintf("Your Bioconductor is out-of-date, upgrade
-            to version %s by following instructions at
-            http://bioconductor.org/install.", currBiocVers))
-        message(paste(txt, collapse="\n"))
-    }
-
-    if (vers > "2.13" && biocVers > "2.8") {
-
-        if (exists("biocLite", .GlobalEnv, inherits=FALSE)) {
-            txt <- strwrap("There is an outdated biocLite() function in the
-                global environment; run 'rm(biocLite)' and try again.")
-            stop("\n", paste(txt, collapse="\n"))
-        }
-          
-        if (!suppressWarnings(require("BiocInstaller", quietly=TRUE))) {
-            a <- NULL
-            p <- file.path(Sys.getenv("HOME"), ".R", "repositories")
-            if (file.exists(p)) {
-                a <- tools:::.read_repositories(p)
-                if (!"BioCsoft" %in% rownames(a)) 
-                    a <- NULL
-            }
-            if (is.null(a)) {
-                p <- file.path(R.home("etc"), "repositories")
-                a <- tools:::.read_repositories(p)
-            }
-            if (!"package:utils" %in% search()) {
-                url <- "http://bioconductor.org/biocLite.R"
-                txt <- sprintf("use 'source(\"%s\")' to update 'BiocInstaller'
-                                after 'utils' package is attached",
-                               url)
-                message(paste(strwrap(txt), collapse="\n  "))
-            } else {
-                ## add a conditional for Bioc releases occuring WITHIN
-                ## a single R minor version
-                if (vers >= "2.15" && vers < "2.16") {
-                    a["BioCsoft", "URL"] <- sub(as.character(biocVers), "2.11",
-                      a["BioCsoft", "URL"])
-                    biocVers <- numeric_version("2.11")
-                }
-                install.packages("BiocInstaller", repos=a["BioCsoft", "URL"])
-                if (!suppressWarnings(require("BiocInstaller",
-                                              quietly=TRUE))) {
-                    url0 <- "http://www.bioconductor.org/packages"
-                    url <- sprintf("%s/%s/bioc",
-                                   url0, as.character(biocVers))
-                    txt0 <- "'biocLite.R' failed to install 'BiocInstaller',
-                            use 'install.packages(\"%s\", repos=\"%s\")'"
-                    txt <- sprintf(txt0, "BiocInstaller", url)
-                    message(paste(strwrap(txt), collapse="\n  "))
-                }
-            }
-        }
-    } else {
-        source("http://bioconductor.org/getBioC.R")
-        biocLite <<-
-            function(pkgs, groupName="lite", ...)
-            {
-                if (missing(pkgs))
-                    biocinstall(groupName=groupName, ...)
-                else
-                    biocinstall(pkgs=pkgs, groupName=groupName, ...)
-            }
-    }
-})
diff --git a/EBSeq/BiocInstaller/unitTests/test_BiocUpgrade.R b/EBSeq/BiocInstaller/unitTests/test_BiocUpgrade.R
deleted file mode 100644 (file)
index d4cb4e7..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-test_useDevel <- function()
-{
-    if (!BiocInstaller:::IS_END_OF_LIFE) {
-        checkException(useDevel(), silent=TRUE)
-    } else if (!BiocInstaller:::IS_DOWNGRADEABLE) {
-        checkException(useDevel(FALSE), silent=TRUE)
-    }
-    if (!BiocInstaller:::IS_UPGRADEABLE) {
-        checkException(useDevel(), silent=TRUE)
-        opts <- options(warn=2); on.exit(options(opts))
-        checkException(biocLite("BiocUpgrade"))
-    }
-}
-
-test_getContribUrl_exist <- function()
-{
-    fun <- BiocInstaller:::.getContribUrl
-    
-    vers <- BiocInstaller:::BIOC_VERSION
-    checkTrue(grepl(vers, fun(vers)))
-    if (BiocInstaller:::IS_UPGRADEABLE) {
-        vers <- BiocInstaller:::UPGRADE_VERSION
-        checkTrue(grepl(vers, fun(vers)))
-    }
-    if (BiocInstaller:::IS_DOWNGRADEABLE) {
-        vers <- BiocInstaller:::DOWNGRADE_VERSION
-        checkTrue(grepl(vers, fun(vers)))
-    }
-}
diff --git a/EBSeq/BiocInstaller/unitTests/test_biocinstallRepos.R b/EBSeq/BiocInstaller/unitTests/test_biocinstallRepos.R
deleted file mode 100644 (file)
index e6fb520..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-repos <- biocinstallRepos()
-
-test_biocinstallRepos_named_repositories <- function()
-{
-
-    allOS <- c("BioCsoft", "CRAN", "BioCann", "BioCexp", "BioCextra")
-    windowsOnly <- "CRANextra"
-
-    checkTrue(all(allOS %in% names(repos)))
-    if (.Platform$OS.type == "windows")
-    {
-        checkTrue(windowsOnly %in% names(repos))
-    } else {
-        checkTrue(!windowsOnly %in% names(repos))
-    }
-   
-}
-
-test_biocinstallRepos_noNA_repositories <- function()
-{
-    checkTrue(!any(is.na(repos)))
-}
-
-test_biocinstallRepos_order <- function()
-{
-    checkIdentical("BioCsoft", names(repos)[[1]])
-}
index bf25454731aeb30ec5d71eadead83eceb922023b..898c8fa4cf2dc5b4a1f135e76d3b89d818213d52 100644 (file)
@@ -10,4 +10,4 @@ rsem-for-ebseq-calculate-clustering-info : calcClusteringInfo.cpp
        $(CC) -O3 -Wall calcClusteringInfo.cpp -o $@
 
 clean : 
-       rm -rf blockmodeling $(PROGRAMS) *~ 
+       rm -rf blockmodeling $(PROGRAMS) *~ BiocInstaller
index dddf4bdf593cea00a8534e2c2dfe259f4d1c9be6..902e806821e6de5ef39eba708edf9d43c82c69ee 100644 (file)
--- a/README.md
+++ b/README.md
@@ -459,7 +459,7 @@ differential expression analysis.
 
 We thank earonesty and Dr. Samuel Arvidsson for contributing patches.
 
-We thank Han Lin, j.miller, Jo&euml;l Fillon and Dr. Samuel G. Younkin for suggesting possible fixes. 
+We thank Han Lin, j.miller, Jo&euml;l Fillon, Dr. Samuel G. Younkin and Malcolm Cook for suggesting possible fixes. 
 
 ## <a name="license"></a> License
 
index c0776162e064ef7bec9eeefbdf0412be4a22f8ad..a7300f272ea127121dfc9592c76ed612d53ce798 100755 (executable)
@@ -2,14 +2,18 @@
 
 use Getopt::Long;
 use Pod::Usage;
-use FindBin;
-use lib $FindBin::Bin;
 use File::Basename;
 use File::Path 'rmtree';
-use strict;
 
+use FindBin;
+use lib $FindBin::RealBin;
 use rsem_perl_utils;
 
+use Env qw(@PATH);
+push(@PATH, $FindBin::RealBin, "$FindBin::RealBin/sam");
+
+use strict;
+
 my ($in_file, $out_file) = ();
 
 my @tmp_dirs = ();
@@ -33,8 +37,6 @@ $suf = lc(substr($suf, 1));
 pod2usage(-msg => "Input file's suffix is neither sam nor bam!", -exitval => 2, -verbose => 2) if (($suf ne "sam") && ($suf ne "bam"));
 my $isSam = ($suf eq "sam");
 
-$dir = "$FindBin::Bin/";
-
 my $temp_dir = "$out_file.temp";
 if (-d $temp_dir) { print "Warning: $temp_dir exists, convert-sam-for-rsem will write temporary files into this folder and delete it after it finishes!\n"; }
 else {
@@ -47,7 +49,7 @@ my $sam_file;
 
 if (!$isSam) {
     $sam_file = "$temp_dir/input.sam";
-    $command = $dir."sam/samtools view -h -o $sam_file $in_file";
+    $command = "samtools view -h -o $sam_file $in_file";
     &runCommand($command); 
 }
 else {
@@ -70,7 +72,7 @@ $command .= " >> $tmp_sam";
 
 # Phase II, parse the temporary SAM file to make paired-end alignments' two mates adjacent to each other
 
-$command = $dir."rsem-scan-for-paired-end-reads $tmp_sam $out_file";
+$command = "rsem-scan-for-paired-end-reads $tmp_sam $out_file";
 &runCommand($command);
 
 # delete temporary directory
@@ -80,7 +82,7 @@ print STDERR "Conversion is completed. $out_file will be checked by 'rsem-sam-va
 
 # Phase III, validate if the resulting bam file is correct
 
-$command = $dir."rsem-sam-validator $out_file";
+$command = "rsem-sam-validator $out_file";
 &runCommand($command);
 
 __END__
index a9f26c9d47142988d4d7e2fd52022f673f2e2819..9040272a68c592a4a9cd7c7d532add78e448f942 100755 (executable)
@@ -2,12 +2,16 @@
 
 use Getopt::Long;
 use Pod::Usage;
-use FindBin;
-use lib $FindBin::Bin;
-use strict;
 
+use FindBin;
+use lib $FindBin::RealBin;
 use rsem_perl_utils qw(runCommand collectResults showVersionInfo);
 
+use Env qw(@PATH);
+push(@PATH, $FindBin::RealBin, "$FindBin::RealBin/sam");
+
+use strict;
+
 #const
 my $BURNIN = 200;
 my $NCV = 1000;
@@ -127,10 +131,8 @@ GetOptions("keep-intermediate-files" => \$keep_intermediate_files,
           "q|quiet" => \$quiet,
           "h|help" => \$help) or pod2usage(-exitval => 2, -verbose => 2);
 
-my $dir = "$FindBin::Bin/";
-
 pod2usage(-verbose => 2) if ($help == 1);
-&showVersionInfo($dir) if ($version == 1);
+&showVersionInfo($FindBin::RealBin) if ($version == 1);
 
 #check parameters and options
 
@@ -251,7 +253,7 @@ if (!$is_sam && !$is_bam) {
        }
 
        # pipe to samtools to generate a BAM file
-       $command .= " | $dir\sam/samtools view -S -b -o $imdName.bam -";
+       $command .= " | samtools view -S -b -o $imdName.bam -";
     }
     else {
        $command = $bowtie2_path."bowtie2";
@@ -286,7 +288,7 @@ if (!$is_sam && !$is_bam) {
        }
 
        # pipe to samtools to generate a BAM file
-       $command .= " | $dir\sam/samtools view -S -b -o $imdName.bam -";
+       $command .= " | samtools view -S -b -o $imdName.bam -";
     }
 
     if ($mTime) { $time_start = time(); }
@@ -301,7 +303,7 @@ if (!$is_sam && !$is_bam) {
 
 if ($mTime) { $time_start = time(); }
 
-$command = $dir."rsem-parse-alignments $refName $imdName $statName";
+$command = "rsem-parse-alignments $refName $imdName $statName";
 
 my $samInpType;
 if ($is_sam) { $samInpType = "s"; } 
@@ -314,7 +316,7 @@ if ($quiet) { $command .= " -q"; }
 
 &runCommand($command);
 
-$command = $dir."rsem-build-read-index $gap"; 
+$command = "rsem-build-read-index $gap"; 
 if ($read_type == 0) { $command .= " 0 $quiet $imdName\_alignable.fa"; }
 elsif ($read_type == 1) { $command .= " 1 $quiet $imdName\_alignable.fq"; }
 elsif ($read_type == 2) { $command .= " 0 $quiet $imdName\_alignable_1.fa $imdName\_alignable_2.fa"; }
@@ -333,7 +335,7 @@ print OUTPUT "$mean $sd\n";
 print OUTPUT "$L\n";
 close(OUTPUT);  
 
-$command = $dir."rsem-run-em $refName $read_type $sampleName $imdName $statName -p $nThreads";
+$command = "rsem-run-em $refName $read_type $sampleName $imdName $statName -p $nThreads";
 if ($genBamF) { 
     $command .= " -b $samInpType $inpF";
     if ($fn_list ne "") { $command .= " 1 $fn_list"; }
@@ -356,17 +358,17 @@ else {
 }
 
 if ($genBamF) {
-    $command = $dir."sam/samtools sort -@ $nThreads -m $SortMem $sampleName.transcript.bam $sampleName.transcript.sorted";
+    $command = "samtools sort -@ $nThreads -m $SortMem $sampleName.transcript.bam $sampleName.transcript.sorted";
     &runCommand($command);
-    $command = $dir."sam/samtools index $sampleName.transcript.sorted.bam";
+    $command = "samtools index $sampleName.transcript.sorted.bam";
     &runCommand($command);
 
     if ($genGenomeBamF) {
-       $command = $dir."rsem-tbam2gbam $refName $sampleName.transcript.bam $sampleName.genome.bam";
+       $command = "rsem-tbam2gbam $refName $sampleName.transcript.bam $sampleName.genome.bam";
        &runCommand($command);
-       $command = $dir."sam/samtools sort -@ $nThreads -m $SortMem $sampleName.genome.bam $sampleName.genome.sorted";
+       $command = "samtools sort -@ $nThreads -m $SortMem $sampleName.genome.bam $sampleName.genome.sorted";
        &runCommand($command);
-       $command = $dir."sam/samtools index $sampleName.genome.sorted.bam";
+       $command = "samtools index $sampleName.genome.sorted.bam";
        &runCommand($command);
     }
 }
@@ -376,7 +378,7 @@ if ($mTime) { $time_end = time(); $time_rsem = $time_end - $time_start; }
 if ($mTime) { $time_start = time(); }
 
 if ($calcPME || $var_opt || $calcCI ) {
-    $command = $dir."rsem-run-gibbs $refName $imdName $statName $BURNIN $NCV $SAMPLEGAP";
+    $command = "rsem-run-gibbs $refName $imdName $statName $BURNIN $NCV $SAMPLEGAP";
     $command .= " -p $nThreads";
     if ($var_opt) { $command .= " --var"; }
     if ($quiet) { $command .= " -q"; }
@@ -401,7 +403,7 @@ if ($calcPME || $calcCI) {
 }
 
 if ($calcCI) {
-    $command = $dir."rsem-calculate-credibility-intervals $refName $imdName $statName $CONFIDENCE $NCV $NSPC $NMB";
+    $command = "rsem-calculate-credibility-intervals $refName $imdName $statName $CONFIDENCE $NCV $NSPC $NMB";
     $command .= " -p $nThreads";
     if ($quiet) { $command .= " -q"; }
     &runCommand($command);
index dc874a916157576c5b8e5653e389b02765cb8576..44066b70e14811bbc0749c9fed84f5ccdd8802be 100755 (executable)
@@ -2,12 +2,16 @@
 
 use Getopt::Long;
 use Pod::Usage;
-use FindBin;
-use lib $FindBin::Bin;
-use strict;
 
+use FindBin;
+use lib $FindBin::RealBin;
 use rsem_perl_utils;
 
+use Env qw(@PATH);
+push(@PATH, "$FindBin::RealBin/EBSeq");
+
+use strict;
+
 my $k = 25;
 my $help = 0;
 
@@ -17,13 +21,12 @@ GetOptions("k=i" => \$k,
 pod2usage(-verbose => 2) if ($help == 1);
 pod2usage(-msg => "Invalid number of arguments!", -exitval => 2, -verbose => 2) if (scalar(@ARGV) != 2);
 
-my $dir = "$FindBin::Bin/";
 my $command = "";
 
-$command = $dir."EBSeq/rsem-for-ebseq-calculate-clustering-info $k $ARGV[0] $ARGV[1].ump";
+$command = "rsem-for-ebseq-calculate-clustering-info $k $ARGV[0] $ARGV[1].ump";
 &runCommand($command);
 
-$command = $dir."EBSeq/rsem-for-ebseq-generate-ngvector-from-clustering-info $ARGV[1].ump $ARGV[1].ngvec";
+$command = "rsem-for-ebseq-generate-ngvector-from-clustering-info $ARGV[1].ump $ARGV[1].ngvec";
 &runCommand($command);
 
 __END__
index 3aa7e359290b9cab8ef845f375da37a26c8208fe..1d14a22a26ce7d0f8bceb4249abb8024bf8571c1 100755 (executable)
@@ -2,11 +2,16 @@
 
 use Getopt::Long;
 use Pod::Usage;
+
 use FindBin;
-use lib $FindBin::Bin;
+use lib $FindBin::RealBin;
+use rsem_perl_utils;
+
+use Env qw(@PATH);
+push(@PATH, $FindBin::RealBin, "$FindBin::RealBin/sam");
+
 use strict;
 
-use rsem_perl_utils;
 
 my $gene_list = 0; # default is 0, means input is not a gene list
 my $transcript_list = 0; # default is 0, this option can only be turned on if allele-specific expression is calculated
@@ -27,29 +32,28 @@ if (-e "$ARGV[0].alleles.results") { $alleleS = 1; }
 pod2usage(-msg => "--transcript-list cannot be set if allele-specific reference is not built!", -exitval => 2, -verbose => 2) if (!$alleleS && $transcript_list);
 pod2usage(-msg => "--gene-list and --transcript-list cannot be set at the same time!", -exitval => 2, -verbose => 2) if ($gene_list && $transcript_list);
 
-my $dir = "$FindBin::Bin/";
 my $command = "";
 
 unless (-e "$ARGV[0].transcript.sorted.bam") {
-    $command = $dir."sam/samtools sort $ARGV[0].transcript.bam $ARGV[0].transcript.sorted";
+    $command = "samtools sort $ARGV[0].transcript.bam $ARGV[0].transcript.sorted";
     &runCommand($command);
 }
 unless (-e "$ARGV[0].transcript.readdepth") {
-    $command = $dir."rsem-bam2readdepth $ARGV[0].transcript.sorted.bam $ARGV[0].transcript.readdepth";
+    $command = "rsem-bam2readdepth $ARGV[0].transcript.sorted.bam $ARGV[0].transcript.readdepth";
     &runCommand($command);
 }
 
 if ($show_unique) {
     unless (-e "$ARGV[0].uniq.transcript.bam") {
-       $command = $dir."rsem-get-unique $ARGV[0].transcript.bam $ARGV[0].uniq.transcript.bam";
+       $command = "rsem-get-unique $ARGV[0].transcript.bam $ARGV[0].uniq.transcript.bam";
        &runCommand($command);
     }
     unless (-e "$ARGV[0].uniq.transcript.sorted.bam") {
-       $command = $dir."sam/samtools sort $ARGV[0].uniq.transcript.bam $ARGV[0].uniq.transcript.sorted";
+       $command = "samtools sort $ARGV[0].uniq.transcript.bam $ARGV[0].uniq.transcript.sorted";
        &runCommand($command);
     }
     unless (-e "$ARGV[0].uniq.transcript.readdepth") {
-       $command = $dir."rsem-bam2readdepth $ARGV[0].uniq.transcript.sorted.bam $ARGV[0].uniq.transcript.readdepth";
+       $command = "rsem-bam2readdepth $ARGV[0].uniq.transcript.sorted.bam $ARGV[0].uniq.transcript.readdepth";
        &runCommand($command);
     }
 }
@@ -66,7 +70,7 @@ else {
     if ($gene_list) { $id_type = 2; }
 }
 
-$command = $dir."rsem-gen-transcript-plots $ARGV[0] $ARGV[1] $alleleS $id_type $show_unique $ARGV[2]";
+$command = "rsem-gen-transcript-plots $ARGV[0] $ARGV[1] $alleleS $id_type $show_unique $ARGV[2]";
 &runCommand($command);
 
 __END__
index 8050356e567e2b260457e0b7ba311fe63b9c3b1b..a74d97d194fce454a99b8714284d67fbf2d3dcfc 100755 (executable)
@@ -3,11 +3,14 @@
 use Getopt::Long;
 use Pod::Usage;        
 use FindBin;
-use lib $FindBin::Bin;
-use strict;
-
+use lib $FindBin::RealBin;
 use rsem_perl_utils;
 
+use Env qw(@PATH);
+push(@PATH, $FindBin::RealBin);
+
+use strict;
+
 my $status;
 
 my $gtfF = "";
@@ -75,12 +78,11 @@ elsif ($subsetFile ne "") { $polyAChoice = 2; }
 if ($bowtie_path ne "") { $bowtie_path .= "/"; }
 if ($bowtie2_path ne "") { $bowtie2_path .= "/"; }
 
-my $dir = "$FindBin::Bin/";
 my $command = "";
 
 if ($type == 0) {
     $"=" ";
-    $command = $dir."rsem-extract-reference-transcripts $ARGV[1] $quiet $gtfF";
+    $command = "rsem-extract-reference-transcripts $ARGV[1] $quiet $gtfF";
     if ($mappingF ne "") { $command .= " 1 $mappingF"; }
     else { $command .= " 0"; }
     $command .= " @list";
@@ -88,7 +90,7 @@ if ($type == 0) {
 }
 else {
     $"=" ";
-    $command = $dir."rsem-synthesis-reference-transcripts $ARGV[1] $quiet";
+    $command = "rsem-synthesis-reference-transcripts $ARGV[1] $quiet";
     if ($mappingF ne "") { $command .= " 1 $mappingF"; }
     elsif ($alleleMappingF ne "") { $command .= " 2 $alleleMappingF"; }
     else { $command .= " 0"; } 
@@ -96,7 +98,7 @@ else {
     &runCommand($command);
 }
 
-$command = $dir."rsem-preref $ARGV[1].transcripts.fa $polyAChoice $ARGV[1] -l $polyALen";
+$command = "rsem-preref $ARGV[1].transcripts.fa $polyAChoice $ARGV[1] -l $polyALen";
 if ($polyAChoice == 2) { $command .= " -f $subsetFile"; }
 if ($no_ntog) { $command .= " --no-ntog"; }
 if ($quiet) { $command .= " -q"; }
index 9693eeea13e550f63879514173a346c328dbc66d..59d35c87279a62721954f2b2c63f81dc45ec17ae 100755 (executable)
@@ -2,12 +2,16 @@
 
 use Getopt::Long;
 use Pod::Usage;
-use FindBin;
-use lib $FindBin::Bin;
-use strict;
 
+use FindBin;
+use lib $FindBin::RealBin;
 use rsem_perl_utils;
 
+use Env qw(@PATH);
+push(@PATH, "$FindBin::RealBin/EBSeq");
+
+use strict;
+
 my $ngvF = "";
 my $help = 0;
 
@@ -18,7 +22,6 @@ pod2usage(-verbose => 2) if ($help == 1);
 pod2usage(-msg => "Invalid number of arguments!", -exitval => 2, -verbose => 2) if (scalar(@ARGV) != 3);
 pod2usage(-msg => "ngvector file cannot be named as #! # is reserved for other purpose!", -exitval => 2, -verbose => 2) if ($ngvF eq "#");
 
-my $dir = "$FindBin::Bin/";
 my $command = "";
 
 my @conditions = split(/,/, $ARGV[1]);
@@ -28,7 +31,7 @@ pod2usage(-msg => "At least 2 conditions are required for differential expressio
 if ($ngvF eq "") { $ngvF = "#"; }
 
 $" = " ";
-$command = $dir."EBSeq/rsem-for-ebseq-find-DE ".$dir."EBSeq $ngvF $ARGV[0] $ARGV[2] @conditions";
+$command = "rsem-for-ebseq-find-DE $FindBin::RealBin/EBSeq $ngvF $ARGV[0] $ARGV[2] @conditions";
 &runCommand($command)
 
 __END__
index 6355f67a07f88fcf4207407325542644c2c5a454..078d119276267983c7b5b940e8fb738ecfcaf768 100644 (file)
@@ -86,9 +86,9 @@ sub collectResults {
     close(OUTPUT);
 }
 
-# dir
+# 0, dir
 sub showVersionInfo {
-    open(INPUT, "$_[0]\WHAT_IS_NEW");
+    open(INPUT, "$_[0]/WHAT_IS_NEW");
     my $line = <INPUT>;
     chomp($line);
     close(INPUT);