View source: R/taxa_contribution.R
| read_pathway_contrib_file | R Documentation |
Parses path_abun_contrib.tsv output from PICRUSt2's pathway
pipeline and returns the same normalized contribution schema used by
aggregate_taxa_contributions.
read_pathway_contrib_file(file = NULL, data = NULL)
file |
Path to the contribution file (.tsv, .txt, .csv, or gzipped variants). |
data |
A data.frame already loaded from the contribution file.
If both |
A normalized data.frame with pathway IDs in function_id.
# From a data.frame
path_contrib_df <- data.frame(
sample = rep(c("S1", "S2"), each = 2),
`function` = rep(c("PWY-1234", "PWY-5678"), times = 2),
taxon = c("ASV1", "ASV2", "ASV1", "ASV2"),
taxon_function_abun = c(10, 5, 12, 4),
check.names = FALSE
)
path_contrib <- read_pathway_contrib_file(data = path_contrib_df)
head(path_contrib)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.