differential-expression
Skill27 starsChanged 8 months agoMITView on GitHub
Bulk transcriptomics differential expression with count-aware modeling, design validation, contrast handling, thresholded exports, and publication-ready DE figures.
In this repository43 other files it gives its agents.
- alignment-and-mappingSkill
- database-accessSkill
- read-qcSkill
- reporting-and-figure-exportSkill
- sequence-and-format-ioSkill
- workflow-managementSkill
- ehr-analysisSkill
- atac-seqSkill
- chip-seqSkill
- epitranscriptomicsSkill
- gene-regulatory-networksSkill
- hi-c-3d-genomicsSkill
- methylation-analysisSkill
- comparative-genomicsSkill
- copy-numberSkill
- genome-assemblySkill
- long-read-genomicsSkill
- phasing-imputationSkill
- variant-callingSkill
- metagenomicsSkill
- microbiome-ampliconSkill
- pathogen-epi-genomicsSkill
- phylogeneticsSkill
- causal-genomicsSkill
- machine-learning-for-omicsSkill
- multi-omics-integrationSkill
- pathway-analysisSkill
- systems-biologySkill
- imaging-mass-cytometrySkill
- metabolomicsSkill
- proteomicsSkill
- structural-biologySkill
- cell-annotationSkill
- cell-communicationSkill
- multiome-scatacSkill
- scrna-preprocessing-clusteringSkill
- spatial-transcriptomicsSkill
- trajectory-lineageSkill
- alternative-splicingSkill
- bulk-rna-expressionSkill
- ribo-seqSkill
- rna-quantificationSkill
- small-rna-seqSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Use this skill for count-based DE from bulk RNA-seq or similar count matrices when the user needs:
- Distinctive: line 41
no replicates: do not pretend formal DE is robust
- Distinctive: line 47
Read technical_reference.md for design formulas, confounding checks, and contrast logic.
- Distinctive: line 48
Read commands_and_thresholds.md for PyDESeq2 code, recommended filters, and output file conventions.
- Distinctive: line 104
Use raw counts, not TPM or log-normalized expression, for count-based DE frameworks.
- Distinctive: line 145
no fully confounded batch and condition
- Very specific: line 147
all final tables should include baseMean, log2FoldChange, pvalue, and padj
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Differential Expression
Version Compatibility
Reference examples assume:
pydeseq20.4+pandas2.2+numpy1.26+matplotlib3.8+
Verify before use:
- Python:
python -c "import pydeseq2, pandas; print(pydeseq2.__version__, pandas.__version__)"
Overview
Use this skill for count-based DE from bulk RNA-seq or similar count matrices when the user needs:
- robust model fitting
- explicit contrasts
- ranked gene tables
- volcano and MA plots
- pathway-ready output tables
When To Use This Skill
- raw count matrix and sample metadata are available
- the task is condition, treatment, or genotype comparison
- batch or pairing terms may need explicit modeling
Quick Route
- no replicates: do not pretend formal DE is robust
- 2 replicates per group: possible but conservative interpretation
- 3 or more replicates per group: standard starting point
Progressive Disclosure
- Read technical_reference.md for design formulas, confounding checks, and contrast logic.
- Read commands_and_thresholds.md for PyDESeq2 code, recommended filters, and output file conventions.
Prerequisites
| Requirement | Recommendation |
| minimum replicates per group | >= 2 |
| preferred replicates per group | >= 3 |
| input values | raw integer counts |
Expected Inputs
- raw count matrix
- sample metadata
- explicit contrast such as treated vs control
Expected Outputs
results/de_results.tsvresults/de_ranked_genes.tsvfigures/volcano.pdffigures/ma_plot.pdfqc/sample_pca.pdf
Starter Pattern
from pydeseq2.dds import DeseqDataSet
from pydeseq2.ds import DeseqStats
dds = DeseqDataSet(
counts=counts_df,
metadata=metadata_df,
design_factors=["condition", "batch"],
)
dds.deseq2()
stats = DeseqStats(dds, contrast=("condition", "treated", "control"))
stats.summary()
res = stats.results_df.sort_values("padj")
res.to_csv("results/de_results.tsv", sep="\t")Workflow
1. Validate the design
Check:
- replicate counts
- factor levels
- batch balance
- paired structure
- confounded variables
2. Fit a count-aware model
Use raw counts, not TPM or log-normalized expression, for count-based DE frameworks.
3. Apply explicit filtering and ranking
Common reporting thresholds:
padj < 0.05abs(log2FoldChange) >= 1
Export both the full table and a thresholded table.
4. Visualize results
At minimum:
- sample PCA
- volcano plot
- MA plot
5. Export pathway-ready artifacts
Produce a ranked gene list sorted by signed effect or Wald statistic for enrichment workflows.
Output Artifacts
results/
├── de_results.tsv
├── de_significant.tsv
└── de_ranked_genes.tsv
figures/
├── sample_pca.pdf
├── volcano.pdf
└── ma_plot.pdf
qc/
└── design_check.tsvQuality Review
- raw counts only for model fitting
- no fully confounded batch and condition
- outlier samples reviewed before publication claims
- all final tables should include
baseMean,log2FoldChange,pvalue, andpadj
Anti-Patterns
- running DE on TPM as if it were count-based
- omitting batch or pairing terms that clearly exist
- showing only thresholded genes and hiding the full table
- using p-value alone without effect size
Related Skills
- Bulk RNA Expression
- RNA Quantification
- Pathway Analysis
Optional Supplements
pydeseq2
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

