View source: R/LorMe_pipeline.R
| LorMe_pipeline | R Documentation |
LorMe_pipeline() performs a complete microbial ecology analysis workflow
for a configured LorMe object, including:
community profiling, differential analysis, indicator species analysis,
treatment-specific sub-network construction, and global network construction.
The function is modular and allows users to execute only selected steps
through the step argument.
LorMe_pipeline(taxobj, step = "all")
taxobj |
A configured LorMe object created by
|
step |
Character vector specifying which analysis modules to run. Must be one or more of:
|
The function automatically respects global options set via
LorMe_options.
These options control:
analysis taxonomic level
palettes and plotting parameters
DESeq2 parameters
network analysis thresholds
Internal failures in any analysis sub-module do not stop the pipeline:
the corresponding output is returned as NULL, and the function prints
a summary of failed steps on completion.
A named list containing the results of all requested modules.
Depending on step, the list may include:
alpha_resultsAlpha diversity tables and plots
beta_resultsBeta diversity ordinations (e.g., PCoA)
composition_resultsCommunity composition barplots
diffbar_resultDifferential barplot results
Deseq_resultsDESeq2 results for each comparison
Deseq_volcanoVolcano plots for differential analysis
Deseq_manhattanManhattan plots for differential features
indicator_resultsIndicator species results
indic_volcanoVolcano plot of indicator species analysis
indic_manhattanManhattan plot of indicator analysis
sub_network_resultsTreatment-specific subnetworks
combine_network_resultsGlobal co-occurrence network
Failed modules return as NULL.
## View current global analysis options
getOption("LorMe")
## Set analysis options
LorMe_options(
global = list(Analysis_level = "Genus"),
sub_net = list(threshold = 0.7),
all_net = list(threshold = 0.7)
)
## Run pipeline (time-consuming)
Two_group_analysis <- LorMe_pipeline(Two_group)
## Access results:
# Alpha diversity
Two_group_analysis$alpha_results$plotlist$Plotobj_Shannon$Boxplot
# Beta diversity
Two_group_analysis$beta_results$PCoA_Plot
# Community composition
Two_group_analysis$composition_results$barplot
# Differential analysis
Two_group_analysis$Deseq_volcano$FC_FDR
Two_group_analysis$Deseq_manhattan$manhattan
# Differential barplot
library(patchwork)
Two_group_analysis$diffbar_result$Barplot |
Two_group_analysis$diffbar_result$Differenceplot
# Subnetworks
require(magrittr)
Two_group_analysis$sub_network_results$Treatment_sub_network %>%
network_visual()
# Combined network
Two_group_analysis$combine_network_results %>% network_visual()
## Reset to default options
LorMe_defaults()
## Get options for re-analysis
options(LorMe = Two_group_analysis$Analysis_option) # Then try the previous analysis command
## Example: three-group comparison with custom options
LorMe_options(
global = list(
Analysis_level = "Species",
compare_list = c("CF_OF", "CF_BF")
),
all_net = list(threshold = 0.95, method = "pearson")
)
Three_group_analysis <- LorMe_pipeline(Three_group)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.