phy_tree-methods: Retrieve phylogenetic tree ('phylo'-class) from object.

Description Usage Arguments Details Value See Also Examples

Description

This is the suggested method for accessing the phylogenetic tree, (phylo-class) from a phyloseq-class. Like other accessors (see See Also, below), the default behavior of this method is to stop with an error if physeq is a phyloseq-class but does not contain a phylogenetic tree (the component data you are trying to access in this case).

Usage

1
2
3
4
5
6
7
phy_tree(physeq, errorIfNULL=TRUE)

## S4 method for signature 'ANY'
phy_tree(physeq, errorIfNULL = TRUE)

## S4 method for signature 'phylo'
phy_tree(physeq)

Arguments

physeq

(Required). An instance of phyloseq-class that contains a phylogenetic tree. If physeq is a phylogenetic tree (a component data class), then it is returned as-is.

errorIfNULL

(Optional). Logical. Should the accessor stop with an error if the slot is empty (NULL)? Default TRUE.

Details

Note that the tip labels should be named to match the taxa_names of the other objects to which it is going to be paired. The phyloseq constructor automatically checks for exact agreement in the set of species described by the phlyogenetic tree and the other components (taxonomyTable, otu_table), and trims as-needed. Thus, the tip.labels in a phylo object must be named to match the results of taxa_names of the other objects to which it will ultimately be paired.

Value

The phylo-class object contained within physeq; or NULL if physeq does not have a tree. This method stops with an error in the latter NULL case be default, which can be over-ridden by changing the value of errorIfNULL to FALSE.

See Also

otu_table, sample_data, tax_table refseq, phyloseq, merge_phyloseq

Examples

1
2

Example output

Phylogenetic tree with 19216 tips and 19215 internal nodes.

Tip labels:
	549322, 522457, 951, 244423, 586076, 246140, ...
Node labels:
	, 0.858.4, 1.000.154, 0.764.3, 0.995.2, 1.000.2, ...

Rooted; includes branch lengths.

phyloseq documentation built on Nov. 8, 2020, 6:41 p.m.