R/z_tree.R

Defines functions get_targets get_species

Documented in get_species get_targets

#' Get the target species from a config object
#'
#' @export
get_targets <- function(con){
  setdiff(
    ape::read.tree(con@input@tree)$tip.label,
    con@input@focal_species
  ) %>% gsub(pattern=" ", replacement="_")
}

#' Get all species in the study
#'
#' @export
get_species <- function(con){
  ape::read.tree(con@input@tree)$tip.label %>%
    gsub(pattern=" ", replacement="_")
}
arendsee/fagin documentation built on Aug. 27, 2019, 11:58 a.m.