mia icon indicating copy to clipboard operation
mia copied to clipboard

loadFrom* documentation

Open antagomir opened this issue 1 year ago • 4 comments

The function loadFromBiom has outdated example section:

  • refers to se (not tse) as function output, although the function seems to return TreeSE
  • converts SE to TreeSE although the object is already SE before the conversion

Suggestion: fix this and check other functions for similar issue.

This is the problematic example:

   if(requireNamespace("biomformat")) {
       library(biomformat)
       # load from file
       rich_dense_file  = system.file("extdata", "rich_dense_otu_table.biom",
                                      package = "biomformat")
       se <- loadFromBiom(rich_dense_file, removeTaxaPrefixes = TRUE)
     
       # load from object
       x1 <- biomformat::read_biom(rich_dense_file)
       se <- makeTreeSEFromBiom(x1)
       # Convert SE to TreeSE
       tse <- as(se, "TreeSummarizedExperiment")
       tse
     }

antagomir avatar Dec 09 '22 21:12 antagomir