AGENT SKILL

data-io-validation

Prepare, load, orient, and validate PyDESeq2 count and metadata inputs before differential expression modeling.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
data-io-validation
license
MIT
metadata
{ "disco-role": "operating" }
description
Prepare, load, orient, and validate PyDESeq2 count and metadata inputs before differential expression modeling.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

Data I/O And Validation

Use this sub-skill when a task is about getting data into PyDESeq2 safely: reading count and metadata CSVs, fixing sample/gene orientation, checking design prerequisites, constructing a DeseqDataSet, or exporting fitted data as picklable AnnData.

Read First

  • references/data-formats.md: expected schemas, loading patterns, validation checklist, filtering, AnnData, and script recipes.
  • references/troubleshooting.md: symptoms and recoveries for count, metadata, design, orientation, and local CSV problems.
  • scripts/validate_pydeseq2_inputs.py: network-free validator for local CSVs and optional design matrices.
  • scripts/run_local_csv_dea.py: local CSV adaptation of the pandas I/O example with optional synthetic data and optional tiny fit smoke.

Core Rules

  • Counts must be samples x genes: rows are sample ids, columns are gene ids, and values are numeric non-negative integers.
  • Metadata must be samples x variables: its index must be the same sample ids, in the same order, as the count index before constructing DeseqDataSet.
  • If counts arrive as genes x samples, transpose them before validation or pass --orientation genes-by-samples to the bundled scripts.
  • Formula designs such as ~condition or ~group + condition reference metadata columns; direct design matrices must have one row per sample and an index identical to metadata/counts.
  • Filter missing design-factor samples before modeling, then optionally remove genes with low total counts.

Recommended Workflow

  1. Load with pandas.read_csv(..., index_col=0) or use load_example_data(modality="raw_counts"|"metadata", dataset="synthetic") for the built-in synthetic example.
  2. Normalize orientation to samples x genes, then align metadata with metadata = metadata.loc[counts.index] only after confirming both sets of sample ids match.
  3. From this sub-skill directory, run python scripts/validate_pydeseq2_inputs.py --counts-csv counts.csv --metadata-csv metadata.csv --design '~condition' --orientation auto.
  4. Construct DeseqDataSet(counts=counts_df, metadata=metadata, design="~condition") only after validation passes.
  5. Route full fitting with dds.deseq2() to ../dea-workflows/SKILL.md; route result interpretation to ../statistics-and-results/SKILL.md; route VST/normalization internals to ../model-fitting-internals/SKILL.md.

Safe Export

When a fitted DeseqDataSet must be pickled, export dds.to_picklable_anndata() instead of pickling the raw DeseqDataSet; this converts the formulaic design matrix metadata into a picklable AnnData representation.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351