L’interface est localisée ; les présentations et documents des Skills sont traduits automatiquement par IA dans votre langue. Le code, les commandes, chemins et termes techniques restent en version originale, et le document de l’auteur fait foi.
Explorer les Skills
Productivité · SKILL.md

preprocessing-qc

preprocessing-qc

Use Scanpy preprocessing for filtering, QC metrics, normalization/log transforms, HVG selection, scaling/regression, PCA preparation, sampling/downsampling, basic batch correction wrappers, and Scrublet doublet workflows.

Independent GitHub snapshot · Automated classification · Original documentation governs

Documentation de la Skill

GitHub

name: preprocessing-qc description: "Use Scanpy preprocessing for filtering, QC metrics, normalization/log transforms, HVG selection, scaling/regression, PCA preparation, sampling/downsampling, basic batch correction wrappers, and Scrublet doublet workflows." disable-model-invocation: true metadata: disco-role: operating license: BSD 3-Clause

Scanpy Preprocessing and QC

Use this sub-skill when a task needs to prepare an AnnData object for graph construction, embedding, clustering, marker testing, or reporting with import scanpy as sc and sc.pp.* APIs.

Route by task

User needUseDetails
Filter cells/genes or compute QC metricssc.pp.filter_cells, sc.pp.filter_genes, sc.pp.calculate_qc_metricsSee QC and filtering.
Preserve raw counts, normalize, or log-transformadata.layers, sc.pp.normalize_total, sc.pp.log1pSee Normalization, log, and layers.
Select HVGs, including batch-aware or Seurat v3 flavorssc.pp.highly_variable_genesSee Highly variable genes.
Scale, regress covariates, or compute PCA featuressc.pp.scale, sc.pp.regress_out, sc.pp.pcaSee Scaling, regression, and PCA.
Sample cells/counts before expensive preprocessingsc.pp.sample, sc.pp.downsample_counts, legacy sc.pp.subsampleSee Sampling and downsampling.
Apply simple preprocessing batch correctionsc.pp.combat, sc.pp.harmony_integrateSee Basic batch correction.
Detect doublets or simulate doubletssc.pp.scrublet, sc.pp.scrublet_simulate_doubletsSee Doublet detection.
Apply bundled preprocessing recipessc.pp.recipe_seurat, sc.pp.recipe_zheng17, sc.pp.recipe_weinreb17See Recipes.
Check a local install with a tiny fixturebundled scriptRun python sub-skills/preprocessing-qc/scripts/scanpy_preprocess_qc_smoke.py.

Fast rules

  • Preserve count data before destructive transforms: adata.layers["counts"] = adata.X.copy() before normalize_total, log1p, scale, or regress_out.
  • Make QC and HVG calls explicit about representation: pass layer="counts" or use_raw=True only when that slot contains the intended matrix.
  • Keep calculate_qc_metrics(..., percent_top=...) values no larger than adata.n_vars; use percent_top=None or small values for tiny fixtures.
  • Use inplace=False to inspect return values for calculate_qc_metrics, filter_*, normalize_total, or highly_variable_genes; use copy=True only where the API documents copied AnnData returns.
  • Prefer scale(zero_center=False) for sparse-memory-sensitive workflows; scale(zero_center=True), regress_out, and ComBat can densify data.
  • Run pca before harmony_integrate, then route neighbors, UMAP, clustering, marker ranking, graph plotting, and embedding interpretation to graph-embedding-analysis.
  • Route IO/data loading to io-data-access, plotting/report figures to plotting-reporting, and optional integration method selection beyond core Scanpy wrappers to external-integrations.

Required references

Skills enregistrées