microbiome / OMA

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

'logcounts' not in names(assays(<TreeSummarizedExperiment>)) #313

Closed li-fangyeo closed 1 year ago

li-fangyeo commented 1 year ago

Hi!

I'm trying to do PCoA on my microbiome data following the OMA manual but I get this error for MDS. What am i doing wrong?

Perform PCoA

colData(x2)$ER_status <- colData(x2)$ER_status == "Positive" colData(x2)$ER_status [1] FALSE TRUE TRUE FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE FALSE FALSE TRUE FALSE [20] FALSE FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE [39] FALSE TRUE FALSE FALSE TRUE TRUE TRUE TRUE FALSE TRUE TRUE FALSE TRUE TRUE TRUE FALSE FALSE TRUE TRUE

tse <- runMDS(x2, FUN = vegan::vegdist, method = "bray", name = "PCoA_BC", assay.type = "relabundance")

Error in assay(x, exprs_values) : 'assay(, i="character", ...)' invalid subscript 'i' 'logcounts' not in names(assays())

x2 class: TreeSummarizedExperiment dim: 3549 543 metadata(1): agglomerated_by_rank assays(2): counts relabundance rownames(3549): Cyclonatronum Caldisericum ... Shandvirus Atlauavirus rowData names(7): Kingdom Phylum ... Genus X colnames(543): SD0060 SD0068 ... SD1575 SD1589 colData names(39): WES_batch RNASeq_QC_status_to_exclude_for_RNAseq_analysis ... Herceptin APOBEC3B_deletion_status reducedDimNames(0): mainExpName: NULL altExpNames(0): rowLinks: NULL rowTree: NULL colLinks: NULL colTree: NULL

image
TuomasBorman commented 1 year ago

Hello!

The problem is that the scater package is old. scater::runMDS got assay,type parameter in version 1.27.7. (The old parameter for specifying the assay is exprs_values.)

-Tuomas

antagomir commented 1 year ago

Meaning that you might be able to solve the problem by updating to the latest R version (R-4.3.1 at the moment I think) and installing the latest versions of the Bioconductor packages. These tools are new, and do not work properly (if at all) in the older R versions before R-4.3

li-fangyeo commented 1 year ago

Got it. Thank you!