Skip to content

Commit

Permalink
1.19.1 test fixes and updates
Browse files Browse the repository at this point in the history
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/phyloseq@125506 bc3139a8-67e5-0310-9ffc-ced21a209358
  • Loading branch information
joey711 committed Dec 29, 2016
1 parent b2c3986 commit 0a8285a
Show file tree
Hide file tree
Showing 6 changed files with 130 additions and 67 deletions.
52 changes: 26 additions & 26 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
Package: phyloseq
Version: 1.19.1
Date: 2016-04-16
Date: 2016-12-29
Title: Handling and analysis of high-throughput microbiome
census data
Description: phyloseq provides a set of classes and tools
to facilitate the import, storage, analysis, and
graphical display of microbiome census data.
Maintainer: Paul J. McMurdie <mcmurdie@stanford.edu>
Author: Paul J. McMurdie <mcmurdie@stanford.edu>,
Maintainer: Paul J. McMurdie <joey711@gmail.com>
Author: Paul J. McMurdie <joey711@gmail.com>,
Susan Holmes <susan@stat.stanford.edu>, with
contributions from Gregory Jordan and Scott Chamberlain
License: AGPL-3
Imports:
BiocGenerics (>= 0.14.0),
ade4 (>= 1.7-2),
ape (>= 3.1.1),
biomformat (>= 0.4.0),
Biostrings (>= 2.28.0),
cluster (>= 1.14.4),
BiocGenerics (>= 0.18.0),
ade4 (>= 1.7.4),
ape (>= 3.4),
biomformat (>= 1.0.0),
Biostrings (>= 2.40.0),
cluster (>= 2.0.4),
data.table (>= 1.9.6),
foreach (>= 1.4.2),
foreach (>= 1.4.3),
ggplot2 (>= 2.1.0),
igraph (>= 0.7.0),
methods (>= 3.1.0),
multtest (>= 2.16.0),
plyr (>= 1.8),
reshape2 (>= 1.2.2),
scales (>= 0.3.0),
vegan (>= 2.0.10),
igraph (>= 1.0.1),
methods (>= 3.3.0),
multtest (>= 2.28.0),
plyr (>= 1.8.3),
reshape2 (>= 1.4.1),
scales (>= 0.4.0),
vegan (>= 2.3.5),
Biobase
Depends:
R (>= 3.2.0)
R (>= 3.3.0)
Suggests:
BiocStyle (>= 1.6),
DESeq2 (>= 1.8),
genefilter (>= 1.50),
testthat (>= 0.10),
knitr (>= 1.10),
metagenomeSeq (>= 1.10),
rmarkdown (>= 0.7)
BiocStyle (>= 2.0.0),
DESeq2 (>= 1.12.0),
genefilter (>= 1.54),
testthat (>= 1.0.2),
knitr (>= 1.13),
metagenomeSeq (>= 1.14),
rmarkdown (>= 0.9.6)
VignetteBuilder: knitr
Enhances: doParallel (>= 1.0.1)
Enhances: doParallel (>= 1.0.10)
biocViews: Sequencing, Microbiome, Metagenomics,
Clustering, Classification, MultipleComparison,
GeneticVariability
Expand Down
29 changes: 15 additions & 14 deletions R/ordination-methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,13 @@ ordinate = function(physeq, method="DCA", distance="bray", formula=NULL, ...){
#' to perform a
#' Double Principle Coordinate Analysis (DPCoA), relying heavily on
#' the underlying (and more general) function, \code{\link[ade4]{dpcoa}}.
#' The distance object ultimately provided as the cophenetic/patristic
#' (\code{\link[ape]{cophenetic.phylo}}) distance between the species.
#'
#' In most real-life, real-data applications, the phylogenetic tree
#' will not provide a Euclidean distance matrix, and so a correction
#' will be performed, if needed. See \code{correction} argument.
#' The distance object ultimately provided is the square root of the
#' cophenetic/patristic (\code{\link[ape]{cophenetic.phylo}}) distance
#' between the species, which is always Euclidean.
#'
#' Although this distance is Euclidean, for numerical reasons it
#' will sometimes look non-Euclidean, and a correction will be performed.
#' See \code{correction} argument.
#'
#' @param physeq (Required). A \code{\link{phyloseq-class}} object
#' containing, at a minimum, abundance (\code{\link{otu_table-class}}) and
Expand All @@ -265,14 +266,14 @@ ordinate = function(physeq, method="DCA", distance="bray", formula=NULL, ...){
#' and return a new \code{dist}ance object that is Euclidean.
#' If testing a distance object, try \code{\link[ade4]{is.euclid}}.
#'
#' In most real-life, real-data applications, the phylogenetic tree
#' will not provide a Euclidean distance matrix, and so a correction
#' will be needed.
#' Two recommended correction methods are
#'
#' Although the distance matrix should always be Euclidean, for numerical
#' reasons it will sometimes appear non-Euclidean and a correction method must
#' be applied. Two recommended correction methods are
#' \code{\link[ade4]{cailliez}} and \code{\link[ade4]{lingoes}}.
#' The default is \code{cailliez},
#' but not for any particularly special reason. If the patristic
#' distance matrix turns out to be Euclidian, no correction will be
#' but not for any particularly special reason. If the
#' distance matrix is Euclidian, no correction will be
#' performed, regardless of the value of the \code{correction} argument.
#'
#' @param scannf (Optional). Logical. Default is \code{FALSE}. This
Expand Down Expand Up @@ -335,7 +336,7 @@ DPCoA <- function(physeq, correction=cailliez, scannf=FALSE, ...){
if(taxa_are_rows(OTU) ){ OTU <- t(OTU) }

# get the patristic distances between the species from the tree
patristicDist <- as.dist(cophenetic.phylo(tree))
patristicDist <- sqrt(as.dist(cophenetic.phylo(tree)))

# if the patristic distances are not Euclidean,
# then correct them or throw meaningful error.
Expand Down Expand Up @@ -638,4 +639,4 @@ function(physeq, formula, distance, ...){
return(capscale.phyloseq(physeq, formula, distance, ...))
}
})
################################################################################
################################################################################
38 changes: 33 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,47 @@

McMurdie and Holmes (2014)
[Waste Not, Want Not: Why Rarefying Microbiome Data is Statistically Inadmissible](http://dx.plos.org/10.1371/journal.pcbi.1003531)
PLoS Computational Biology 10(4): e1003531
*PLoS Computational Biology*
10(4): e1003531

Presubmission versions ahead of acceptance (2013):
[PDF version 2](http://arxiv.org/pdf/1310.0424v2.pdf),
[PDF version 1](http://arxiv.org/pdf/1310.0424v1.pdf)


## Latest peer-reviewed article about phyloseq
## Peer-reviewed articles about phyloseq

[phyloseq: An R package for reproducible interactive analysis and graphics of microbiome census data](http://dx.plos.org/10.1371/journal.pone.0061217) (2013) PLoS ONE 8(4):e61217
McMurdie and Holmes (2014) [Shiny-phyloseq: Web Application for Interactive Microbiome Analysis with Provenance Tracking](http://bioinformatics.oxfordjournals.org/content/early/2014/10/02/bioinformatics.btu616).
*Bioinformatics (Oxford, England)*
31(2), 282–283.

McMurdie and Holmes (2013)
[phyloseq: An R package for reproducible interactive analysis and graphics of microbiome census data](http://dx.plos.org/10.1371/journal.pone.0061217)
*PLoS ONE*
8(4):e61217

## Other resources

The phyloseq project also has a number of supporting online resources, most of which can by found at [the phyloseq home page](http://joey711.github.com/phyloseq/), or from the phyloseq stable release [page on Bioconductor](http://bioconductor.org/packages/release/bioc/html/phyloseq.html).
The phyloseq project also has a number of supporting online resources,
including (but probably not limited to)

### [the phyloseq home page](http://joey711.github.com/phyloseq/)

### [the phyloseq FAQ](https://www.bioconductor.org/packages/release/bioc/vignettes/phyloseq/inst/doc/phyloseq-FAQ.html)
I recommend checking this page, and the issues tracker,
before posting new issues.

### [Bioconductor stable release](http://bioconductor.org/packages/release/bioc/html/phyloseq.html).

### [the phyloseq Issue Tracker](https://github.com/joey711/phyloseq/issues)
This is the recommended location to post

(1) feature requests
(2) bug reports
(3) theoretical considerations
(4) other issues, feedback
(5) ask for help

To post feature requests or ask for help, try [the phyloseq Issue Tracker](https://github.com/joey711/phyloseq/issues).
Search previous posts,
and check [the phyloseq FAQ](https://www.bioconductor.org/packages/release/bioc/vignettes/phyloseq/inst/doc/phyloseq-FAQ.html)
before posting a new issue.
68 changes: 48 additions & 20 deletions inst/scripts/installer.R
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()
2 changes: 1 addition & 1 deletion tests/testthat/test-IO.R
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ treefilename = system.file("extdata", "biom-tree.phy", package="phyloseq")
refseqfilename = system.file("extdata", "biom-refseq.fasta", package="phyloseq")

test_that("Importing biom files yield phyloseq objects", {
library(biom)
library("biomformat")
rdbiom = read_biom(rich_sparse_biom)
rsbiom = read_biom(rich_sparse_biom)

Expand Down
8 changes: 7 additions & 1 deletion vignettes/phyloseq-mixture-models.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,17 @@ Kostic, A. D., Gevers, D., Pedamallu, C. S., Michaud, M., Duke, F., Earl, A. M.,

As a side-note, this work was published ahead of print in [Genome Research](http://genome.cshlp.org/) alongside a highly-related article from a separate group of researchers (long-live reproducible observations!): [Fusobacterium nucleatum infection is prevalent in human colorectal carcinoma](http://genome.cshlp.org/content/22/2/299.long). In case you are interested. For the purposes of example, however, we will stick to the data from the former study, with data available at the [microbio.me/qiime](http://www.microbio.me/qiime/) server.

Data source, from methods section in article:

> The 16S gene data set consists of 454 FLX Titanium sequences spanning the V3 to V5 variable regions obtained for 190 samples (95 pairs). Detailed protocols used for 16S amplification and se- quencing are available on the HMP Data Analysis and Coordination Center website (http://www.hmpdacc.org/tools_protocols/tools_ protocols.php).
Study ID: `1457`

Project Name: `Kostic_colorectal_cancer_fusobacterium`

Study Abstract: The tumor microenvironment of colorectal carcinoma is a complex community of genomically altered cancer cells, nonneoplastic cells, and a diverse collection of microorganisms. Each of these components may contribute to carcino genesis; however, the role of the microbiota is the least well understood. We have characterized the composition of the microbiota in colorectal carcinoma using whole genome sequences from nine tumor/normal pairs. Fusobacterium sequences were enriched in carcinomas, confirmed by quantitative PCR and 16S rDNA sequence analysis of 95 carcinoma/normal DNA pairs, while the Bacteroidetes and Firmicutes phyla were depleted in tumors. Fusobacteria were also visualized within colorectal tumors using FISH. These findings reveal alterations in the colorectal cancer microbiota; however, the precise role of Fusobacteria in colorectal carcinoma pathogenesis requires further investigation.
Study Abstract:

> The tumor microenvironment of colorectal carcinoma is a complex community of genomically altered cancer cells, nonneoplastic cells, and a diverse collection of microorganisms. Each of these components may contribute to carcino genesis; however, the role of the microbiota is the least well understood. We have characterized the composition of the microbiota in colorectal carcinoma using whole genome sequences from nine tumor/normal pairs. Fusobacterium sequences were enriched in carcinomas, confirmed by quantitative PCR and 16S rDNA sequence analysis of 95 carcinoma/normal DNA pairs, while the Bacteroidetes and Firmicutes phyla were depleted in tumors. Fusobacteria were also visualized within colorectal tumors using FISH. These findings reveal alterations in the colorectal cancer microbiota; however, the precise role of Fusobacteria in colorectal carcinoma pathogenesis requires further investigation.
# Import data with phyloseq, convert to DESeq2

Expand Down

0 comments on commit 0a8285a

Please sign in to comment.