if (FALSE) {
# Load example data
data("ko_abundance")
data("metadata")
# Convert KO abundance to KEGG pathways
kegg_abundance <- ko2kegg_abundance(data = ko_abundance)
# Perform differential abundance analysis
daa_results_df <- pathway_daa(
abundance = kegg_abundance,
metadata = metadata,
group = "Environment",
daa_method = "ALDEx2"
)
# Filter for specific method
daa_sub_method_results_df <- daa_results_df[
daa_results_df$method == "ALDEx2_Welch's t test",
]
# Annotate results
daa_annotated_sub_method_results_df <- pathway_annotation(
pathway = "KO",
daa_results_df = daa_sub_method_results_df,
ko_to_kegg = TRUE
)
# Generate abundance statistics table
abundance_stats_table <- pathway_errorbar_table(
abundance = kegg_abundance,
daa_results_df = daa_annotated_sub_method_results_df,
Group = metadata$Environment,
ko_to_kegg = TRUE,
p_values_threshold = 0.05
)
# View the results
head(abundance_stats_table)
}
Run the code above in your browser using DataLab