phyca.tidy: clean description of phca object

View source: R/phyca.tidy.R

phyca.tidyR Documentation

clean description of phca object

Description

clean description of phca object

Usage

phyca.tidy(phca, Taxonomy, ncomponents = NULL, taxa.split = F,
  common.name = F, uniques = T, getEdges = F, ncores = NULL, ...)

Arguments

phca

PhyCA object

Taxonomy

Greengenes taxonomy, first column are otus and second column are taxonomic strings of format "p__Phylum; c__Class; o__Order..."

ncomponents

Integer number of PhyCA components to tidy, from 1:ncomponents

taxa.split

Logical whether to summarize taxonomic detail of component by only including the taxa names which are unique to each group.

common.name

Logical, whether or not to trim output taxonomic summary to the longest common prefix. Default FALSE

uniques

Logical, whether or not to trim taxonomic output to unique taxonomic names. Default TRUE

getEdges

Logical, whether or not to get edges corresponding to the splits. Default FALSE

ncores

Integer number of cores to use if getting edges - does not affect runtime if getEdges=FALSE

...

optional input arguments to OTUtoTaxa

Examples


library(phylofactor)
data("FTmicrobiome")

Data <- FTmicrobiome$PF$Data
tree <- FTmicrobiome$PF$tree
taxonomy <- FTmicrobiome$taxonomy

phca <- PhyCA(Data,tree,ncomponents = 3,ncores=2,output.edges=FALSE)

#the standard
td <- phyca.tidy(phca,taxonomy)

#or, for a simpler view
td <- phyca.tidy(phca,taxonomy,taxa.split=TRUE)

sum(FTmicrobiome$PF$basis[,1:3]-phca$basis[,1:3])  
#the first three phylofactors here correspond to the first three ILR-phylogenetic Components. 

reptalex/phylofactor documentation built on Feb. 28, 2024, 3:19 p.m.