get_tipNames: Get tip names of phylogenetic tree based on transmission...

View source: R/phylo_utils.R

get_tipNamesR Documentation

Get tip names of phylogenetic tree based on transmission matrix

Description

Get tip names of phylogenetic tree based on transmission matrix

Usage

get_tipNames(x, format = "migrant", by_areas = "region", max_value = NULL)

Arguments

x

An object of class "transmat", the output from get_transmat.

format

If format = "origin" return tip in the form of ID_global or ID_region. If format = "migrant" return tip in the form of ID_1, ID_2, ID_21, ID_12

by_areas

by_areas = "all" if interested in all seeds, or by_areas = "region" if interested in seeds for region only.

max_value

max value for comparison to select the seed values. It will select only seed values less than max_value for seeds from region only.

Details

This code was build using the algorithm as in as.phylo.transmat. The difference is that it will return only the tip names of phylogenetic tree. If using format = "origin", tip names will be in the form of ID_global or ID_region. If using format = "migrant", tip names will be in the form of ID_1, ID_21, ID_2, ID_12. Migrant values can take the value of 1 if vertex is from region, 2 if vertex is from global, 21 if vertex is from global that migrated to region and 12 if vertex is from region that migrated to global. It will return the origin at time of seroconversion.

This script will specifically work with the package HIVepisim.

Value

List of tip names. See details for codes on the tip names related to origin or global.


thednainus/HIVepisimAnalysis documentation built on Sept. 21, 2023, 7:32 a.m.