plotRDA feature loadings
Opened this issue · 6 comments
antagomir commented
The mia runRDA and plotRDA do not seem to support visualizing feature loadings. This would be very useful to add.
Also in OMA chapter 7.4.1 the examples on this are very base R.
antagomir commented
@ElySeraidarian you could check if this issue is already dealt with in the other issues/PRs?
ElySeraidarian commented
I believe this will still not work, loadings are not stored either in rotation or loadings slot which makes it impossible for me to detect loadings without a wrapper
TuomasBorman commented
Should be checked if there is a bug
Line 370 in f193173
ElySeraidarian commented
I've tried running that code example found in OMA book and the attribute rotation is not what expected
library(mia)
data("GlobalPatterns", package = "mia")
tse <- GlobalPatterns
tse <- transformAssay(tse, MARGIN = "cols", method="relabundance")
tse$Group <- tse$SampleType == "Feces"
tse <- runRDA(
tse,
assay.type = "relabundance",
formula = assay ~ Group,
distance = "bray",
na.action = na.exclude)
attr(reducedDim(tse, "RDA"), "rotation")
Daenarys8 commented
I think we can close this:
data("enterotype", package = "mia")
> tse <- enterotype
> tse <- addCCA(
tse,
formula = data ~ ClinicalStatus,
na.action = na.exclude
)
plotLoadings(tse, "RDA", layout = "heatmap", ncomponents = 2)
antagomir commented
Can you check that we have an example in OMA, then close?