Skip to content

Commit

Permalink
v0.99.23 Added a rooted tree to "GlobalPatterns" dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
joey711 committed Feb 22, 2012
1 parent 535a6b8 commit 60b96bd
Show file tree
Hide file tree
Showing 8 changed files with 103 additions and 254 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: phyloseq
Version: 0.99.22
Version: 0.99.23
Date: 2012-02-21
Title: Handling and analysis of high-throughput
phylogenetic sequence data.
Expand Down
318 changes: 74 additions & 244 deletions R/.Rhistory
Original file line number Diff line number Diff line change
@@ -1,247 +1,3 @@
if( substr(RDA_or_CCA, 1, 1) %in% c("R", "r") ){#
mod <- rda.phyloseq(X) #
} else if( substr(RDA_or_CCA, 1, 1) %in% c("C", "c") ){#
mod <- cca.phyloseq(X) #
} else {#
cat("You did not properly specify the desired ordination method\n")#
cat("Please see documentation.\n") #
return()#
}
mod
ord_vars <- all.vars(X)[-1]
ord_vars
# default is to use the R.H.S. elements of X as color and shape#
plot_ordination_phyloseq(mod,#
object = object, #
site_shape_category = ord_vars[1],#
site_color_category = ord_vars[2]#
)
ex1~
ex1~laskdjflask
ex1~.
X <- ex1~.
ord_vars <- all.vars(X)[-1]
ord_vars
plot_ordination_phyloseq(mod, object)
list(mod=mod, object=object)
X <- ex1~Diet
all.vars(X)[-1]
popcall
X <- ex1~Diet #
RDA_or_CCA="cca"#
object=get(all.vars(X)[1])#
#
if( substr(RDA_or_CCA, 1, 1) %in% c("R", "r") ){#
mod <- rda.phyloseq(X) #
} else if( substr(RDA_or_CCA, 1, 1) %in% c("C", "c") ){#
mod <- cca.phyloseq(X) #
} else {#
cat("You did not properly specify the desired ordination method\n")#
cat("Please see documentation.\n") #
return()#
}#
#
# X <- ex1~.#
ord_vars <- all.vars(X)[-1]#
#
# Initialize call list for plot_ordination_phyloseq#
popcallList <- list(mod=mod, object=object)#
#
if( ord_vars[1] != "."){#
popcallList <- c(popcallList, list(site_color_category = ord_vars[1]))#
} #
if( length(ord_vars) > 1){#
popcallList <- c(popcallList, list(site_shape_category = ord_vars[2]))#
}#
#
popcallList
X <- ex1~Diet + Sex
# X <- ex1~.#
ord_vars <- all.vars(X)[-1]#
#
# Initialize call list for plot_ordination_phyloseq#
popcallList <- list(mod=mod, object=object)#
#
if( ord_vars[1] != "."){#
popcallList <- c(popcallList, list(site_color_category = ord_vars[1]))#
} #
if( length(ord_vars) > 1){#
popcallList <- c(popcallList, list(site_shape_category = ord_vars[2]))#
}#
#
popcallList
X <- ex1~Diet + Sex#
RDA_or_CCA="cca"#
object=get(all.vars(X)[1])#
#
if( substr(RDA_or_CCA, 1, 1) %in% c("R", "r") ){#
mod <- rda.phyloseq(X) #
} else if( substr(RDA_or_CCA, 1, 1) %in% c("C", "c") ){#
mod <- cca.phyloseq(X) #
} else {#
cat("You did not properly specify the desired ordination method\n")#
cat("Please see documentation.\n") #
return()#
}#
#
# X <- ex1~.#
ord_vars <- all.vars(X)[-1]#
#
# Initialize call list for plot_ordination_phyloseq#
popcallList <- list(mod=mod, object=object)#
#
if( ord_vars[1] != "."){#
popcallList <- c(popcallList, list(site_color_category = ord_vars[1]))#
} #
if( length(ord_vars) > 1){#
popcallList <- c(popcallList, list(site_shape_category = ord_vars[2]))#
}#
#
do.call("plot_ordination_phyloseq", popcallList)
X <- ex1~Diet + Gender#
RDA_or_CCA="cca"#
object=get(all.vars(X)[1])#
#
if( substr(RDA_or_CCA, 1, 1) %in% c("R", "r") ){#
mod <- rda.phyloseq(X) #
} else if( substr(RDA_or_CCA, 1, 1) %in% c("C", "c") ){#
mod <- cca.phyloseq(X) #
} else {#
cat("You did not properly specify the desired ordination method\n")#
cat("Please see documentation.\n") #
return()#
}#
#
# X <- ex1~.#
ord_vars <- all.vars(X)[-1]#
#
# Initialize call list for plot_ordination_phyloseq#
popcallList <- list(mod=mod, object=object)#
#
if( ord_vars[1] != "."){#
popcallList <- c(popcallList, list(site_color_category = ord_vars[1]))#
} #
if( length(ord_vars) > 1){#
popcallList <- c(popcallList, list(site_shape_category = ord_vars[2]))#
}#
#
do.call("plot_ordination_phyloseq", popcallList)
X <- ex1 ~ Diet#
RDA_or_CCA="cca"#
object=get(all.vars(X)[1])#
#
if( substr(RDA_or_CCA, 1, 1) %in% c("R", "r") ){#
mod <- rda.phyloseq(X) #
} else if( substr(RDA_or_CCA, 1, 1) %in% c("C", "c") ){#
mod <- cca.phyloseq(X) #
} else {#
cat("You did not properly specify the desired ordination method\n")#
cat("Please see documentation.\n") #
return()#
}#
#
# X <- ex1~.#
ord_vars <- all.vars(X)[-1]#
#
# Initialize call list for plot_ordination_phyloseq#
popcallList <- list(mod=mod, object=object)#
#
if( ord_vars[1] != "."){#
popcallList <- c(popcallList, list(site_color_category = ord_vars[1]))#
} #
if( length(ord_vars) > 1){#
popcallList <- c(popcallList, list(site_shape_category = ord_vars[2]))#
}#
#
do.call("plot_ordination_phyloseq", popcallList)
X <- ex1 ~ .#
RDA_or_CCA="cca"#
object=get(all.vars(X)[1])#
#
if( substr(RDA_or_CCA, 1, 1) %in% c("R", "r") ){#
mod <- rda.phyloseq(X) #
} else if( substr(RDA_or_CCA, 1, 1) %in% c("C", "c") ){#
mod <- cca.phyloseq(X) #
} else {#
cat("You did not properly specify the desired ordination method\n")#
cat("Please see documentation.\n") #
return()#
}#
#
# X <- ex1~.#
ord_vars <- all.vars(X)[-1]#
#
# Initialize call list for plot_ordination_phyloseq#
popcallList <- list(mod=mod, object=object)#
#
if( ord_vars[1] != "."){#
popcallList <- c(popcallList, list(site_color_category = ord_vars[1]))#
} #
if( length(ord_vars) > 1){#
popcallList <- c(popcallList, list(site_shape_category = ord_vars[2]))#
}#
#
do.call("plot_ordination_phyloseq", popcallList)
?warning
class(ex1~.)
?formula
library("phyloseq")
library(phyloseq)
?ex2
MHsangerFN <- "~/Dropbox/R/enterotype_example/phylo_tables/MetaHIT_41SangerSamples.genus.txt"#
MHillumiFN <- "~/Dropbox/R/enterotype_example/phylo_tables/MetaHIT_85IlluminaSamples.genus.txt"#
TpyroseqFN <- "~/Dropbox/R/enterotype_example/phylo_tables/Turnbaugh_154Pyroseq16S.genus.txt"#
#
MHsanger <- read.table(MHsangerFN, TRUE, "\t")#
MHillumi <- read.table(MHillumiFN, TRUE, "\t")#
Tpyroseq <- read.table(TpyroseqFN, TRUE, "\t")
Tpyroseq
ETaltfile <- "~/Dropbox/R/enterotype_example/ETclassAltLines.txt"
ETalt <- readLines(ETaltfile)
ETaltfile <- "~/Dropbox/R/enterotype_example/ETclassAltLines.txt"
ETalt <- readLines(ETaltfile)
ETalt
seq(1, length(ETalt), 2)
ETalt[seq(1, length(ETalt), 2)]
ETvalues <- ETalt[seq(2, length(ETalt), 2)]
ETvalues
cbind(samples=ETsampleNames, enterotype=ETvalues)
ETsampleNames <- ETalt[seq(1, length(ETalt), 2)]
cbind(samples=ETsampleNames, enterotype=ETvalues)
ETaltfile <- "~/Dropbox/R/enterotype_example/ETclassAltLines.txt"#
ETalt <- readLines(ETaltfile)#
ETsampleNames <- ETalt[seq(1, length(ETalt), 2)]#
ETvalues <- ETalt[seq(2, length(ETalt), 2)]#
cbind(samples=ETsampleNames, enterotype=ETvalues)
partialET <- cbind(samples=ETsampleNames, enterotype=ETvalues)
write.table(partialET, "~/Dropbox/R/enterotype_example/partialET.txt", quote=FALSE, sep="\t")
write.table(partialET, "~/Dropbox/R/enterotype_example/partialET.txt", quote=FALSE, sep="\t", row.names=FALSE)
read.table(etfile)
etfile <- "~/Dropbox/R/enterotype_example/ET_class_tab.txt"
read.table(etfile)
read.table(etfile, header=TRUE)
et
et <- read.table(etfile, header=TRUE)
class(et)
row.names(et) <- et$Subject
head(et)
sampleMap(et)
etSM <- sampleMap(et)
sample.names(etSM)
intersect(sample.names(MHS), sample.names(etSM))
# Now import into phyloseq#
library("phyloseq")#
MHS <- otuTable(MHsanger, TRUE)#
MHI <- otuTable(MHillumi, TRUE)#
TPS <- otuTable(Tpyroseq, TRUE)
intersect(sample.names(MHS), sample.names(etSM))
sample.names(MHS)
OTU <- merge_phyloseq(MHS, MHI, TPS)
intersect(sample.names(OTU), sample.names(etSM))
sample.names(OTU)
Tpyroseq
TPS
Tpyroseq
colnames(Tpyroseq)
MHsangerFN <- "~/Dropbox/R/enterotype_example/phylo_tables/MetaHIT_41SangerSamples.genus.txt"#
MHillumiFN <- "~/Dropbox/R/enterotype_example/phylo_tables/MetaHIT_85IlluminaSamples.genus.txt"#
Expand Down Expand Up @@ -569,3 +325,77 @@ df
dim(combn(130, 2))
dim(combn(130, 2))[2]
dim(combn(nsamples(sg), 2))[2]/dim(combn(130, 2))[2]
library("phyloseq")
bigTree <- read.tree("~/Downloads/Caporaso_Data/gg_tree/gg_97_otus_4feb2011.tre")
bigTree
data(GlobalPatterns)
all( species.names(GlobalPatterns) %in% species.names(bigTree) )
species.names(GlobalPatterns)
all( species.names(bigTree) %in% species.names(GlobalPatterns) )
all( species.names(GlobalPatterns) %in% species.names(bigTree) )
all( species.names(GlobalPatterns) %in% species.names(bigTree) )
all( species.names(GlobalPatterns) %in% species.names(bigTree) )
bigTree
GlobalPatterns2 <- merge_phyloseq(GlobalPatterns, bigTree)
GlobalPatterns2
GlobalPatterns
cat("installing Bioconductor dependencies for local build \n")
cat("installing Bioconductor version of phyloseq \n")
source("https://github.com/downloads/joey711/phyloseq/phyloseq_install_github.R")
global_patterns_file2 <- "~/Downloads/mcmurdie/gaiix_pnas/GlobalPatterns2.RData"#
save(GlobalPatterns2, file=global_patterns_file2)
global_patterns_file2 <- "~/Downloads/Caporaso_Data/gaiix_pnas/GlobalPatterns2.RData"
save(GlobalPatterns2, file=global_patterns_file2)
GlobalPatterns2
?UniFrac
library("doParallel")
registerDoParallel(cores=6)
library("doParallel")#
registerDoParallel(cores=6)#
system.time(GPUF <- UniFrac(GlobalPatterns2, parallel=TRUE))#
#
## Documentation source for gobal-patterns data
456.558/60
?source
install_github
library(devtools)
install_github
GPUF
global_patterns_UF_file <- "~/Downloads/Caporaso_Data/gaiix_pnas/Unweighted_UniFrac.RData"
global_patterns_UF_file <- "~/Downloads/Caporaso_Data/gaiix_pnas/Unweighted_UniFrac.RData"
save(GPUF, file=global_patterns_UF_file)
MovingPicturesDataFile <- "~/Downloads/mcmurdie/moving_pictures/MovingPictures.RData"
load(MovingPicturesDataFile)
MovingPicturesDataFile <- "~/Downloads/Caporaso_Data/moving_pictures/MovingPictures.RData"
load(MovingPicturesDataFile)
all( species.names(MovingPictures) %in% species.names(bigTree) )
all( species.names(bigTree) %in% species.names(MovingPictures) )
nspecies(MovingPictures)
system.time(MovingPictures2 <- merge_phyloseq(MovingPictures, bigTree))
MovingPictures2
MovingPicturesDataFile
MovingPictures
MovingPictures <- MovingPictures2
MovingPictures
save(MovingPictures, file=MovingPicturesDataFile)
MovingPictures
GlobalPatterns
GlobalPatterns2
all.equal(GlobalPatterns, phyloseq(otuTable(GlobalPatterns2), sampleData(GlobalPatterns2), taxTab(GlobalPatterns2)))
global_patterns_file <- "~/Downloads/mcmurdie/gaiix_pnas/GlobalPatterns.RData"
GlobalPatterns
GlobalPatterns2
GlobalPatterns <- GlobalPatterns2
global_patterns_file <- "~/Downloads/Caporaso_Data/gaiix_pnas/GlobalPatterns.RData"
global_patterns_file
save(GlobalPatterns, file=global_patterns_file)
getVariable(GlobalPatterns, "SampleType")
variable.names
variable.names(GlobalPatterns)
sample.variables(GlobalPatterns)
sample.variables(GlobalPatterns)
??"ranks"
print(GlobalPatterns)
tre
getMethod(tre, "character")
getMethod(tre, signature("character"))
Binary file modified data/GlobalPatterns.RData
Binary file not shown.
5 changes: 5 additions & 0 deletions data/datalist
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
GlobalPatterns
enterotype
esophagus
ex1
soilrep
6 changes: 6 additions & 0 deletions inst/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@ phyloseq 0.99.x
* Bioconductor development release updates.
* BIOM format import: import_biom() function
* Parallel Fast UniFrac
* Several published exampled datasets included
* Directly call vegdist() on phyloseq-class object (method extension)
* General importer for all supported data formats: import()
* Lots of documentation updates.
* Lots and lots of fixes and improvements.

v0.99.23
===========
* Added a rooted tree to "GlobalPatterns" dataset
* Allow multi-class tests with mt()

v0.99.20
===========
* Added "GlobalPatterns" dataset, and some other minor improvements
Expand Down
Loading

0 comments on commit 60b96bd

Please sign in to comment.