Trans_from_phylo: Convert phyloseq object to LorMe object

View source: R/Trans_from_phylo.R

Trans_from_phyloR Documentation

Convert phyloseq object to LorMe object

Description

Convert phyloseq object to LorMe object

Usage

Trans_from_phylo(
  physeq,
  into = "standard",
  outputtax = c("Phylum", "Genus"),
  reads = TRUE
)

Arguments

physeq

The phyloseq object to convert. See in phyloseq object

into

Names of separated taxonomy to create as character vector. Must select from c("Domain","Phylum","Class","Order","Family","Genus","Species"). Shortcut input:1)By default."standard":c("Domain","Phylum","Class","Order","Family","Genus","Species"). Used for standard taxonomy annotation to OTU/ASV table. 2)"complete":c("Domain","Kingdom","Phylum","Class","Order","Family","Genus","Species"). Used for complete taxonomy annotation to meta genomic table.

outputtax

Default:c("Phylum","Genus").Names of output taxonomy level table. Shortcut input is available with 'standard' and 'complete' same as above.

reads

Logical.True for reads table and FALSE for percentage table. Default: TRUE

Value

LorMe object containing taxonomy table data frame,containing reads and percentage table for each specified output.

Note

For taxonomy annotation with both 'Domain' and 'Kingdom' level, please set 'into' parameter as 'complete'!!!

The taxonomyTable of phyloseq object should contained as least standard annotations for convert!

Examples

## Not run:

if (requireNamespace("phyloseq", quietly = TRUE)) {
 data("GlobalPatterns", package = "phyloseq")

 ## convert phyloseq object to LorMe format
 gp_obj <- Trans_from_phylo(GlobalPatterns, outputtax = "standard")

 ## specify experimental design
 gp_plan <- object_config(gp_obj,
                          treat_location = 6,
                          rep_location   = 7)

 ## generate community-structure PCoA plot (Genus level)
 community_structure <- structure_plot(gp_plan, taxlevel = "Genus")
 community_structure$PCoA_Plot
}



LorMe documentation built on Jan. 12, 2026, 9:06 a.m.