Comprehensive metabolic landscape analysis pipeline for scRNA-seq data...
Comprehensive metabolic landscape analysis pipeline for scRNA-seq data. This is an all-in-one process group performing complete metabolic pathway analysis including expression imputation, feature selection, pathway activity calculation, and heterogeneity analysis. Based on methodology from Xiao et al. (2019) Nature Communications.
Key difference from individual Metabolic processes*: ScrnaMetabolicLandscape runs multiple related metabolic analysis steps as a coordinated workflow. Use this for complete metabolic analysis pipeline. Use individual processes (MetabolicInput, MetabolicExprImputation, MetabolicFeatures, MetabolicPathwayActivity, MetabolicPathwayHeterogeneity) for fine-grained control or specific steps only.
[ScrnaMetabolicLandscape]
cache = true
[ScrnaMetabolicLandscape.in]
srtobj = ["SeuratClustering"] # Input from upstream clustering process
Note: Input is automatically wired from CombinedInput. The metafile argument (used in standalone biopipen) is set via pipeline configuration.
[ScrnaMetabolicLandscape.envs]
# Core configuration
gmtfile = "path/to/metabolic_pathways.gmt" # Required: GMT file with metabolic pathways
group_by = "seurat_clusters" # Required: Column to group cells (e.g., "cluster", "seurat_clusters")
subset_by = "treatment" # Optional: Subset data by metadata column
# Imputation settings
noimpute = false # Skip imputation if set to true
# Metadata transformations
mutaters = {} # dict - Add new columns using R expressions
# Example: {"timepoint": "if_else(treatment == 'control', 'pre', 'post')"}
# Performance
ncores = 1 # Number of cores for parallelization (inherited by all sub-processes)
GMT file sources:
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs]
tool = "alra" # Choice: "alra", "scimpute", "rmagic"
alra_args = {} # Additional RunALRA() parameters
Imputation tools: alra (fast, recommended), scimpute (accurate, slow), rmagic (diffusion-based).
[ScrnaMetabolicLandscape.MetabolicFeatures.envs]
prerank_method = "signal_to_noise" # Gene ranking: signal_to_noise, abs_signal_to_noise, t_test, ratio_of_classes, diff_of_classes, log2_ratio_of_classes
comparisons = [] # Specific group comparisons (empty = all pairwise)
fgsea_args = {} # Additional fgsea parameters: { "minSize": 15, "maxSize": 500 }
[ScrnaMetabolicLandscape.MetabolicPathwayActivity.envs]
ntimes = 5000 # Number of permutations for p-value estimation
[ScrnaMetabolicLandscape.MetabolicPathwayHeterogeneity.envs]
select_pcs = 0.8 # Proportion of variance to select PCs
pathway_pval_cutoff = 0.01 # P-value cutoff for enriched pathways
fgsea_args = { scoreType = "std", nproc = 1 }
[ScrnaMetabolicLandscape]
[ScrnaMetabolicLandscape.in]
srtobj = ["SeuratClustering"]
[ScrnaMetabolicLandscape.envs]
gmtfile = "pathways/KEGG_metabolism.gmt"
group_by = "seurat_clusters"
[ScrnaMetabolicLandscape]
cache = true
[ScrnaMetabolicLandscape.in]
srtobj = ["SeuratClustering"]
[ScrnaMetabolicLandscape.envs]
gmtfile = "https://download.baderlab.org/EM_Genesets/current_release/Human/symbol/KEGG_2021_Human_symbol.gmt"
group_by = "seurat_clusters"
subset_by = "treatment"
mutaters = { "timepoint" = "if_else(treatment == 'control', 'pre', 'post')" }
ncores = 4
noimpute = false
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs]
tool = "alra"
[ScrnaMetabolicLandscape.MetabolicPathwayActivity.envs]
ntimes = 10000
[ScrnaMetabolicLandscape.MetabolicFeatures.envs]
prerank_method = "log2_ratio_of_classes"
fgsea_args = { minSize = 15, maxSize = 500 }
comparisons = ["0", "1"]
[ScrnaMetabolicLandscape]
[ScrnaMetabolicLandscape.envs]
gmtfile = "pathways/KEGG_metabolism.gmt"
group_by = "seurat_clusters"
# Case 1: Treatment comparison
[ScrnaMetabolicLandscape.MetabolicPathwayActivity.envs.cases.Treatment]
subset_by = "treatment"
group_by = "seurat_clusters"
# Case 2: Response comparison
[ScrnaMetabolicLandscape.MetabolicFeatures.envs.cases.Response]
subset_by = "response"
group_by = "seurat_clusters"
prerank_method = "signal_to_noise"
All metabolic analysis steps with minimal customization:
[ScrnaMetabolicLandscape]
[ScrnaMetabolicLandscape.in]
srtobj = ["SeuratClustering"]
[ScrnaMetabolicLandscape.envs]
gmtfile = "pathways/KEGG_metabolism.gmt"
group_by = "seurat_clusters"
ncores = 4
Compare only specific groups:
[ScrnaMetabolicLandscape]
[ScrnaMetabolicLandscape.envs]
gmtfile = "pathways/KEGG_metabolism.gmt"
group_by = "seurat_clusters"
[ScrnaMetabolicLandscape.MetabolicFeatures.envs]
comparisons = ["0", "1"] # Compare cluster 0 and 1 against others
When you don't want to impute dropout values:
[ScrnaMetabolicLandscape]
[ScrnaMetabolicLandscape.envs]
gmtfile = "pathways/KEGG_metabolism.gmt"
group_by = "seurat_clusters"
noimpute = true
CombinedInput (requires SeuratClustering or equivalent)Symptom: No pathways enriched or warning about missing genes Solution: Ensure GMT file uses same gene identifier type as your Seurat object (e.g., HGNC symbols for human, MGI symbols for mouse).
Symptom: MetabolicExprImputation process runs for hours
Solution: Use tool = "alra" (fastest) or skip imputation with noimpute = true.
Symptom: All pathways have high p-values or no enrichment
Solution: Check fgsea_args (adjust minSize/maxSize), try different prerank_method, verify group_by column has sufficient differences.
Symptom: Process fails during permutation or GSEA
Solution: Reduce ntimes (default 5000 → 1000) or reduce ncores to limit parallel memory usage.
Symptom: Warning about empty subsets or missing groups
Solution: Check subset_by column for NA values or mismatched categories. Use mutaters to clean metadata.
Xiao, Zhengtao, Ziwei Dai, and Jason W. Locasale. "Metabolic landscape of tumor microenvironment at single cell resolution." Nature communications 10.1 (2019): 1-12. https://www.nature.com/articles/s41467-019-11738-0