xiaohongshu
xiaohongshu
metabolicexpimputation
Imputes missing/dropout values in scRNA-seq expression data to improve metabolic pathway analysis. This process handles sparsity common in single-cell RNA sequencing data by filling in zero values using advanced imputation methods (ALRA, scImpute, or MAGIC). The imputed data provides more accurat...
Full skill instructions
Imputes missing/dropout values in scRNA-seq expression data to improve metabolic pathway analysis. This process handles sparsity common in single-cell RNA sequencing data by filling in zero values using advanced imputation methods (ALRA, scImpute, or MAGIC). The imputed data provides more accurate metabolic pathway activity calculations and feature selection in downstream analysis.
Note: This process is part of the ScrnaMetabolicLandscape process group. When using the full group, MetabolicExprImputation is automatically enabled (or skipped via noimpute flag). Use this skill when configuring the imputation step individually or when customizing imputation parameters within the ScrnaMetabolicLandscape group.
When to skip imputation:
As part of ScrnaMetabolicLandscape group (recommended):
[ScrnaMetabolicLandscape]
# Automatically includes MetabolicExprImputation
[ScrnaMetabolicLandscape.envs]
noimpute = false # Set to true to skip imputation
Individual process configuration (advanced):
[ScrnaMetabolicLandscape.MetabolicExprImputation]
cache = true
MetabolicExprImputation automatically receives input from upstream processes:
MetabolicInput.imputed.qs suffixImportant: Input is automatically wired. No manual [ScrnaMetabolicLandscape.MetabolicExprImputation.in] specification needed.
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs]
# Imputation method selection (required)
tool = "alra" # Choice: "alra", "scimpute", "rmagic"
# Tool-specific configurations
alra_args = {} # Type: json - Arguments for RunALRA()
scimpute_args = {} # Type: ns - Arguments for scImpute()
rmagic_args = {} # Type: ns - Arguments for magic()
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs]
tool = "alra"
alra_args = {} # Default: empty dict (use RunALRA() defaults)
# No additional parameters required
ALRA advantages:
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs]
tool = "scimpute"
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs.scimpute_args]
# Dropout threshold (genes with dropout rate > threshold will be imputed)
drop_thre = 0.5 # Type: float, Default: 0.5 (50% dropout)
# Number of clusters for imputation
kcluster = null # Type: int or null, Default: null (auto-detect)
# Parallel cores
ncores = 1 # Type: int, Default: 1
# Reference gene file (optional)
refgene = "" # Type: path, Default: "" (use all genes)
scImpute advantages:
scImpute considerations:
scImpute installation[ScrnaMetabolicLandscape.MetabolicExprImputation.envs]
tool = "rmagic"
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs.rmagic_args]
# Python interpreter path for magic-impute
python = "python" # Type: path, Default: "python"
# Dropout threshold for gene selection
threshold = 0.5 # Type: float, Default: 0.5
# Only genes with dropout rates > threshold are imputed
# Dropout rate = (cells with non-zero expression) / (total cells)
MAGIC advantages:
MAGIC considerations:
magic-impute package| Method | Speed | Accuracy | Use Case | Dependencies |
|---|---|---|---|---|
| ALRA | ⚡ Fast | ⭐⭐⭐ Good | Large datasets, quick analysis | Seurat (built-in) |
| scImpute | 🐢 Slow | ⭐⭐⭐⭐ Best | Heterogeneous cell types, accuracy critical | R package scImpute |
| MAGIC | 🚶 Medium | ⭐⭐⭐⭐ Good | Trajectory data, manifold preservation | Python magic-impute |
Choose ALRA when:
Choose scImpute when:
Choose MAGIC when:
[ScrnaMetabolicLandscape]
[ScrnaMetabolicLandscape.envs]
gmtfile = "KEGG_2021_Human"
group_by = "seurat_clusters"
# ALRA imputation enabled by default (noimpute = false)
[ScrnaMetabolicLandscape]
[ScrnaMetabolicLandscape.envs]
gmtfile = "KEGG_2021_Human"
group_by = "seurat_clusters"
noimpute = true # Skip MetabolicExprImputation entirely
[ScrnaMetabolicLandscape]
[ScrnaMetabolicLandscape.envs]
gmtfile = "Reactome_Pathways_2024"
group_by = "cluster"
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs]
tool = "scimpute"
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs.scimpute_args]
drop_thre = 0.6 # Impute genes with >60% dropout
kcluster = 10 # Use 10 clusters
ncores = 4 # Parallelize with 4 cores
[ScrnaMetabolicLandscape]
[ScrnaMetabolicLandscape.envs]
gmtfile = "KEGG_2021_Human"
group_by = "pseudotime"
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs]
tool = "rmagic"
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs.rmagic_args]
python = "/opt/conda/envs/r-base/bin/python"
threshold = 0.4 # Impute genes with >40% dropout
[ScrnaMetabolicLandscape]
[ScrnaMetabolicLandscape.envs]
gmtfile = "KEGG_2021_Human"
group_by = "seurat_clusters"
ncores = 8
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs]
tool = "alra" # Fastest for large datasets
[ScrnaMetabolicLandscape]
[ScrnaMetabolicLandscape.envs]
gmtfile = "KEGG_2021_Human"
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs]
tool = "scimpute"
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs.scimpute_args]
drop_thre = 0.8 # Only impute genes with >80% dropout (very sparse)
kcluster = 5 # Conservative clustering
refgene = "high_variance_genes.txt" # Only impute specific genes
# Default fast imputation
[ScrnaMetabolicLandscape]
[ScrnaMetabolicLandscape.envs]
gmtfile = "KEGG_2021_Human"
group_by = "seurat_clusters"
# For highly sparse data with cell-type heterogeneity
[ScrnaMetabolicLandscape]
[ScrnaMetabolicLandscape.envs]
gmtfile = "Reactome_Pathways_2024"
group_by = "cluster"
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs]
tool = "scimpute"
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs.scimpute_args]
drop_thre = 0.7 # High dropout threshold
ncores = 8 # More cores for speed
# For differentiation or developmental trajectories
[ScrnaMetabolicLandscape]
[ScrnaMetabolicLandscape.envs]
gmtfile = "KEGG_2021_Human"
group_by = "pseudotime"
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs]
tool = "rmagic"
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs.rmagic_args]
threshold = 0.3 # Lower threshold for smoother gradients
# For >50k cells - prioritize speed
[ScrnaMetabolicLandscape]
[ScrnaMetabolicLandscape.envs]
gmtfile = "KEGG_2021_Human"
group_by = "seurat_clusters"
ncores = 16 # Use all available cores
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs]
tool = "alra" # Only ALRA can handle this scale efficiently
# Compare imputation methods via cases
[ScrnaMetabolicLandscape]
[ScrnaMetabolicLandscape.envs]
gmtfile = "KEGG_2021_Human"
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs.cases.ALRA]
tool = "alra"
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs.cases.scImpute]
tool = "scimpute"
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs.cases.scImpute.scimpute_args]
drop_thre = 0.5
ncores = 4
MetabolicInput (Seurat object from CombinedInput)SeuratClustering (most common)TESSA (TCR-specific)SeuratMap2Ref (reference mapping)CellTypeAnnotation (cell type labels)| Method | R Package | Python Package | Installation |
|---|---|---|---|
| ALRA | alra (built-in to Seurat) | None | Included with Seurat |
| scImpute | scImpute | None | install.packages("scImpute") |
| MAGIC | Rmagic | magic-impute | pip install magic-impute |
ALRA:
scImpute:
drop_thre: Must be between 0 and 1kcluster: If specified, must be > 0 and less than number of cellsrefgene: If provided, file must exist and contain valid gene namesMAGIC:
python: Must point to valid Python interpreter with magic-impute installedthreshold: Must be between 0 and 1RNA created with imputed dataRAW (with ALRA and MAGIC)Symptoms: MetabolicExprImputation runs for >4 hours, especially with scImpute
Solutions:
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs]
tool = "alra"
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs.scimpute_args]
kcluster = 3 # Fewer clusters
ncores = 8 # More parallelization
drop_thre = 0.8 # Impute fewer genes
[ScrnaMetabolicLandscape.envs]
noimpute = true
Symptoms: "Error: cannot allocate vector of size...", R session crashes
Solutions:
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs.scimpute_args]
ncores = 1
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs.scimpute_args]
refgene = "highly_variable_genes.txt"
Symptoms: Downstream analysis fails or produces negative pathway scores
Causes:
Solutions:
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs.rmagic_args]
threshold = 0.6 # Only impute very sparse genes
Symptoms: Error message about python or magic-impute not being found
Solutions:
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs.rmagic_args]
python = "/opt/anaconda3/bin/python"
pip install magic-impute
system("python --version")
Symptoms: Pathway activity scores similar before/after imputation
Solutions:
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs.scimpute_args]
drop_thre = 0.3 # Impute less sparse genes
Symptoms: "Genes not found" errors in downstream processes
Solutions:
CD3D)Cd3d)[ScrnaMetabolicLandscape.MetabolicExprImputation.envs.scimpute_args]
refgene = "valid_genes.txt"
Symptoms: Default assay still shows RAW data, downstream processes use wrong data
Causes:
Solutions:
DefaultAssay(srtobj) # Should return "RNA", not "RAW"
DefaultAssay(srtobj) <- "RNA"
.imputed.qs was createdSymptoms: Error about kcluster or clustering algorithm
Solutions:
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs.scimpute_args]
kcluster = null
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs.scimpute_args]
kcluster = 5
Symptoms: Unusual expression patterns, biologically implausible values
Causes:
Solutions:
[ScrnaMetabolicLandscape.MetabolicExprImputation.envs.scimpute_args]
drop_thre = 0.8 # Only impute extremely sparse genes
Try different method:
Improve QC upstream before imputation
Skip imputation if artifacts severe
ALRA:
scImpute:
MAGIC:
# ALRA (Seurat built-in)
install.packages("Seurat")
# scImpute
install.packages("scImpute")
# Rmagic (for MAGIC)
install.packages("Rmagic")
# magic-impute (Python)
pip install magic-impute
Start: MetabolicExprImputation
│
├─ Dataset size > 50k cells?
│ └─ YES → Use ALRA (tool = "alra")
│
├─ Dataset size 10k-50k cells?
│ ├─ Priority: Speed?
│ │ └─ YES → Use ALRA
│ └─ Priority: Accuracy?
│ └─ YES → Use scImpute (tool = "scimpute")
│
├─ Dataset size < 10k cells?
│ ├─ Cell-type heterogeneity high?
│ │ └─ YES → Use scImpute
│ └─ Continuum/trajectory data?
│ └─ YES → Use MAGIC (tool = "rmagic")
│
└─ Data quality concerns?
├─ Low dropout rate (<20%)?
│ └─ Skip imputation (noimpute = true)
└─ High dropout rate (>80%)?
└─ Use scImpute with high threshold (drop_thre = 0.8)
| Dataset Size | ALRA | scImpute (4 cores) | MAGIC |
|---|---|---|---|
| 1,000 cells | 2 min | 5 min | 3 min |
| 5,000 cells | 5 min | 15 min | 8 min |
| 10,000 cells | 10 min | 45 min | 15 min |
| 25,000 cells | 25 min | 2-3 hours | 45 min |
| 50,000 cells | 1 hour | 8-10 hours | 2 hours |
| 100,000 cells | 2 hours | Not recommended | 4 hours |
Note: Benchmarks on 16-core machine, 64GB RAM. scImpute scales quadratically with cell count.
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience