makeTreeSEFromBiom: Loading a biom file

View source: R/makeTreeSummarizedExperimentFromBiom.R

makeTreeSEFromBiomR Documentation

Loading a biom file

Description

For convenience a few functions are available to convert data from a ‘biom’ file or object into a TreeSummarizedExperiment

Usage

importBIOM(file, ...)

makeTreeSEFromBiom(
  obj,
  removeTaxaPrefixes = FALSE,
  rankFromPrefix = FALSE,
  remove.artifacts = FALSE,
  ...
)

makeTreeSummarizedExperimentFromBiom(obj, ...)

Arguments

file

biom file location

...

additional arguments

  • pattercharacter value specifying artifacts to be removed. If patterns = "auto", special characters are removed. (default: pattern = "auto")

obj

object of type biom

removeTaxaPrefixes

TRUE or FALSE: Should taxonomic prefixes be removed? The prefixes is removed only from detected taxa columns meaning that rankFromPrefix should be enabled in the most cases. (default removeTaxaPrefixes = FALSE)

rankFromPrefix

TRUE or FALSE: If file does not have taxonomic ranks on feature table, should they be scraped from prefixes? (default rankFromPrefix = FALSE)

remove.artifacts

TRUE or FALSE: If file have some taxonomic character naming artifacts, should they be removed. (default remove.artifacts = FALSE)

Value

An object of class TreeSummarizedExperiment

See Also

makeTreeSEFromPhyloseq makeTreeSEFromDADA2 importQIIME2 importMothur

Examples

# Load biom file
library(biomformat)
biom_file <- system.file("extdata", "rich_dense_otu_table.biom",
                         package = "biomformat")

# Make TreeSE from biom file
tse <- importBIOM(biom_file)

# Make TreeSE from biom object
biom_object <- biomformat::read_biom(biom_file)
tse <- makeTreeSEFromBiom(biom_object)

# Get taxonomyRanks from prefixes and remove prefixes
tse <- importBIOM(biom_file,
                    rankFromPrefix = TRUE,
                    removeTaxaPrefixes = TRUE)

# Load another biom file
biom_file <- system.file("extdata/testdata", "Aggregated_humanization2.biom",
                         package = "mia")

# Clean artifacts from taxonomic data
tse <- importBIOM(biom_file,
                    remove.artifacts = TRUE)

microbiome/mia documentation built on April 27, 2024, 4:04 a.m.