genome_content_phylo_regress {POMS} | R Documentation |
Phylogenetic regression of input vector against function presence/absence.
Description
Runs phylogenetic regression with phylolm on each function (or trait) in the specified function table.
Usage
genome_content_phylo_regress(y, func, in_tree, ncores = 1, model_type = "BM")
Arguments
y |
variable to use for y component of model. Typically would be either a binary vector indicating which taxa are significantly different, or the normalized specicity or normalized prevalence values. Must be a named numeric vector with names matching the rows of the func dataframe. These names also must match the tree tip labels, but they can be a subset and any missing tips will be dropped. |
func |
dataframe of the number of copies of each function that are encoded by each input taxon. This pipeline only considers the presence/absence of functions across taxa. Taxa (with row names intersecting with the "abun" table) should be the rows and the functions should be the columns. |
in_tree |
phylo object. Tip labels must include the row names of the func dataframe and the names of the y input vector. |
ncores |
integer specifying how many cores to use for parallelized sections of pipeline. |
model_type |
length-one character vector specifying which phylogenetic model to use (must be a possible setting of the model argument to the phylolm function). |
Value
Dataframe summarizing the phylolm coefficients and model p-values for each y ~ function comparison. Will include the intercept, slope, and p-value for each case. Row names will be function ids.