parse_species: Add replicates to a tree

View source: R/addReplicatesOnTree.R

parse_speciesR Documentation

Add replicates to a tree

Description

Utility function to add replicates to a tree, as tips with zero length branches.

Usage

parse_species(tree, ids, pattern = "(_|\\.).*$")

Arguments

tree

A phylogenetic tree with n tips.

ids

a vector of sample ids.

pattern

a regular expression to find species from sample names. Default to removing everything after a dot or underscore.

Value

A vector of the same length as 'ids', with the species of each sample.


pbastide/phylolimma documentation built on Nov. 17, 2024, 1:34 p.m.