microbiome / OMA

Orchestrating Microbiome Analysis
https://microbiome.github.io/OMA
80 stars 43 forks source link

Fixes to book #482

Open TuomasBorman opened 3 months ago

TuomasBorman commented 3 months ago
  1. Add exercise on how to use getTaxonomyLabels(). The exercise could be with import exercises.

In this exercise https://microbiome.github.io/OMA/docs/devel/pages/98_exercises.html#preliminary-exploration, the chapter number is incorrect. It should be 2.3 instead of 3.3. This means that automatic reference is not used (the chapter number is hard-coded). This also indicate that the book has other this kind of problems.

Check the whole book and fix these problems --> instead of hard-coding, use automatic references (that is updated automatically when we update the book).

3.

Check exercises and improve them, this also means best practices. For instance, colnames() should be used instead of names() in 21.3.5 and 21.3.6.

Also this question is not clear enough "List the information on features available in rowData with names.".

TuomasBorman commented 3 months ago

@ake123 Can you check these?

E: at least, some. There might be more things coming.

TuomasBorman commented 3 months ago
  1. https://microbiome.github.io/OMA/docs/devel/pages/98_exercises.html#assay-transformation The extra part of this exercise should say as a hint that phiLR package should be used.
TuomasBorman commented 3 months ago
  1. It seems that MARGIN can be only "samples" or "features" in transformAssay(). However, in R 1 and 2 are the most common values. We should switch to 1 and 2 (and also support "features" and "samples")

data("GlobalPatterns") tse <- GlobalPatterns

tse <- transformAssay(tse, assay.type = "counts", method = "relabundance", MARGIN = 2) tse <- transformAssay(tse, assay.type = "counts", method = "relabundance", MARGIN = "samples")

TuomasBorman commented 3 months ago

6.

mia's documentation should be fixed. runRDA() has hidden parameter permutations. However, the documentation does not say clearly how to pass the values to this parameter. We could improve documentation by highlighting that extra parameters can be passed to anova.cca for instance. Also we could show this in examples on how to do this.

TuomasBorman commented 3 months ago

7.

diversity functions fail when there are values that certain indices do not support (relative or negative). Instead, this should lead to a warning that tells that these indices where not calculated based on aforementioned issue.


data("GlobalPatterns")
tse <- GlobalPatterns

assay(tse)[1, 1] <- -1
estimateDiversity(tse)
estimateDivergence(tse)
estimateRichness(tse)

tse <- transformAssay(tse, method = "relabundance")
estimateDiversity(tse, assay.type = "relabundance")
estimateDivergence(tse, assay.type = "relabundance")
estimateRichness(tse, assay.type = "relabundance")
antagomir commented 3 months ago

Unless these can be done in go, I suggest to split these in multiple issues and solve one by one. But if all can be closed at one go even better.

ake123 commented 3 months ago

I will fix it all at once for now they are simple to fix.

ake123 commented 2 months ago

It seems thatrunRDA() is not available any longer.

mia's documentation should be fixed. runRDA() has hidden parameter permutations. However, the documentation does not say clearly how to pass the values to this parameter. We could improve documentation by highlighting that extra parameters can be passed to anova.cca for instance. Also we could show this in examples on how to do this.

TuomasBorman commented 2 months ago

It should be, can you check why? https://microbiome.github.io/mia/reference/runCCA.html

Do you have latest version?

ake123 commented 2 months ago

Yes I found it thanks