create-singlecell-env-lite
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "create-singlecell-env-lite" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-e4da4c88709778d88b102577d8107d2d701675dd8b2906f582f679d3159d233d. Verify the upstream source and version against https://skillhub.cn/skills/org-ekt13cme/create-singlecell-env before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Create minimal single-cell environment: configures a minimal conda environment for standard single-cell RNA-seq analysis, including only the Seurat core pipeline and excluding advanced integration, trajectory inference, or annotation packages.
Introduction source: third_party · org-ekt13cme · 1.0.1 Reference
SkillPi interpretation
- Tasks
- Configure a minimal conda environment for standard single-cell RNA-seq analysis (Seurat core workflow only, no advanced integration/trajectory/annotation packages)
- Software, accounts and paid services
- This is a trimmed-down version of `create-singlecell-env`. It installs only what's needed to run the **standard Seurat workflow**: QC → normalize → PCA → cluster → UMAP → marker genes → plot. Skips: harmony/batchelor (integration), monocle3/slingshot/tradeSeq (trajectory), DoubletFinder (doublet detection), SingleR/scmap (annotation), DESeq2/edgeR/limma (bulk DE), clusterProfiler/fgsea/GSVA/enrichR (enrichment), CellChat (cell-cell communication), scran/scater/scuttle (Bioconductor alt framework), Python/scanpy integration, and example datasets. Install any of those later, on demand, with `BiocManager::install('PackageName')` inside the env — they're not needed to run the standard pipeline.
- Testing
- Not tested
Browse files
Frontmatter
name: "create-singlecell-env-lite"
description: "Configure a minimal conda environment for standard single-cell RNA-seq analysis (Seurat core workflow only, no advanced integration/trajectory/annotation packages)"
alwaysAllow: ["Bash"]Single Cell Analysis Environment Setup (Lite)
This is a trimmed-down version of create-singlecell-env. It installs only what's needed
to run the standard Seurat workflow: QC → normalize → PCA → cluster → UMAP → marker genes → plot.
Skips: harmony/batchelor (integration), monocle3/slingshot/tradeSeq (trajectory),
DoubletFinder (doublet detection), SingleR/scmap (annotation), DESeq2/edgeR/limma (bulk DE),
clusterProfiler/fgsea/GSVA/enrichR (enrichment), CellChat (cell-cell communication),
scran/scater/scuttle (Bioconductor alt framework), Python/scanpy integration, and example datasets.
Install any of those later, on demand, with BiocManager::install('PackageName') inside the env —
they're not needed to run the standard pipeline.
Step 0: Detect and Install Conda
CRITICAL: Always start by locating the real Conda executable. Do not rely only on
command -v conda: desktop apps, non-interactive shells, and shells without conda init
may have Conda installed without exposing it on PATH.
Set CONDA_EXE once and use "$CONDA_EXE" for every automated Conda command in this
skill. Shell initialization is not required when invoking Conda by absolute path.
discover_conda() {
local candidate="" login_shell="${SHELL:-}"
if [[ -n "${CONDA_EXE:-}" ]] && [[ -x "$CONDA_EXE" ]]; then
candidate="$CONDA_EXE"
elif candidate="$(type -P conda 2>/dev/null)" && [[ -x "$candidate" ]]; then
:
else
candidate=""
fi
if [[ -z "$candidate" ]] && [[ -x "$login_shell" ]]; then
local login_env="" login_path=""
login_env="$("$login_shell" -lic env 2>/dev/null)"
candidate="$(printf '%s\n' "$login_env" | sed -n 's/^CONDA_EXE=//p' | tail -n 1)"
if [[ ! -x "$candidate" ]]; then
candidate=""
login_path="$(printf '%s\n' "$login_env" | sed -n 's/^PATH=//p' | tail -n 1)"
if [[ -n "$login_path" ]]; then
candidate="$(PATH="$login_path" type -P conda 2>/dev/null)"
fi
fi
[[ -x "$candidate" ]] || candidate=""
fi
[[ -n "$candidate" ]] || return 1
CONDA_EXE="$(cd "$(dirname "$candidate")" && pwd -P)/$(basename "$candidate")"
export CONDA_EXE
}
if discover_conda; then
echo "✓ Conda is installed: $CONDA_EXE"
"$CONDA_EXE" --version
else
echo "✗ Conda is not exposed by the current environment or the user's login shell"
fi
There is no universal Conda installation registry on macOS/Linux. If Conda is installed but neither
PATH, CONDA_EXE, nor the login-shell configuration references it, do not crawl the whole filesystem
or guess installation directories. Ask the user for the executable path, then verify it with
/absolute/path/to/conda --version before offering to install another distribution.
If Conda is not installed at all, offer the standard Miniconda install (see create-singlecell-env
Step 0 for the full OS-detection install script) or point the user to
https://docs.anaconda.com/free/miniconda/index.html.
Step 1: Create Conda Environment
Detect architecture and create the environment. Use a distinct env name (scrnaseq-lite) so it
never collides with a full scrnaseq environment the user may already have.
ARCH=$(uname -m)
if "$CONDA_EXE" env list | grep -q "^scrnaseq-lite"; then
echo "⚠️ Environment 'scrnaseq-lite' already exists."
echo " Activate with: conda activate scrnaseq-lite"
echo " To recreate, first run: conda env remove -n scrnaseq-lite"
fi
if [[ "$ARCH" == "arm64" ]]; then
"$CONDA_EXE" create -n scrnaseq-lite "r-base>=4.4,<4.5" r-essentials -c conda-forge -y
else
"$CONDA_EXE" create -n scrnaseq-lite "r-base>=4.4,<4.5" r-essentials -c conda-forge -y
fi
Verify:
"$CONDA_EXE" env list | grep -q "^scrnaseq-lite" \
&& echo "✓ Environment 'scrnaseq-lite' created successfully" \
|| echo "✗ Environment creation failed"
Step 2: Activate Environment
IMPORTANT: conda activate relies on shell hooks that are only loaded in an interactive
login shell. In non-interactive contexts (scripts, CI, subprocesses) it can silently fail to update
PATH, causing compiled-package installs to fail with errors like x86_64-conda-linux-gnu-cc: not found.
Always use "$CONDA_EXE" run -n scrnaseq-lite <command> for every automated command in this
skill.
"$CONDA_EXE" run -n scrnaseq-lite R --version
"$CONDA_EXE" run -n scrnaseq-lite bash -c 'command -v ${CC:-cc} || command -v x86_64-conda-linux-gnu-cc || command -v gcc' \
|| { echo "✗ No C compiler found on PATH inside the env — install one first: conda install -n scrnaseq-lite compilers -c conda-forge -y"; exit 1; }
Step 3: Configure R Environment
Note on failure detection: install.packages(...) usually exits 0 even on failure. Always verify
with installed.packages() after each install (see install_and_verify helper below).
"$CONDA_EXE" run -n scrnaseq-lite Rscript -e "
options(repos = c(CRAN = 'https://cloud.r-project.org'))
"
Step 4: Install Core Packages Only
The minimal set needed to run the standard Seurat workflow (QC, normalization, PCA, clustering,
UMAP, FindAllMarkers, plotting):
echo "Installing minimal single-cell package set..."
install_and_verify() {
local install_expr="$1"; shift
local pkgs=("$@")
"$CONDA_EXE" run -n scrnaseq-lite Rscript -e "$install_expr"
local check_expr="miss <- c($(printf "'%s'," "${pkgs[@]}" | sed 's/,$//'))[!c($(printf "'%s'," "${pkgs[@]}" | sed 's/,$//')) %in% installed.packages()[,1]]; if (length(miss)) { cat('MISSING:', paste(miss, collapse=', '), '\n'); quit(status=1) } else { cat('OK\n') }"
"$CONDA_EXE" run -n scrnaseq-lite Rscript -e "$check_expr" || { echo "✗ Failed to install: ${pkgs[*]}"; return 1; }
echo "✓ Verified installed: ${pkgs[*]}"
}
# Core framework
install_and_verify "install.packages(c('Seurat', 'SeuratObject'), repos = 'https://cloud.r-project.org')" Seurat SeuratObject || exit 1
# Visualization + data wrangling
install_and_verify "install.packages(c('ggplot2', 'patchwork', 'dplyr'), repos = 'https://cloud.r-project.org')" ggplot2 patchwork dplyr || exit 1
That's it — no Bioconductor packages, no BiocManager needed for this minimal set.
Verification
"$CONDA_EXE" run -n scrnaseq-lite Rscript -e "
suppressMessages({
library(Seurat); library(SeuratObject); library(ggplot2); library(patchwork); library(dplyr)
})
cat('R version:', R.version.string, '\n')
cat('Seurat version:', as.character(packageVersion('Seurat')), '\n')
cat('All core packages load OK\n')
"
Quick Reference Package List
| Category | Packages |
|---|---|
| Core Framework | Seurat, SeuratObject |
| Visualization | ggplot2, patchwork |
| Data wrangling | dplyr |
Total: 5 packages (vs. ~25 in the full create-singlecell-env skill).
Upgrading to the Full Environment
If the user later needs integration, trajectory inference, annotation, DE, enrichment, or
cell-cell communication analysis, point them to the full create-singlecell-env skill, or install
the specific Bioconductor package(s) they need directly into scrnaseq-lite:
"$CONDA_EXE" run -n scrnaseq-lite Rscript -e "
if (!requireNamespace('BiocManager', quietly = TRUE)) install.packages('BiocManager')
BiocManager::install('PackageName', ask = FALSE)
"
Default Behavior When Invoked
- First: Run
discover_condafrom Step 0; never treat aPATHmiss alone as proof Conda is absent - If discovered: Verify with
"$CONDA_EXE" --versionand use that absolute path thereafter - If not discovered: Ask for a custom Conda path before offering installation instructions
- If installed: Check if
scrnaseq-litealready exists using"$CONDA_EXE" env list - If environment exists: Warn user and suggest how to proceed (use or recreate)
- If environment doesn't exist: Proceed with environment creation (Steps 1-4)
- Always: Verify each step completes successfully before moving to the next
- Report: Give clear feedback on the executable path, installation, and current progress
Current listing version
1.0.1
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 针对单细胞 RNA-seq 分析提供轻量化、精准的最小环境配置,满足 Seurat 核心流程刚需
- 明确区分轻量版与完整版,帮助用户按需选择,避免过度安装
Highlights
- description 清晰界定功能范围(仅核心流程,不含高级模块),边界明确
- frontmatter 描述完整,无截断或错位
Highlights
- 步骤划分清晰(Step 0-4),每步有明确目标和验证机制
- 包含端到端可执行示例和最终验证脚本,frontmatter 完整
Highlights
- 覆盖 Conda 未暴露、环境已存在、编译器缺失、包安装失败等主要异常场景
- 使用 CONDA_EXE 绝对路径和 conda run 避免 shell hook 问题,关键操作有验证机制
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- cloud.r-project.org
- docs.anaconda.com
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
This is a trimmed-down version of `create-singlecell-env`. It installs only what's needed to run the **standard Seurat workflow**: QC → normalize → PCA → cluster → UMAP → marker genes → plot. Skips: harmony/batchelor (integration), monocle3/slingshot/tradeSeq (trajectory), DoubletFinder (doublet detection), SingleR/scmap (annotation), DESeq2/edgeR/limma (bulk DE), clusterProfiler/fgsea/GSVA/enrichR (enrichment), CellChat (cell-cell communication), scran/scater/scuttle (Bioconductor alt framework), Python/scanpy integration, and example datasets. Install any of those later, on demand, with `BiocManager::install('PackageName')` inside the env — they're not needed to run the standard pipeline.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.