importMothur: Import Mothur results as a 'TreeSummarizedExperiment'

View source: R/importMothur.R

importMothurR Documentation

Import Mothur results as a TreeSummarizedExperiment

Description

This method creates a TreeSummarizedExperiment object from Mothur files provided as input.

Usage

importMothur(
  assay.file = sharedFile,
  sharedFile,
  taxonomyFile = NULL,
  row.file = taxonomyFile,
  designFile = NULL,
  col.file = designFile
)

Arguments

assay.file

a single character value defining the file path of the feature table to be imported. The File has to be in shared file format as defined in Mothur documentation.

sharedFile

Deprecated. Use assay.file instead.

taxonomyFile

Deprecated. Use row.file instead.

row.file

a single character value defining the file path of the taxonomy table to be imported. The File has to be in taxonomy file or constaxonomy file format as defined in Mothur documentation. (default: row.file = NULL).

designFile

Deprecated. Use col.file instead.

col.file

a single character value defining the file path of the sample metadata to be imported. The File has to be in desing file format as defined in Mothur documentation. (default: col.file = NULL).

Details

Results exported from Mothur can be imported as a SummarizedExperiment using importMothur. Except for the assay.file, the other data types, row.file, and col.file, are optional, but are highly encouraged to be provided.

Value

A TreeSummarizedExperiment object

Author(s)

Leo Lahti and Tuomas Borman. Contact: microbiome.github.io

References

https://mothur.org/ https://mothur.org/wiki/shared_file/ https://mothur.org/wiki/taxonomy_file/ https://mothur.org/wiki/constaxonomy_file/ https://mothur.org/wiki/design_file/

See Also

makeTreeSEFromPhyloseq makeTreeSEFromBiom makeTreeSEFromDADA2 importQIIME2

Examples

# Abundance table
counts <- system.file("extdata", "mothur_example.shared", package = "mia")
# Taxa table (in "cons.taxonomy" or "taxonomy" format)
taxa <- system.file("extdata", "mothur_example.cons.taxonomy", package = "mia")
#taxa <- system.file("extdata", "mothur_example.taxonomy", package = "mia")
# Sample meta data
meta <- system.file("extdata", "mothur_example.design", package = "mia")

# Creates se object from files
se <- importMothur(assay.file = counts, row.file = taxa, col.file = meta)
# Convert SE to TreeSE
tse <- as(se, "TreeSummarizedExperiment")
tse

FelixErnst/mia documentation built on June 19, 2024, 3:51 a.m.