Skip to contents

Take a tree with branch lengths and fix negative or zero length branches.

Usage

tree_fix_brlen(
  tree = NULL,
  fixing_criterion = "negative",
  fixing_method = 0,
  ultrametric = TRUE
)

Arguments

tree

A tree either as a newick character string or as a phylo object.

fixing_criterion

A character vector specifying the type of branch length to be fixed: "negative" or "zero" (the number 0 is also allowed).

fixing_method

A character vector specifying the method to fix branch lengths: "bladj", "mrbayes" or a number to be assigned to all branches meeting fixing_criterion

ultrametric

Boolean indicating whether to force ultrametric or not.

Value

A phylo object with no negative or zero branch lengths.