Hi all,
I'm attempting to use Wrench to normalize some 16s rRNA microbial community data from my dissertation. I am hoping to normalize the data before using the package Vegan to do some basic community ecology analyses.
I believe I have successfully normalized my data with Wrench, but I'm not really sure where to go from here. The only information I can really find on this package is from Bioconductor and the original paper for the package. Neither provide a real easy tutorial to follow. Below is my script and a screenshot of my environment and the basic tutorial in the Wrench vignette/help.
Thanks for any insight!
library("metagenomeSeq")
library(Wrench)
read.table(file = 'metadata2.tsv', sep = '\t', header = TRUE)
metadata <- read.table(file = 'metadata2.tsv', sep = '\t', header = TRUE)
mybiom<-loadBiom("undet-filt-feature-table.biom")
mybiom
PPcntsMatrix <- MRcounts(mybiom)
mydata_wrench2 <- wrench(PPcntsMatrix, condition=metadata$tissue,
etype="w.marg.mean", ebcf=TRUE, z.adj=TRUE, phi.adj=TRUE, detrend=FALSE)
compositionalFactors_PP <- mydata_wrench2$ccf
normalizationFactors_PP <- mydata_wrench2$nf
Not sure about these three lines
mydata_wrench2 <- mybiom
normalizedObject <- mybiom
normFactors(normalizedObject) <- normalizationFactors_PP