-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/phyloseq@125506 bc3139a8-67e5-0310-9ffc-ced21a209358
- Loading branch information
Showing
6 changed files
with
130 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,49 @@ | ||
thisVer <- getRversion() | ||
if(!compareVersion(as.character(thisVer), "3.0.0") >=0) | ||
stop("R v3.0 or greater is required") | ||
## Step 1 | ||
## Install the release version from BioC | ||
source("http://bioconductor.org/biocLite.R") | ||
biocLite("phyloseq") | ||
## You may also want to go further and install the latest devel from BioC, | ||
## or further still, from GitHub (the most recent). | ||
## Step 2 | ||
## Install from BioC-devel | ||
devel = "http://bioconductor.org/packages/2.14/bioc" | ||
biocLite("phyloseq", siteRepos=devel, suppressUpdates=TRUE, type="source") | ||
## Step 3 | ||
## Use devtools::install_github to install latest version of phyloseq from GitHub | ||
if(!require("devtools", quietly=TRUE)){ | ||
# Note: needs Curl for RCurl | ||
install.packages("devtools") | ||
############################## | ||
# An example function for installing phyloseq from various sources | ||
############################## | ||
install_phyloseq = function(branch = "release", | ||
minRVersion = "3.3.0", | ||
verbose = TRUE){ | ||
if(!compareVersion(as.character(getRversion()), minRVersion) >=0){ | ||
stop("phyloseq installation script failed.\n", | ||
"R ", minRVersion, " or greater is required.") | ||
} | ||
branch <- as.character(branch) | ||
if(branch == "release"){ | ||
if(verbose){ | ||
message("Installing the release version from BioC") | ||
} | ||
source("http://bioconductor.org/biocLite.R") | ||
biocLite("phyloseq", suppressUpdates=TRUE) | ||
return("phyloseq installed from BioC release branch (if no errors).") | ||
} | ||
if(branch == "devel"){ | ||
if(verbose){ | ||
message("\n\nInstalling phyloseq from the devel version from BioC...\n") | ||
} | ||
biocLite("phyloseq", | ||
siteRepos="http://bioconductor.org/packages/devel/bioc", | ||
suppressUpdates=TRUE, | ||
type="source") | ||
return("phyloseq installed from BioC devel branch (if no errors).") | ||
} | ||
if(branch == "github"){ | ||
if(verbose){ | ||
message("Installing the devel version from joey711/master from GitHub") | ||
} | ||
if(!require("devtools", quietly=TRUE)){ | ||
# Note: needs Curl for RCurl | ||
install.packages("devtools") | ||
} | ||
library("devtools") | ||
devtools::install_github("joey711/phyloseq") | ||
return("phyloseq installed from GitHub `joey711/phyloseq` (if no errors).") | ||
} | ||
return("You probably selected an unsupported argument to `branch`. | ||
Try again using 'release', 'devel', or 'github'.") | ||
} | ||
library("devtools") | ||
devtools::install_github("phyloseq", "joey711") | ||
############### | ||
# Execute the function w/ default params. | ||
# You can select alternatives if you want :-) | ||
############### | ||
install_phyloseq() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters