Looking for help with the package Wrench.

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!


read.table(file = 'metadata2.tsv', sep = '\t', header = TRUE)
metadata <- read.table(file = 'metadata2.tsv', sep = '\t', header = TRUE)


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

Without a reprex it's only possible to offer generalities.

Every R problem is best thought of as a school algebra exercise: f(x) = y, where the three objects are

x is what is at hand
y is what is desired
f is the function to convert x to y

In the environment shown there are several possible candidates for x or candidates with which to compose x.

y and f are undefined.

If the Vegan package is to be used, arguments to its functions (their own x) have a specified form, whether it is data frames, matrices, vectors or some S4 object. Therefore, the y sought must be used in Vegan, which a large MRexperiement object may not be.

Work backward from what is to be done in Vegan to what it requires as input to how to create that input from the output of Wrench

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.