[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CYM6AYA68MNETNG6N9GS1Q":3,"skill-same:01M6CYM6AYA68MNETNG6N9GS1Q":76},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":28,"linkOnly":29,"markdownContent":30,"markdownBody":31,"frontMatter":32,"refName":36,"commitSha":37,"skillDirectory":38,"forksCount":39,"repositoryHtmlUrl":40,"repositoryHomepageUrl":41,"ownerHtmlUrl":42,"ownerBlogUrl":43,"ownerDescription":44,"updatedAt":45,"install":46,"resources":59},"01M6CYM6AYA68MNETNG6N9GS1Q","pydeseq2",null,"Differential gene expression analysis (Python DESeq2). Identify DE genes from bulk RNA-seq counts, Wald tests, FDR correction, volcano\u002FMA plots, for RNA-seq analysis.","eric861129\u002FSKILLS_All-in-one","eric861129","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F74950944?v=4","01M6CXHDYEYRPFGGV4EFXCSYCF","ChiYu-Huang","01M6CXHE2J5CN1EBTY0FKV3ZKW",52,"MIT","https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FScientific & Research Tools\u002Fpydeseq2\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[5,24,25,26,27],"python","analysis","RNA","gene expression","2026-11-10 10:12:30",false,"---\nname: pydeseq2\ndescription: Differential gene expression analysis (Python DESeq2). Identify DE genes from bulk RNA-seq counts, Wald tests, FDR correction, volcano\u002FMA plots, for RNA-seq analysis.\nlicense: MIT license\nmetadata:\n    skill-author: K-Dense Inc.\n---\n\n# PyDESeq2\n\n## Overview\n\nPyDESeq2 is a Python implementation of DESeq2 for differential expression analysis with bulk RNA-seq data. Design and execute complete workflows from data loading through result interpretation, including single-factor and multi-factor designs, Wald tests with multiple testing correction, optional apeGLM shrinkage, and integration with pandas and AnnData.\n\n## When to Use This Skill\n\nThis skill should be used when:\n- Analyzing bulk RNA-seq count data for differential expression\n- Comparing gene expression between experimental conditions (e.g., treated vs control)\n- Performing multi-factor designs accounting for batch effects or covariates\n- Converting R-based DESeq2 workflows to Python\n- Integrating differential expression analysis into Python-based pipelines\n- Users mention \"DESeq2\", \"differential expression\", \"RNA-seq analysis\", or \"PyDESeq2\"\n\n## Quick Start Workflow\n\nFor users who want to perform a standard differential expression analysis:\n\n```python\nimport pandas as pd\nfrom pydeseq2.dds import DeseqDataSet\nfrom pydeseq2.ds import DeseqStats\n\n# 1. Load data\ncounts_df = pd.read_csv(\"counts.csv\", index_col=0).T  # Transpose to samples × genes\nmetadata = pd.read_csv(\"metadata.csv\", index_col=0)\n\n# 2. Filter low-count genes\ngenes_to_keep = counts_df.columns[counts_df.sum(axis=0) >= 10]\ncounts_df = counts_df[genes_to_keep]\n\n# 3. Initialize and fit DESeq2\ndds = DeseqDataSet(\n    counts=counts_df,\n    metadata=metadata,\n    design=\"~condition\",\n    refit_cooks=True\n)\ndds.deseq2()\n\n# 4. Perform statistical testing\nds = DeseqStats(dds, contrast=[\"condition\", \"treated\", \"control\"])\nds.summary()\n\n# 5. Access results\nresults = ds.results_df\nsignificant = results[results.padj \u003C 0.05]\nprint(f\"Found {len(significant)} significant genes\")\n```\n\n## Core Workflow Steps\n\n### Step 1: Data Preparation\n\n**Input requirements:**\n- **Count matrix:** Samples × genes DataFrame with non-negative integer read counts\n- **Metadata:** Samples × variables DataFrame with experimental factors\n\n**Common data loading patterns:**\n\n```python\n# From CSV (typical format: genes × samples, needs transpose)\ncounts_df = pd.read_csv(\"counts.csv\", index_col=0).T\nmetadata = pd.read_csv(\"metadata.csv\", index_col=0)\n\n# From TSV\ncounts_df = pd.read_csv(\"counts.tsv\", sep=\"\\t\", index_col=0).T\n\n# From AnnData\nimport anndata as ad\nadata = ad.read_h5ad(\"data.h5ad\")\ncounts_df = pd.DataFrame(adata.X, index=adata.obs_names, columns=adata.var_names)\nmetadata = adata.obs\n```\n\n**Data filtering:**\n\n```python\n# Remove low-count genes\ngenes_to_keep = counts_df.columns[counts_df.sum(axis=0) >= 10]\ncounts_df = counts_df[genes_to_keep]\n\n# Remove samples with missing metadata\nsamples_to_keep = ~metadata.condition.isna()\ncounts_df = counts_df.loc[samples_to_keep]\nmetadata = metadata.loc[samples_to_keep]\n```\n\n### Step 2: Design Specification\n\nThe design formula specifies how gene expression is modeled.\n\n**Single-factor designs:**\n```python\ndesign = \"~condition\"  # Simple two-group comparison\n```\n\n**Multi-factor designs:**\n```python\ndesign = \"~batch + condition\"  # Control for batch effects\ndesign = \"~age + condition\"     # Include continuous covariate\ndesign = \"~group + condition + group:condition\"  # Interaction effects\n```\n\n**Design formula guidelines:**\n- Use Wilkinson formula notation (R-style)\n- Put adjustment variables (e.g., batch) before the main variable of interest\n- Ensure variables exist as columns in the metadata DataFrame\n- Use appropriate data types (categorical for discrete variables)\n\n### Step 3: DESeq2 Fitting\n\nInitialize the DeseqDataSet and run the complete pipeline:\n\n```python\nfrom pydeseq2.dds import DeseqDataSet\n\ndds = DeseqDataSet(\n    counts=counts_df,\n    metadata=metadata,\n    design=\"~condition\",\n    refit_cooks=True,  # Refit after removing outliers\n    n_cpus=1           # Parallel processing (adjust as needed)\n)\n\n# Run the complete DESeq2 pipeline\ndds.deseq2()\n```\n\n**What `deseq2()` does:**\n1. Computes size factors (normalization)\n2. Fits genewise dispersions\n3. Fits dispersion trend curve\n4. Computes dispersion priors\n5. Fits MAP dispersions (shrinkage)\n6. Fits log fold changes\n7. Calculates Cook's distances (outlier detection)\n8. Refits if outliers detected (optional)\n\n### Step 4: Statistical Testing\n\nPerform Wald tests to identify differentially expressed genes:\n\n```python\nfrom pydeseq2.ds import DeseqStats\n\nds = DeseqStats(\n    dds,\n    contrast=[\"condition\", \"treated\", \"control\"],  # Test treated vs control\n    alpha=0.05,                # Significance threshold\n    cooks_filter=True,         # Filter outliers\n    independent_filter=True    # Filter low-power tests\n)\n\nds.summary()\n```\n\n**Contrast specification:**\n- Format: `[variable, test_level, reference_level]`\n- Example: `[\"condition\", \"treated\", \"control\"]` tests treated vs control\n- If `None`, uses the last coefficient in the design\n\n**Result DataFrame columns:**\n- `baseMean`: Mean normalized count across samples\n- `log2FoldChange`: Log2 fold change between conditions\n- `lfcSE`: Standard error of LFC\n- `stat`: Wald test statistic\n- `pvalue`: Raw p-value\n- `padj`: Adjusted p-value (FDR-corrected via Benjamini-Hochberg)\n\n### Step 5: Optional LFC Shrinkage\n\nApply shrinkage to reduce noise in fold change estimates:\n\n```python\nds.lfc_shrink()  # Applies apeGLM shrinkage\n```\n\n**When to use LFC shrinkage:**\n- For visualization (volcano plots, heatmaps)\n- For ranking genes by effect size\n- When prioritizing genes for follow-up experiments\n\n**Important:** Shrinkage affects only the log2FoldChange values, not the statistical test results (p-values remain unchanged). Use shrunk values for visualization but report unshrunken p-values for significance.\n\n### Step 6: Result Export\n\nSave results and intermediate objects:\n\n```python\nimport pickle\n\n# Export results as CSV\nds.results_df.to_csv(\"deseq2_results.csv\")\n\n# Save significant genes only\nsignificant = ds.results_df[ds.results_df.padj \u003C 0.05]\nsignificant.to_csv(\"significant_genes.csv\")\n\n# Save DeseqDataSet for later use\nwith open(\"dds_result.pkl\", \"wb\") as f:\n    pickle.dump(dds.to_picklable_anndata(), f)\n```\n\n## Common Analysis Patterns\n\n### Two-Group Comparison\n\nStandard case-control comparison:\n\n```python\ndds = DeseqDataSet(counts=counts_df, metadata=metadata, design=\"~condition\")\ndds.deseq2()\n\nds = DeseqStats(dds, contrast=[\"condition\", \"treated\", \"control\"])\nds.summary()\n\nresults = ds.results_df\nsignificant = results[results.padj \u003C 0.05]\n```\n\n### Multiple Comparisons\n\nTesting multiple treatment groups against control:\n\n```python\ndds = DeseqDataSet(counts=counts_df, metadata=metadata, design=\"~condition\")\ndds.deseq2()\n\ntreatments = [\"treatment_A\", \"treatment_B\", \"treatment_C\"]\nall_results = {}\n\nfor treatment in treatments:\n    ds = DeseqStats(dds, contrast=[\"condition\", treatment, \"control\"])\n    ds.summary()\n    all_results[treatment] = ds.results_df\n\n    sig_count = len(ds.results_df[ds.results_df.padj \u003C 0.05])\n    print(f\"{treatment}: {sig_count} significant genes\")\n```\n\n### Accounting for Batch Effects\n\nControl for technical variation:\n\n```python\n# Include batch in design\ndds = DeseqDataSet(counts=counts_df, metadata=metadata, design=\"~batch + condition\")\ndds.deseq2()\n\n# Test condition while controlling for batch\nds = DeseqStats(dds, contrast=[\"condition\", \"treated\", \"control\"])\nds.summary()\n```\n\n### Continuous Covariates\n\nInclude continuous variables like age or dosage:\n\n```python\n# Ensure continuous variable is numeric\nmetadata[\"age\"] = pd.to_numeric(metadata[\"age\"])\n\ndds = DeseqDataSet(counts=counts_df, metadata=metadata, design=\"~age + condition\")\ndds.deseq2()\n\nds = DeseqStats(dds, contrast=[\"condition\", \"treated\", \"control\"])\nds.summary()\n```\n\n## Using the Analysis Script\n\nThis skill includes a complete command-line script for standard analyses:\n\n```bash\n# Basic usage\npython scripts\u002Frun_deseq2_analysis.py \\\n  --counts counts.csv \\\n  --metadata metadata.csv \\\n  --design \"~condition\" \\\n  --contrast condition treated control \\\n  --output results\u002F\n\n# With additional options\npython scripts\u002Frun_deseq2_analysis.py \\\n  --counts counts.csv \\\n  --metadata metadata.csv \\\n  --design \"~batch + condition\" \\\n  --contrast condition treated control \\\n  --output results\u002F \\\n  --min-counts 10 \\\n  --alpha 0.05 \\\n  --n-cpus 4 \\\n  --plots\n```\n\n**Script features:**\n- Automatic data loading and validation\n- Gene and sample filtering\n- Complete DESeq2 pipeline execution\n- Statistical testing with customizable parameters\n- Result export (CSV, pickle)\n- Optional visualization (volcano and MA plots)\n\nRefer users to `scripts\u002Frun_deseq2_analysis.py` when they need a standalone analysis tool or want to batch process multiple datasets.\n\n## Result Interpretation\n\n### Identifying Significant Genes\n\n```python\n# Filter by adjusted p-value\nsignificant = ds.results_df[ds.results_df.padj \u003C 0.05]\n\n# Filter by both significance and effect size\nsig_and_large = ds.results_df[\n    (ds.results_df.padj \u003C 0.05) &\n    (abs(ds.results_df.log2FoldChange) > 1)\n]\n\n# Separate up- and down-regulated\nupregulated = significant[significant.log2FoldChange > 0]\ndownregulated = significant[significant.log2FoldChange \u003C 0]\n\nprint(f\"Upregulated: {len(upregulated)}\")\nprint(f\"Downregulated: {len(downregulated)}\")\n```\n\n### Ranking and Sorting\n\n```python\n# Sort by adjusted p-value\ntop_by_padj = ds.results_df.sort_values(\"padj\").head(20)\n\n# Sort by absolute fold change (use shrunk values)\nds.lfc_shrink()\nds.results_df[\"abs_lfc\"] = abs(ds.results_df.log2FoldChange)\ntop_by_lfc = ds.results_df.sort_values(\"abs_lfc\", ascending=False).head(20)\n\n# Sort by a combined metric\nds.results_df[\"score\"] = -np.log10(ds.results_df.padj) * abs(ds.results_df.log2FoldChange)\ntop_combined = ds.results_df.sort_values(\"score\", ascending=False).head(20)\n```\n\n### Quality Metrics\n\n```python\n# Check normalization (size factors should be close to 1)\nprint(\"Size factors:\", dds.obsm[\"size_factors\"])\n\n# Examine dispersion estimates\nimport matplotlib.pyplot as plt\nplt.hist(dds.varm[\"dispersions\"], bins=50)\nplt.xlabel(\"Dispersion\")\nplt.ylabel(\"Frequency\")\nplt.title(\"Dispersion Distribution\")\nplt.show()\n\n# Check p-value distribution (should be mostly flat with peak near 0)\nplt.hist(ds.results_df.pvalue.dropna(), bins=50)\nplt.xlabel(\"P-value\")\nplt.ylabel(\"Frequency\")\nplt.title(\"P-value Distribution\")\nplt.show()\n```\n\n## Visualization Guidelines\n\n### Volcano Plot\n\nVisualize significance vs effect size:\n\n```python\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nresults = ds.results_df.copy()\nresults[\"-log10(padj)\"] = -np.log10(results.padj)\n\nplt.figure(figsize=(10, 6))\nsignificant = results.padj \u003C 0.05\n\nplt.scatter(\n    results.loc[~significant, \"log2FoldChange\"],\n    results.loc[~significant, \"-log10(padj)\"],\n    alpha=0.3, s=10, c='gray', label='Not significant'\n)\nplt.scatter(\n    results.loc[significant, \"log2FoldChange\"],\n    results.loc[significant, \"-log10(padj)\"],\n    alpha=0.6, s=10, c='red', label='padj \u003C 0.05'\n)\n\nplt.axhline(-np.log10(0.05), color='blue', linestyle='--', alpha=0.5)\nplt.xlabel(\"Log2 Fold Change\")\nplt.ylabel(\"-Log10(Adjusted P-value)\")\nplt.title(\"Volcano Plot\")\nplt.legend()\nplt.savefig(\"volcano_plot.png\", dpi=300)\n```\n\n### MA Plot\n\nShow fold change vs mean expression:\n\n```python\nplt.figure(figsize=(10, 6))\n\nplt.scatter(\n    np.log10(results.loc[~significant, \"baseMean\"] + 1),\n    results.loc[~significant, \"log2FoldChange\"],\n    alpha=0.3, s=10, c='gray'\n)\nplt.scatter(\n    np.log10(results.loc[significant, \"baseMean\"] + 1),\n    results.loc[significant, \"log2FoldChange\"],\n    alpha=0.6, s=10, c='red'\n)\n\nplt.axhline(0, color='blue', linestyle='--', alpha=0.5)\nplt.xlabel(\"Log10(Base Mean + 1)\")\nplt.ylabel(\"Log2 Fold Change\")\nplt.title(\"MA Plot\")\nplt.savefig(\"ma_plot.png\", dpi=300)\n```\n\n## Troubleshooting Common Issues\n\n### Data Format Problems\n\n**Issue:** \"Index mismatch between counts and metadata\"\n\n**Solution:** Ensure sample names match exactly\n```python\nprint(\"Counts samples:\", counts_df.index.tolist())\nprint(\"Metadata samples:\", metadata.index.tolist())\n\n# Take intersection if needed\ncommon = counts_df.index.intersection(metadata.index)\ncounts_df = counts_df.loc[common]\nmetadata = metadata.loc[common]\n```\n\n**Issue:** \"All genes have zero counts\"\n\n**Solution:** Check if data needs transposition\n```python\nprint(f\"Counts shape: {counts_df.shape}\")\n# If genes > samples, transpose is needed\nif counts_df.shape[1] \u003C counts_df.shape[0]:\n    counts_df = counts_df.T\n```\n\n### Design Matrix Issues\n\n**Issue:** \"Design matrix is not full rank\"\n\n**Cause:** Confounded variables (e.g., all treated samples in one batch)\n\n**Solution:** Remove confounded variable or add interaction term\n```python\n# Check confounding\nprint(pd.crosstab(metadata.condition, metadata.batch))\n\n# Either simplify design or add interaction\ndesign = \"~condition\"  # Remove batch\n# OR\ndesign = \"~condition + batch + condition:batch\"  # Model interaction\n```\n\n### No Significant Genes\n\n**Diagnostics:**\n```python\n# Check dispersion distribution\nplt.hist(dds.varm[\"dispersions\"], bins=50)\nplt.show()\n\n# Check size factors\nprint(dds.obsm[\"size_factors\"])\n\n# Look at top genes by raw p-value\nprint(ds.results_df.nsmallest(20, \"pvalue\"))\n```\n\n**Possible causes:**\n- Small effect sizes\n- High biological variability\n- Insufficient sample size\n- Technical issues (batch effects, outliers)\n\n## Reference Documentation\n\nFor comprehensive details beyond this workflow-oriented guide:\n\n- **API Reference** (`references\u002Fapi_reference.md`): Complete documentation of PyDESeq2 classes, methods, and data structures. Use when needing detailed parameter information or understanding object attributes.\n\n- **Workflow Guide** (`references\u002Fworkflow_guide.md`): In-depth guide covering complete analysis workflows, data loading patterns, multi-factor designs, troubleshooting, and best practices. Use when handling complex experimental designs or encountering issues.\n\nLoad these references into context when users need:\n- Detailed API documentation: `Read references\u002Fapi_reference.md`\n- Comprehensive workflow examples: `Read references\u002Fworkflow_guide.md`\n- Troubleshooting guidance: `Read references\u002Fworkflow_guide.md` (see Troubleshooting section)\n\n## Key Reminders\n\n1. **Data orientation matters:** Count matrices typically load as genes × samples but need to be samples × genes. Always transpose with `.T` if needed.\n\n2. **Sample filtering:** Remove samples with missing metadata before analysis to avoid errors.\n\n3. **Gene filtering:** Filter low-count genes (e.g., \u003C 10 total reads) to improve power and reduce computational time.\n\n4. **Design formula order:** Put adjustment variables before the variable of interest (e.g., `\"~batch + condition\"` not `\"~condition + batch\"`).\n\n5. **LFC shrinkage timing:** Apply shrinkage after statistical testing and only for visualization\u002Franking purposes. P-values remain based on unshrunken estimates.\n\n6. **Result interpretation:** Use `padj \u003C 0.05` for significance, not raw p-values. The Benjamini-Hochberg procedure controls false discovery rate.\n\n7. **Contrast specification:** The format is `[variable, test_level, reference_level]` where test_level is compared against reference_level.\n\n8. **Save intermediate objects:** Use pickle to save DeseqDataSet objects for later use or additional analyses without re-running the expensive fitting step.\n\n## Installation and Requirements\n\n```bash\nuv pip install pydeseq2\n```\n\n**System requirements:**\n- Python 3.10-3.11\n- pandas 1.4.3+\n- numpy 1.23.0+\n- scipy 1.11.0+\n- scikit-learn 1.1.1+\n- anndata 0.8.0+\n\n**Optional for visualization:**\n- matplotlib\n- seaborn\n\n## Additional Resources\n\n- **Official Documentation:** https:\u002F\u002Fpydeseq2.readthedocs.io\n- **GitHub Repository:** https:\u002F\u002Fgithub.com\u002Fowkin\u002FPyDESeq2\n- **Publication:** Muzellec et al. (2023) Bioinformatics, DOI: 10.1093\u002Fbioinformatics\u002Fbtad547\n- **Original DESeq2 (R):** Love et al. (2014) Genome Biology, DOI: 10.1186\u002Fs13059-014-0550-8\n\n","# PyDESeq2\n\n## Overview\n\nPyDESeq2 is a Python implementation of DESeq2 for differential expression analysis with bulk RNA-seq data. Design and execute complete workflows from data loading through result interpretation, including single-factor and multi-factor designs, Wald tests with multiple testing correction, optional apeGLM shrinkage, and integration with pandas and AnnData.\n\n## When to Use This Skill\n\nThis skill should be used when:\n- Analyzing bulk RNA-seq count data for differential expression\n- Comparing gene expression between experimental conditions (e.g., treated vs control)\n- Performing multi-factor designs accounting for batch effects or covariates\n- Converting R-based DESeq2 workflows to Python\n- Integrating differential expression analysis into Python-based pipelines\n- Users mention \"DESeq2\", \"differential expression\", \"RNA-seq analysis\", or \"PyDESeq2\"\n\n## Quick Start Workflow\n\nFor users who want to perform a standard differential expression analysis:\n\n```python\nimport pandas as pd\nfrom pydeseq2.dds import DeseqDataSet\nfrom pydeseq2.ds import DeseqStats\n\n# 1. Load data\ncounts_df = pd.read_csv(\"counts.csv\", index_col=0).T  # Transpose to samples × genes\nmetadata = pd.read_csv(\"metadata.csv\", index_col=0)\n\n# 2. Filter low-count genes\ngenes_to_keep = counts_df.columns[counts_df.sum(axis=0) >= 10]\ncounts_df = counts_df[genes_to_keep]\n\n# 3. Initialize and fit DESeq2\ndds = DeseqDataSet(\n    counts=counts_df,\n    metadata=metadata,\n    design=\"~condition\",\n    refit_cooks=True\n)\ndds.deseq2()\n\n# 4. Perform statistical testing\nds = DeseqStats(dds, contrast=[\"condition\", \"treated\", \"control\"])\nds.summary()\n\n# 5. Access results\nresults = ds.results_df\nsignificant = results[results.padj \u003C 0.05]\nprint(f\"Found {len(significant)} significant genes\")\n```\n\n## Core Workflow Steps\n\n### Step 1: Data Preparation\n\n**Input requirements:**\n- **Count matrix:** Samples × genes DataFrame with non-negative integer read counts\n- **Metadata:** Samples × variables DataFrame with experimental factors\n\n**Common data loading patterns:**\n\n```python\n# From CSV (typical format: genes × samples, needs transpose)\ncounts_df = pd.read_csv(\"counts.csv\", index_col=0).T\nmetadata = pd.read_csv(\"metadata.csv\", index_col=0)\n\n# From TSV\ncounts_df = pd.read_csv(\"counts.tsv\", sep=\"\\t\", index_col=0).T\n\n# From AnnData\nimport anndata as ad\nadata = ad.read_h5ad(\"data.h5ad\")\ncounts_df = pd.DataFrame(adata.X, index=adata.obs_names, columns=adata.var_names)\nmetadata = adata.obs\n```\n\n**Data filtering:**\n\n```python\n# Remove low-count genes\ngenes_to_keep = counts_df.columns[counts_df.sum(axis=0) >= 10]\ncounts_df = counts_df[genes_to_keep]\n\n# Remove samples with missing metadata\nsamples_to_keep = ~metadata.condition.isna()\ncounts_df = counts_df.loc[samples_to_keep]\nmetadata = metadata.loc[samples_to_keep]\n```\n\n### Step 2: Design Specification\n\nThe design formula specifies how gene expression is modeled.\n\n**Single-factor designs:**\n```python\ndesign = \"~condition\"  # Simple two-group comparison\n```\n\n**Multi-factor designs:**\n```python\ndesign = \"~batch + condition\"  # Control for batch effects\ndesign = \"~age + condition\"     # Include continuous covariate\ndesign = \"~group + condition + group:condition\"  # Interaction effects\n```\n\n**Design formula guidelines:**\n- Use Wilkinson formula notation (R-style)\n- Put adjustment variables (e.g., batch) before the main variable of interest\n- Ensure variables exist as columns in the metadata DataFrame\n- Use appropriate data types (categorical for discrete variables)\n\n### Step 3: DESeq2 Fitting\n\nInitialize the DeseqDataSet and run the complete pipeline:\n\n```python\nfrom pydeseq2.dds import DeseqDataSet\n\ndds = DeseqDataSet(\n    counts=counts_df,\n    metadata=metadata,\n    design=\"~condition\",\n    refit_cooks=True,  # Refit after removing outliers\n    n_cpus=1           # Parallel processing (adjust as needed)\n)\n\n# Run the complete DESeq2 pipeline\ndds.deseq2()\n```\n\n**What `deseq2()` does:**\n1. Computes size factors (normalization)\n2. Fits genewise dispersions\n3. Fits dispersion trend curve\n4. Computes dispersion priors\n5. Fits MAP dispersions (shrinkage)\n6. Fits log fold changes\n7. Calculates Cook's distances (outlier detection)\n8. Refits if outliers detected (optional)\n\n### Step 4: Statistical Testing\n\nPerform Wald tests to identify differentially expressed genes:\n\n```python\nfrom pydeseq2.ds import DeseqStats\n\nds = DeseqStats(\n    dds,\n    contrast=[\"condition\", \"treated\", \"control\"],  # Test treated vs control\n    alpha=0.05,                # Significance threshold\n    cooks_filter=True,         # Filter outliers\n    independent_filter=True    # Filter low-power tests\n)\n\nds.summary()\n```\n\n**Contrast specification:**\n- Format: `[variable, test_level, reference_level]`\n- Example: `[\"condition\", \"treated\", \"control\"]` tests treated vs control\n- If `None`, uses the last coefficient in the design\n\n**Result DataFrame columns:**\n- `baseMean`: Mean normalized count across samples\n- `log2FoldChange`: Log2 fold change between conditions\n- `lfcSE`: Standard error of LFC\n- `stat`: Wald test statistic\n- `pvalue`: Raw p-value\n- `padj`: Adjusted p-value (FDR-corrected via Benjamini-Hochberg)\n\n### Step 5: Optional LFC Shrinkage\n\nApply shrinkage to reduce noise in fold change estimates:\n\n```python\nds.lfc_shrink()  # Applies apeGLM shrinkage\n```\n\n**When to use LFC shrinkage:**\n- For visualization (volcano plots, heatmaps)\n- For ranking genes by effect size\n- When prioritizing genes for follow-up experiments\n\n**Important:** Shrinkage affects only the log2FoldChange values, not the statistical test results (p-values remain unchanged). Use shrunk values for visualization but report unshrunken p-values for significance.\n\n### Step 6: Result Export\n\nSave results and intermediate objects:\n\n```python\nimport pickle\n\n# Export results as CSV\nds.results_df.to_csv(\"deseq2_results.csv\")\n\n# Save significant genes only\nsignificant = ds.results_df[ds.results_df.padj \u003C 0.05]\nsignificant.to_csv(\"significant_genes.csv\")\n\n# Save DeseqDataSet for later use\nwith open(\"dds_result.pkl\", \"wb\") as f:\n    pickle.dump(dds.to_picklable_anndata(), f)\n```\n\n## Common Analysis Patterns\n\n### Two-Group Comparison\n\nStandard case-control comparison:\n\n```python\ndds = DeseqDataSet(counts=counts_df, metadata=metadata, design=\"~condition\")\ndds.deseq2()\n\nds = DeseqStats(dds, contrast=[\"condition\", \"treated\", \"control\"])\nds.summary()\n\nresults = ds.results_df\nsignificant = results[results.padj \u003C 0.05]\n```\n\n### Multiple Comparisons\n\nTesting multiple treatment groups against control:\n\n```python\ndds = DeseqDataSet(counts=counts_df, metadata=metadata, design=\"~condition\")\ndds.deseq2()\n\ntreatments = [\"treatment_A\", \"treatment_B\", \"treatment_C\"]\nall_results = {}\n\nfor treatment in treatments:\n    ds = DeseqStats(dds, contrast=[\"condition\", treatment, \"control\"])\n    ds.summary()\n    all_results[treatment] = ds.results_df\n\n    sig_count = len(ds.results_df[ds.results_df.padj \u003C 0.05])\n    print(f\"{treatment}: {sig_count} significant genes\")\n```\n\n### Accounting for Batch Effects\n\nControl for technical variation:\n\n```python\n# Include batch in design\ndds = DeseqDataSet(counts=counts_df, metadata=metadata, design=\"~batch + condition\")\ndds.deseq2()\n\n# Test condition while controlling for batch\nds = DeseqStats(dds, contrast=[\"condition\", \"treated\", \"control\"])\nds.summary()\n```\n\n### Continuous Covariates\n\nInclude continuous variables like age or dosage:\n\n```python\n# Ensure continuous variable is numeric\nmetadata[\"age\"] = pd.to_numeric(metadata[\"age\"])\n\ndds = DeseqDataSet(counts=counts_df, metadata=metadata, design=\"~age + condition\")\ndds.deseq2()\n\nds = DeseqStats(dds, contrast=[\"condition\", \"treated\", \"control\"])\nds.summary()\n```\n\n## Using the Analysis Script\n\nThis skill includes a complete command-line script for standard analyses:\n\n```bash\n# Basic usage\npython scripts\u002Frun_deseq2_analysis.py \\\n  --counts counts.csv \\\n  --metadata metadata.csv \\\n  --design \"~condition\" \\\n  --contrast condition treated control \\\n  --output results\u002F\n\n# With additional options\npython scripts\u002Frun_deseq2_analysis.py \\\n  --counts counts.csv \\\n  --metadata metadata.csv \\\n  --design \"~batch + condition\" \\\n  --contrast condition treated control \\\n  --output results\u002F \\\n  --min-counts 10 \\\n  --alpha 0.05 \\\n  --n-cpus 4 \\\n  --plots\n```\n\n**Script features:**\n- Automatic data loading and validation\n- Gene and sample filtering\n- Complete DESeq2 pipeline execution\n- Statistical testing with customizable parameters\n- Result export (CSV, pickle)\n- Optional visualization (volcano and MA plots)\n\nRefer users to `scripts\u002Frun_deseq2_analysis.py` when they need a standalone analysis tool or want to batch process multiple datasets.\n\n## Result Interpretation\n\n### Identifying Significant Genes\n\n```python\n# Filter by adjusted p-value\nsignificant = ds.results_df[ds.results_df.padj \u003C 0.05]\n\n# Filter by both significance and effect size\nsig_and_large = ds.results_df[\n    (ds.results_df.padj \u003C 0.05) &\n    (abs(ds.results_df.log2FoldChange) > 1)\n]\n\n# Separate up- and down-regulated\nupregulated = significant[significant.log2FoldChange > 0]\ndownregulated = significant[significant.log2FoldChange \u003C 0]\n\nprint(f\"Upregulated: {len(upregulated)}\")\nprint(f\"Downregulated: {len(downregulated)}\")\n```\n\n### Ranking and Sorting\n\n```python\n# Sort by adjusted p-value\ntop_by_padj = ds.results_df.sort_values(\"padj\").head(20)\n\n# Sort by absolute fold change (use shrunk values)\nds.lfc_shrink()\nds.results_df[\"abs_lfc\"] = abs(ds.results_df.log2FoldChange)\ntop_by_lfc = ds.results_df.sort_values(\"abs_lfc\", ascending=False).head(20)\n\n# Sort by a combined metric\nds.results_df[\"score\"] = -np.log10(ds.results_df.padj) * abs(ds.results_df.log2FoldChange)\ntop_combined = ds.results_df.sort_values(\"score\", ascending=False).head(20)\n```\n\n### Quality Metrics\n\n```python\n# Check normalization (size factors should be close to 1)\nprint(\"Size factors:\", dds.obsm[\"size_factors\"])\n\n# Examine dispersion estimates\nimport matplotlib.pyplot as plt\nplt.hist(dds.varm[\"dispersions\"], bins=50)\nplt.xlabel(\"Dispersion\")\nplt.ylabel(\"Frequency\")\nplt.title(\"Dispersion Distribution\")\nplt.show()\n\n# Check p-value distribution (should be mostly flat with peak near 0)\nplt.hist(ds.results_df.pvalue.dropna(), bins=50)\nplt.xlabel(\"P-value\")\nplt.ylabel(\"Frequency\")\nplt.title(\"P-value Distribution\")\nplt.show()\n```\n\n## Visualization Guidelines\n\n### Volcano Plot\n\nVisualize significance vs effect size:\n\n```python\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nresults = ds.results_df.copy()\nresults[\"-log10(padj)\"] = -np.log10(results.padj)\n\nplt.figure(figsize=(10, 6))\nsignificant = results.padj \u003C 0.05\n\nplt.scatter(\n    results.loc[~significant, \"log2FoldChange\"],\n    results.loc[~significant, \"-log10(padj)\"],\n    alpha=0.3, s=10, c='gray', label='Not significant'\n)\nplt.scatter(\n    results.loc[significant, \"log2FoldChange\"],\n    results.loc[significant, \"-log10(padj)\"],\n    alpha=0.6, s=10, c='red', label='padj \u003C 0.05'\n)\n\nplt.axhline(-np.log10(0.05), color='blue', linestyle='--', alpha=0.5)\nplt.xlabel(\"Log2 Fold Change\")\nplt.ylabel(\"-Log10(Adjusted P-value)\")\nplt.title(\"Volcano Plot\")\nplt.legend()\nplt.savefig(\"volcano_plot.png\", dpi=300)\n```\n\n### MA Plot\n\nShow fold change vs mean expression:\n\n```python\nplt.figure(figsize=(10, 6))\n\nplt.scatter(\n    np.log10(results.loc[~significant, \"baseMean\"] + 1),\n    results.loc[~significant, \"log2FoldChange\"],\n    alpha=0.3, s=10, c='gray'\n)\nplt.scatter(\n    np.log10(results.loc[significant, \"baseMean\"] + 1),\n    results.loc[significant, \"log2FoldChange\"],\n    alpha=0.6, s=10, c='red'\n)\n\nplt.axhline(0, color='blue', linestyle='--', alpha=0.5)\nplt.xlabel(\"Log10(Base Mean + 1)\")\nplt.ylabel(\"Log2 Fold Change\")\nplt.title(\"MA Plot\")\nplt.savefig(\"ma_plot.png\", dpi=300)\n```\n\n## Troubleshooting Common Issues\n\n### Data Format Problems\n\n**Issue:** \"Index mismatch between counts and metadata\"\n\n**Solution:** Ensure sample names match exactly\n```python\nprint(\"Counts samples:\", counts_df.index.tolist())\nprint(\"Metadata samples:\", metadata.index.tolist())\n\n# Take intersection if needed\ncommon = counts_df.index.intersection(metadata.index)\ncounts_df = counts_df.loc[common]\nmetadata = metadata.loc[common]\n```\n\n**Issue:** \"All genes have zero counts\"\n\n**Solution:** Check if data needs transposition\n```python\nprint(f\"Counts shape: {counts_df.shape}\")\n# If genes > samples, transpose is needed\nif counts_df.shape[1] \u003C counts_df.shape[0]:\n    counts_df = counts_df.T\n```\n\n### Design Matrix Issues\n\n**Issue:** \"Design matrix is not full rank\"\n\n**Cause:** Confounded variables (e.g., all treated samples in one batch)\n\n**Solution:** Remove confounded variable or add interaction term\n```python\n# Check confounding\nprint(pd.crosstab(metadata.condition, metadata.batch))\n\n# Either simplify design or add interaction\ndesign = \"~condition\"  # Remove batch\n# OR\ndesign = \"~condition + batch + condition:batch\"  # Model interaction\n```\n\n### No Significant Genes\n\n**Diagnostics:**\n```python\n# Check dispersion distribution\nplt.hist(dds.varm[\"dispersions\"], bins=50)\nplt.show()\n\n# Check size factors\nprint(dds.obsm[\"size_factors\"])\n\n# Look at top genes by raw p-value\nprint(ds.results_df.nsmallest(20, \"pvalue\"))\n```\n\n**Possible causes:**\n- Small effect sizes\n- High biological variability\n- Insufficient sample size\n- Technical issues (batch effects, outliers)\n\n## Reference Documentation\n\nFor comprehensive details beyond this workflow-oriented guide:\n\n- **API Reference** (`references\u002Fapi_reference.md`): Complete documentation of PyDESeq2 classes, methods, and data structures. Use when needing detailed parameter information or understanding object attributes.\n\n- **Workflow Guide** (`references\u002Fworkflow_guide.md`): In-depth guide covering complete analysis workflows, data loading patterns, multi-factor designs, troubleshooting, and best practices. Use when handling complex experimental designs or encountering issues.\n\nLoad these references into context when users need:\n- Detailed API documentation: `Read references\u002Fapi_reference.md`\n- Comprehensive workflow examples: `Read references\u002Fworkflow_guide.md`\n- Troubleshooting guidance: `Read references\u002Fworkflow_guide.md` (see Troubleshooting section)\n\n## Key Reminders\n\n1. **Data orientation matters:** Count matrices typically load as genes × samples but need to be samples × genes. Always transpose with `.T` if needed.\n\n2. **Sample filtering:** Remove samples with missing metadata before analysis to avoid errors.\n\n3. **Gene filtering:** Filter low-count genes (e.g., \u003C 10 total reads) to improve power and reduce computational time.\n\n4. **Design formula order:** Put adjustment variables before the variable of interest (e.g., `\"~batch + condition\"` not `\"~condition + batch\"`).\n\n5. **LFC shrinkage timing:** Apply shrinkage after statistical testing and only for visualization\u002Franking purposes. P-values remain based on unshrunken estimates.\n\n6. **Result interpretation:** Use `padj \u003C 0.05` for significance, not raw p-values. The Benjamini-Hochberg procedure controls false discovery rate.\n\n7. **Contrast specification:** The format is `[variable, test_level, reference_level]` where test_level is compared against reference_level.\n\n8. **Save intermediate objects:** Use pickle to save DeseqDataSet objects for later use or additional analyses without re-running the expensive fitting step.\n\n## Installation and Requirements\n\n```bash\nuv pip install pydeseq2\n```\n\n**System requirements:**\n- Python 3.10-3.11\n- pandas 1.4.3+\n- numpy 1.23.0+\n- scipy 1.11.0+\n- scikit-learn 1.1.1+\n- anndata 0.8.0+\n\n**Optional for visualization:**\n- matplotlib\n- seaborn\n\n## Additional Resources\n\n- **Official Documentation:** https:\u002F\u002Fpydeseq2.readthedocs.io\n- **GitHub Repository:** https:\u002F\u002Fgithub.com\u002Fowkin\u002FPyDESeq2\n- **Publication:** Muzellec et al. (2023) Bioinformatics, DOI: 10.1093\u002Fbioinformatics\u002Fbtad547\n- **Original DESeq2 (R):** Love et al. (2014) Genome Biology, DOI: 10.1186\u002Fs13059-014-0550-8\n\n",{"name":5,"license":33,"metadata":34,"description":7},"MIT license",{"skill-author":35},"K-Dense Inc.","main","cbdd44aae21131521c09e42762e36178c790eacf","public\u002FSKILLS\u002FScientific & Research Tools\u002Fpydeseq2",13,"https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one","http:\u002F\u002Fhuangchiyu.com\u002FSKILLS_All-in-one\u002F","https:\u002F\u002Fgithub.com\u002Feric861129","https:\u002F\u002Fhuangchiyu.com\u002FChiYu-Blog\u002F","開發工程師，專注於 C#／.NET 系統現代化、AI-assisted engineering、開源工具與技術寫作。","2026-04-16 14:28:14",{"source":8,"skillName":5,"commands":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add eric861129\u002FSKILLS_All-in-one --skill pydeseq2",{"tool":52,"command":53},"bunx","bunx skills add eric861129\u002FSKILLS_All-in-one --skill pydeseq2",{"tool":55,"command":56},"pnpm","pnpm dlx skills add eric861129\u002FSKILLS_All-in-one --skill pydeseq2","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FScientific & Research Tools\u002Fpydeseq2\u002FSKILL.md",true,[60,66,70],{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},"references\u002Fapi_reference.md","REFERENCE","参考文档",7162,"https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FScientific & Research Tools\u002Fpydeseq2\u002Freferences\u002Fapi_reference.md",{"path":67,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":68,"sourceHtmlUrl":69},"references\u002Fworkflow_guide.md",13026,"https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FScientific & Research Tools\u002Fpydeseq2\u002Freferences\u002Fworkflow_guide.md",{"path":71,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":75},"scripts\u002Frun_deseq2_analysis.py","SCRIPT","脚本",11887,"https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FScientific & Research Tools\u002Fpydeseq2\u002Fscripts\u002Frun_deseq2_analysis.py",[77,104,137,165,190,210],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":84,"publishedAt":28},"01M6CZ1WR3KNVTKSWH4GNWT646","what-if-oracle","Run structured What-If scenario analysis with multi-branch possibility exploration. Use this skill when the user asks speculative questions like \"what if...\", \"what would happen if...\", \"what are the possibilities\", \"explore scenarios\", \"scenario analysis\", \"possibility space\", \"what could go wrong\", \"best case \u002F worst case\", \"risk analysis\", \"contingency planning\", \"strategic options\", or any question about uncertain futures. Also trigger when the user faces a fork-in-the-road decision, wants to stress-test an idea, or needs to think through consequences before committing.","https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FWriting & Research\u002Fwhat-if-oracle\u002FSKILL.md",[83],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[85,86,87,88,89,90,91,92,25,93,94,95,96,97,98,99,100,101,102,103],"oracle","what if oracle","go","run","planning","ux","futures","risk","explore","decision","branch","question","read","write","idea","exploration","options","stress-test","strategies",{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":122,"publishedAt":28},"01M6CZ1QHGJE91A95MSN5EK5Q9","venue-templates","Access comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.","https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FWriting & Research\u002Fvenue-templates\u002FSKILL.md",[110,113,116,117],{"categoryNo":111,"categoryName":112,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":114,"categoryName":115,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000021","资料检索与研究",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":118,"categoryName":119,"taxonomyType":120,"taxonomyTypeDesc":121},"01JBSEEDCAT000000000000036","内容创作者","PROFESSION","适用职业",[123,124,125,126,127,128,129,130,131,132,97,98,133,134,135,136],"templates","venue templates","research","guidelines","NeurIPS","ICML","LaTeX","science","Bash","access","edit","proposals","Academic","requirements",{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":147,"publishedAt":28},"01M6CZ1KBQD2E5RTFB3BGVX7CD","the-fool","Use when challenging ideas, plans, decisions, or proposals using structured critical reasoning. Invoke to play devil's advocate, run a pre-mortem, red team, or audit evidence and assumptions.","https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FWriting & Research\u002Fthe-fool\u002FSKILL.md",[143,144],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":145,"categoryName":146,"taxonomyType":120,"taxonomyTypeDesc":121},"01JBSEEDCAT000000000000030","开发工程师",[148,149,87,150,151,88,152,153,154,155,156,157,158,159,134,160,161,162,163,164],"the fool","review","workflow","architecture","code","audit","forge","devil","team","designer","reviewer","challenge","stress test","evidence","expert","poke","ideas",{"skillNo":166,"name":167,"nameZh":6,"description":168,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":169,"categories":170,"keywords":174,"publishedAt":28},"01M6CZ1ES826S7P1X3333E40TA","scientific-writing","Core skill for the deep research and writing tool. Write scientific manuscripts in full paragraphs (never bullet points). Use two-stage process with (1) section outlines with key points using research-lookup then (2) convert to flowing prose. IMRAD structure, citations (APA\u002FAMA\u002FVancouver), figures\u002Ftables, reporting guidelines (CONSORT\u002FSTROBE\u002FPRISMA), for research papers and journal submissions.","https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FWriting & Research\u002Fscientific-writing\u002FSKILL.md",[171,172,173],{"categoryNo":111,"categoryName":112,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":118,"categoryName":119,"taxonomyType":120,"taxonomyTypeDesc":121},[175,176,126,177,178,179,180,181,131,182,97,98,133,183,184,185,186,187,188,189],"writing","scientific writing","core","reporting","deep research","Citations","Outlines","tool","use","never","structure","deep","full","stage","prisma",{"skillNo":191,"name":192,"nameZh":6,"description":193,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":194,"categories":195,"keywords":197,"publishedAt":28},"01M6CZ1B2JGJTB9FRD0TW4RXXE","scientific-brainstorming","Creative research ideation and exploration. Use for open-ended brainstorming sessions, exploring interdisciplinary connections, challenging assumptions, or identifying research gaps. Best for early-stage research planning when you do not have specific observations yet. For formulating testable hypotheses from data use hypothesis-generation.","https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FWriting & Research\u002Fscientific-brainstorming\u002FSKILL.md",[196],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[198,199,125,200,89,201,202,203,183,204,205,206,100,207,208,188,209],"brainstorming","scientific brainstorming","sessions","data","hypothesis","open","ideation","creative","do","connections","research ideation","generation",{"skillNo":211,"name":212,"nameZh":6,"description":213,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":214,"categories":215,"keywords":222,"publishedAt":28},"01M6CZ16JG8N7A2ZX04BGE8J2Y","research-lookup","Look up current research information using the Parallel Chat API (primary) or Perplexity sonar-pro-search (academic paper searches). Automatically routes queries to the best backend. Use for finding papers, gathering research data, and verifying scientific information.","https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FWriting & Research\u002Fresearch-lookup\u002FSKILL.md",[216,219,220,221],{"categoryNo":217,"categoryName":218,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":114,"categoryName":115,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":145,"categoryName":146,"taxonomyType":120,"taxonomyTypeDesc":121},[125,223,224,225,201,226,227,131,228,229,97,98,133,183,230,231,232,233,234,135],"lookup","research lookup","search","perplexity","api","parallel","openrouter","backend","up","look","queries","chat"]