assets/analysis-plan-template.md
# Analysis Plan Template
## Background
[2-3 sentences providing context for the analysis]
Example:
> Cell surface receptors mediate cellular responses to diverse stimuli including neurotransmitters, hormones, and environmental signals. In model organisms, these receptors play critical roles in sensory perception, development, and homeostasis. Understanding receptor expression patterns across tissues provides insights into their physiological functions.
## Research Question
[One clear, specific question]
Example:
> How do receptor expression patterns differ between neuronal and non-neuronal tissues?
## Hypothesis
[Testable prediction based on biological knowledge]
Example:
> Sensory receptors will be enriched in neuronal tissues, while receptors mediating systemic processes (e.g., metabolism, reproduction) will be enriched in non-neuronal tissues.
## Methods
### Data
- [Describe dataset, source, sample size]
- [Specify organism, tissue types, experimental conditions]
Example:
> Single-cell RNA-seq data from published study: 40,000+ cells from developmental stage, annotated into 25+ cell types including neurons, muscle, epithelial, and connective tissues.
### Analysis Approach
[Bullet points describing computational steps]
Example:
- Filter genes of interest from expression matrix (n genes based on annotation)
- Calculate mean expression per cell type
- Perform differential expression analysis: tissue A vs. tissue B (Wilcoxon rank-sum test)
- Correct for multiple testing (Benjamini-Hochberg FDR < 0.05)
- Cluster genes by expression pattern (hierarchical clustering)
- Identify tissue-specific genes (fold-change > 2, adjusted p < 0.05)
### Statistical Tests
[Specify tests and significance thresholds]
Example:
- Differential expression: Wilcoxon rank-sum test (non-parametric, appropriate for count data)
- Multiple testing correction: Benjamini-Hochberg FDR < 0.05
- Effect size threshold: log2(fold-change) > 1
### Visualizations
[List planned figures]
Example:
1. Heatmap: Gene expression across cell types (top 50 variable genes)
2. Volcano plot: Differential expression (tissue A vs. tissue B)
3. Bar plot: Number of tissue-specific genes per tissue
4. Dot plot: Expression of candidate marker genes across cell types
## Expected Outcomes
### Predicted Results
[What you expect to find based on biological knowledge]
Example:
> Sensory receptor genes will show tissue-specific expression, particularly in specialized sensory cell types. Signaling receptors will be broadly expressed across cell types. Non-specialized tissues will express genes involved in systemic functions (e.g., metabolism, development).
### Alternative Scenarios
[What other results might mean]
Example:
> If many sensory genes are expressed in non-specialized tissues, this could indicate non-canonical roles or promiscuous expression patterns. Broad gene expression across cell types would suggest functional redundancy or pleiotropic roles.
## Quality Control Checks
[How to validate analysis quality]
Example:
- Positive controls: Known tissue-specific genes should show expected patterns
- Negative controls: Housekeeping genes should show uniform expression
- Biological validation: Results should match known expression patterns from literature
- Technical validation: Check for batch effects, outlier cells, doublets
## Success Criteria
[How to know if analysis answered the question]
Example:
- Clear separation of tissue-specific gene expression patterns
- Identification of tissue-specific marker genes
- Recapitulation of known biology (positive control validation)
- Novel insights into understudied gene families
assets/figure-legend-examples.md
# Figure Legend Examples
Publication-quality figure legends for common bioinformatics visualizations.
## General Structure
```
Figure [N]. [One-sentence description of main finding].
([A-Z]) [Panel-specific description]. [Methods summary]. [Statistical test]. [Sample size]. [Key observations].
```
## Example 1: Heatmap (Gene Expression)
**Figure 1. Gene expression varies across cell types.**
(A) Heatmap showing scaled expression (z-score) of top 50 variable genes across 27 cell types from single-cell RNA-seq (n = 40,000 cells). Rows: Genes (hierarchical clustering, Euclidean distance). Columns: Cell types (grouped by tissue). Color scale: blue (low expression) to red (high expression). Sensory receptor genes (blue sidebar) cluster with specialized cell types. (B) Number of genes detected per cell type (≥ 10 counts). Box plots show median (center line), quartiles (box), and 1.5×IQR (whiskers). Specialized cells express significantly more receptors than non-specialized cells (median 127 vs. 68, Wilcoxon p = 3.2×10⁻⁸).
## Example 2: Volcano Plot (Differential Expression)
**Figure 2. Receptor genes are enriched in specialized tissues.**
Volcano plot showing differential expression of 1,300+ genes between specialized cells (n = 22,000 cells) and non-specialized cells (n = 19,000 cells). X-axis: log2(fold-change). Y-axis: -log10(FDR-adjusted p-value). Horizontal dashed line: FDR = 0.05 threshold. Vertical dashed lines: |log2FC| = 1 threshold. Red points: specialized-enriched genes (n = 198). Blue points: non-specialized-enriched genes (n = 129). Gray points: not significant. Statistical test: Wilcoxon rank-sum test with Benjamini-Hochberg correction. Labeled genes: top 10 by effect size. Notable specialized-enriched genes include GENE-1 (log2FC = 5.2), GENE-2 (log2FC = 4.8), and GENE-3 (log2FC = 4.3).
## Example 3: PCA Plot (Dimensionality Reduction)
**Figure 3. Cell types cluster by tissue of origin.**
Principal component analysis (PCA) of 42,035 cells based on expression of 1,341 genes. Each point represents a cell, colored by annotated cell type. PC1 (23.4% variance) separates neurons (left) from non-neurons (right). PC2 (14.7% variance) separates muscle/intestine (bottom) from hypodermis/glia (top). Ellipses: 95% confidence intervals per cell type. PCA performed on log-normalized counts. This separation indicates gene expression profiles are cell-type-specific and reflect developmental lineage.
## Example 4: Bar Plot with Error Bars
**Figure 4. Receptor gene families show tissue-specific expression.**
Number of genes per family significantly enriched in specialized tissue (FDR < 0.05, log2FC > 1). Bars: mean ± SEM across 5 specialized cell types. Family A (n = 23 genes) shows highest enrichment, followed by Family B (n = 18) and Family C (n = 12). Family D (n = 6) shows modest enrichment. Statistical test: One-way ANOVA with Tukey post-hoc (F(4,60) = 18.3, p = 1.2×10⁻⁹). ***: p < 0.001, **: p < 0.01, *: p < 0.05 vs. Family D.
## Example 5: Scatter Plot with Regression
**Figure 5. Gene count correlates with cell type diversity.**
Scatter plot showing correlation between number of genes expressed per cell type (x-axis) and number of unique cell states within that type (y-axis). Each point: one of 27 cell types. Line: linear regression (R² = 0.64, p = 1.3×10⁻⁶). Shaded region: 95% confidence interval. Specialized cells (red points) express more genes (median 127) than non-specialized cells (blue points, median 68) and show greater within-type heterogeneity. This correlation suggests these genes contribute to cell state specification. Outliers (labeled): certain cells express few genes (52) despite high heterogeneity (8 states).
## Example 6: Box Plot (Distribution Comparison)
**Figure 6. Olfactory genes show bimodal expression in sensory neurons.**
Box plots showing expression distribution (log2(CPM+1)) of three gene classes across specialized sensory neurons (cell types A-E; n = 1,247 cells). Sensory receptor genes (red, n = 89) show bimodal distribution with distinct ON/OFF states (Hartigan's dip test, p = 0.002). Metabolic genes (blue, n = 52) show unimodal low expression (p = 0.34). Signaling receptors (green, n = 71) show uniform low expression. Box plots: center line (median), box (IQR), whiskers (1.5×IQR), points (outliers). Statistical comparison: Kruskal-Wallis test (H(2) = 127.3, p = 1.1×10⁻²⁸) with Dunn's post-hoc correction.
## Example 7: Venn Diagram (Set Overlap)
**Figure 7. Cell-type-specific genes show minimal overlap.**
Venn diagram showing overlap of genes enriched in three major tissues: neurons (red, n = 198 genes), muscle (blue, n = 43), and intestine (green, n = 67). Enrichment criteria: log2FC > 1, FDR < 0.05 vs. all other cell types. Neurons and intestine share 12 genes (5.2%), likely reflecting neuroendocrine signaling. Only 3 genes are enriched in all three tissues (gene-47, gene-118, gene-203), suggesting broad signaling roles. 183 genes (92.4%) are neuron-specific, indicating high tissue specialization.
## Example 8: Network Diagram (Gene Relationships)
**Figure 8. Co-expressed genes form functional modules.**
Network showing co-expression relationships among top 100 variable genes. Nodes: genes (size = mean expression, color = dominant cell type). Edges: Pearson correlation > 0.7 (p < 0.01). Node clustering: Louvain algorithm identified 5 modules (outlined). Module 1 (red): sensory receptor genes (n = 27), expressed in specialized neurons. Module 2 (blue): signaling receptors (n = 18), broadly neuronal. Module 3 (green): metabolic receptors (n = 12), epithelial tissues. Modules 4-5: small clusters (n = 8, 5). Hub genes (degree > 10): GENE-1, GENE-2, GENE-3. This modular structure suggests coordinated regulation of functionally related genes.
## Example 9: Time Course (Line Plot)
**Figure 9. gene expression dynamics during development.**
Line plots showing mean expression (log2(CPM+1)) of four gene families across five developmental stages (embryo, L1, L2, L3, adult). Lines: mean ± SEM (n = 3 biological replicates per stage). Chemosensory genes (red) increase from L1 to adult (linear model slope = 0.34, p = 0.003), coinciding with sensory neuron maturation. Neuropeptide receptors (blue) remain stable (slope = 0.02, p = 0.72). Metabolic genes (green) peak at L3 (one-way ANOVA, F(4,10) = 12.4, p = 0.001), aligning with rapid growth phase. Germline genes (purple) are adult-specific (undetectable before L4). Shaded regions: 95% confidence intervals.
## Example 10: Dot Plot (Expression + Prevalence)
**Figure 10. Cell-type marker genes show restricted expression.**
Dot plot showing expression of 15 candidate marker genes across 27 cell types. Dot size: percentage of cells expressing gene (detection threshold: > 0 counts). Dot color: mean expression in positive cells (log2(CPM+1), blue = low, red = high). Each row: one gene. Each column: one cell type. Candidate markers selected by: (1) high cell type specificity (entropy < 1.5), (2) high expression in target cell type (log2FC > 2), (3) prevalence in target type (> 50% cells). GENE-1 is cell-type-A-specific (98% type A cells, <2% other cells). GENE-2 is broadly neuronal. GENE-3 is epithelial-specific. These markers enable cell type identification in uncharacterized samples.
## Key Elements of Good Figure Legends
### 1. Start with Main Finding
> ❌ "Heatmap of gene expression"
> ✅ "gene expression varies across cell types"
### 2. Define All Visual Elements
- Axes (what, units, scale)
- Colors (what they represent, scale bar)
- Symbols (shapes, sizes, meanings)
- Lines (what they connect, statistical fits)
### 3. Report Sample Sizes
> "n = 42,035 cells"
> "3 biological replicates per condition"
> "27 cell types"
### 4. State Statistical Tests
> "Wilcoxon rank-sum test with Benjamini-Hochberg correction"
> "Linear regression (R² = 0.64, p = 1.3×10⁻⁶)"
### 5. Describe Key Methods
> "PCA performed on log-normalized counts"
> "Hierarchical clustering, Euclidean distance"
### 6. Highlight Key Observations
> "Neurons express significantly more genes than non-neuronal cells (median 127 vs. 68)"
### 7. Define Thresholds
> "Detection threshold: > 10 counts"
> "FDR < 0.05, |log2FC| > 1"
### 8. Explain Abbreviations
> First use: "G protein-coupled receptors (genes)"
> Subsequent uses: "genes"
### 9. Note Data Transformations
> "Scaled expression (z-score)"
> "log2(counts per million + 1)"
### 10. Cite Panel Labels
> "(A) Heatmap... (B) Box plot..."
## Common Mistakes to Avoid
### ❌ Too Vague
> "Figure shows gene expression is different"
### ✅ Specific
> "198 genes are neuron-enriched (log2FC > 1, FDR < 0.05)"
### ❌ Missing Methods
> "PCA of cells"
### ✅ Complete Methods
> "PCA of 42,035 cells based on expression of 1,341 genes. PCA performed on log-normalized counts."
### ❌ No Statistics
> "Expression was higher in neurons"
### ✅ Quantified
> "Expression was higher in neurons (median 127 vs. 68 genes, Wilcoxon p = 3.2×10⁻⁸)"
### ❌ Undefined Visual Elements
> "Red points show significant genes"
### ✅ Defined
> "Red points: neuron-enriched genes (n = 198, log2FC > 1, FDR < 0.05)"
assets/results-interpretation-template.md
# Results Interpretation Template
Use this structure to interpret analysis results in notebook markdown cells or manuscript results sections.
## Pattern: Observation → Evidence → Meaning → Caveats
### 1. State the Observation
[What did you find? Objective, factual description]
Example:
> We identified 327 genes differentially expressed between tissue A and tissue B (FDR < 0.05, |log2FC| > 1).
### 2. Provide Statistical Evidence
[Quantify the finding with statistics]
Example:
> Of these, 198 genes (60.6%) showed enrichment in tissue A (median log2FC = 2.3), while 129 genes (39.4%) showed enrichment in tissue B (median log2FC = -1.8). The largest effect sizes were observed for sensory receptor genes: GENE-1 (log2FC = 5.2, FDR = 1.3×10⁻⁴⁵) and GENE-2 (log2FC = 4.8, FDR = 2.1×10⁻³⁸).
### 3. Explain Biological Meaning
[Why does this matter? What does it tell us biologically?]
Example:
> This enrichment of sensory receptors in tissue A aligns with their known roles in detecting environmental cues. The high expression of GENE-1 and GENE-2 in specialized cell types suggests functional specialization. Conversely, tissue B enrichment of metabolic genes reflects their roles in systemic processes.
### 4. Acknowledge Caveats
[What are the limitations? What could explain alternative interpretations?]
Example:
> These findings are based on L2-stage larvae and may not reflect expression patterns in other developmental stages. Additionally, low-abundance genes may be underestimated due to sequencing depth limitations. Cell type annotations are computational predictions and require experimental validation.
## Examples for Common Result Types
### Differential Expression Results
**Template**:
> [N] genes were differentially expressed between [condition A] and [condition B] ([test], [threshold]). [X%] were upregulated in [condition A] (median [effect size]), while [Y%] were upregulated in [condition B] (median [effect size]). Notable genes include [specific examples with statistics]. These results suggest [biological interpretation], consistent with [known biology or previous studies]. However, [caveats about technical/biological limitations].
### Clustering Results
**Template**:
> Unsupervised clustering identified [N] distinct clusters ([method], [parameters]). Cluster [X] contained [N genes/cells] characterized by [defining features]. Gene ontology enrichment analysis revealed [pathway/process] (FDR = [value]). This pattern suggests [biological interpretation]. The separation of [cluster A] from [cluster B] indicates [meaning], though [caveat about interpretation].
### Correlation Results
**Template**:
> [Gene A] and [Gene B] showed [strength] correlation (r = [value], p = [p-value]). This association is consistent with [biological relationship], as [explanation]. However, correlation does not imply causation, and [alternative explanations].
### Positive Control Validation
**Template**:
> As a positive control, we examined [known gene/pattern]. As expected, [gene X] showed [expected pattern] ([statistics]), confirming the validity of our analysis. This recapitulation of known biology increases confidence in novel findings.
### Unexpected Findings
**Template**:
> Unexpectedly, we observed [surprising result] ([statistics]). This finding contrasts with [previous expectation], potentially because [hypothetical explanation]. Alternative explanations include [technical artifact possibility] or [novel biological mechanism]. Further experiments are needed to [validation approach].
## Figure Interpretation Integration
When referring to figures:
> **Figure 1A shows [what the figure displays]**. [Describe key patterns]. [Interpret biological meaning]. See figure legend for complete methods and statistics.
Example:
> **Figure 2C shows gene expression across 27 cell types**. Sensory receptor genes (blue cluster) are highly enriched in specialized sensory neurons, while signaling receptors (green cluster) are broadly expressed across neuronal subtypes. This tissue-specific expression pattern reflects functional specialization of gene families. See Figure 2 legend for clustering methods and statistical tests.
## Writing for Different Audiences
### For Lab Notebooks
- Emphasize observations and raw findings
- Include negative results and troubleshooting notes
- Document decisions and reasoning
### For Manuscripts
- Lead with biological significance
- Emphasize novelty and impact
- Minimize technical details (move to methods)
- Connect to broader context
### For Grant Proposals
- Highlight preliminary success
- Emphasize feasibility
- Connect to proposed aims
- Show expertise
## Common Mistakes to Avoid
### ❌ Over-interpretation
> "gene-123 **causes** increased lifespan"
(correlation ≠ causation)
### ✅ Appropriate Interpretation
> "gene-123 expression **correlates with** increased lifespan, suggesting a potential role in longevity regulation"
### ❌ Hiding Negative Results
> "We identified 327 differentially expressed genes"
(omitting that 1,014 showed no difference)
### ✅ Complete Reporting
> "Of 1,341 genes examined, 327 (24.4%) were differentially expressed, while 1,014 (75.6%) showed similar expression across tissues"
### ❌ Unsupported Claims
> "This proves genes regulate aging"
(single correlation doesn't prove mechanism)
### ✅ Evidence-Based Claims
> "This association suggests genes may contribute to aging regulation, consistent with previous genetic studies (Smith et al., 2020)"
### ❌ Ignoring Effect Size
> "gene-5 was significantly different (p < 0.05)"
(p-value without magnitude)
### ✅ Reporting Effect and Significance
> "gene-5 showed modest enrichment in neurons (log2FC = 0.8, FDR = 0.03), suggesting weak tissue preference"
## Integration with Analysis Plan
**Always refer back to your analysis plan**:
- Did results match expectations?
- Were hypotheses supported or rejected?
- What new questions emerged?
Example:
> Our hypothesis that chemosensory genes would be neuron-enriched was strongly supported (198/327 neuron-enriched genes, 60.6%). However, we unexpectedly found 42 genes with mixed expression across neuronal and non-neuronal tissues, suggesting more complex regulation than anticipated. This motivates future investigation of cell-type-specific alternative splicing.
examples/usage-examples.md
# Principal Investigator Skill - Usage Examples
## How to Use the Team-Directed Workflow
### Example 1: Implementing a New Analysis
**User request**: "Implement single-cell clustering analysis for my dataset"
**As PI, you should**:
```
Step 1: Recognize this is an IMPLEMENTATION task
→ Use feedback order: biologist-commentator → bioinformatician → calculator → python-developer
Step 2: Gather feedback
Skill(skill="biologist-commentator", args="Evaluate biological appropriateness of clustering approach for identifying cell types in neuronal single-cell data")
Skill(skill="bioinformatician", args="Recommend clustering method and pipeline structure for neuronal single-cell RNA-seq analysis")
Skill(skill="calculator", args="Validate that dataset size (5000 cells, 20000 genes) is sufficient for robust clustering")
Skill(skill="python-developer", args="Review implementation strategy for single-cell clustering pipeline in Jupyter notebook")
Step 3: Synthesize feedback
- Biologist: "Ensure resolution captures biological diversity"
- Bioinformatician: "Use Leiden algorithm with resolution parameter sweep"
- Calculator: "Sample size adequate, consider subsampling for speed"
- Software-developer: "Modularize functions, add visualization, use scanpy"
Decision: Implement Leiden clustering with scanpy, include resolution sweep, create modular functions
Step 4: Delegate
Skill(skill="technical-pm", args="Implement single-cell clustering analysis using scanpy Leiden algorithm with resolution parameter sweep (0.4-1.2). Include PCA preprocessing, UMAP visualization, and marker gene identification. Modular code structure.")
Step 5: Interpret results after implementation
[Write biological interpretation of clusters]
```
---
### Example 2: Interpreting Unexpected Results
**User request**: "Why do we see this unexpected gene expression pattern?"
**As PI, you should**:
```
Step 1: Recognize this is an INTERPRETATION task
→ Use feedback order: python-developer → calculator → bioinformatician → biologist-commentator
Step 2: Gather feedback
Skill(skill="python-developer", args="Verify that expression quantification code is correct and data preprocessing appropriate")
Skill(skill="calculator", args="Validate statistical significance of observed expression pattern, check for batch effects")
Skill(skill="bioinformatician", args="Assess whether expression pattern is robust to different normalization methods")
Skill(skill="biologist-commentator", args="Interpret biological significance of observed expression pattern in context of neuron biology")
Step 3: Synthesize feedback
- Software-developer: "Code verified, no technical issues"
- Calculator: "Pattern significant (p < 0.001), no batch confounding"
- Bioinformatician: "Robust across normalization methods"
- Biologist-commentator: "May indicate novel regulatory mechanism, check literature for similar patterns"
Decision: Pattern is real, propose biological hypothesis, cite relevant literature
Step 4: Write interpretation (no delegation needed)
[Draft Results and Discussion sections with biological context]
```
---
### Example 3: Choosing a Method (Research Task)
**User request**: "What's the best normalization method for our data?"
**As PI, you should**:
```
Step 1: Recognize this is a RESEARCH task (requires literature + validation)
→ Skip team feedback, delegate directly to program-officer
Step 2: Delegate to program-officer
Skill(skill="program-officer", args="Research and validate normalization methods for sparse single-cell RNA-seq data with high zero inflation. Compare scran, SCTransform, and Pearson residuals approaches.")
Step 3: Receive integrated findings
[Program-officer coordinates researcher, synthesizer, calculator, fact-checker]
Returns: "Recommendation: scran for UMI-based data with zero inflation. Literature shows robust performance. Testing on your data confirms best performance. SCTransform also acceptable."
Step 4: Write methods justification
[Draft Methods section citing literature and testing results]
```
---
### Example 4: Overriding Feedback
**User request**: "Optimize this analysis pipeline for performance"
**As PI, you should**:
```
Step 1: Gather feedback
Skill(skill="biologist-commentator", args="...")
→ "Consider additional QC metrics for biological quality"
Skill(skill="bioinformatician", args="...")
→ "Add statistical tests for each step"
Skill(skill="calculator", args="...")
→ "Implement bootstrap confidence intervals"
Skill(skill="python-developer", args="...")
→ "Refactor into object-oriented architecture, add caching, parallelization"
Step 2: Synthesize and OVERRIDE
Analysis context: This is exploratory, one-time analysis for grant application due in 2 days
Decision:
✓ Accept biologist's QC suggestion (quick to add)
✗ Reject additional statistical tests (time constraint)
✗ Reject bootstrap CIs (not needed for exploratory)
✗ Reject OOP refactoring (over-engineering for one-time use)
✓ Accept parallelization suggestion only (speeds up analysis)
Reasoning: Project timeline and exploratory nature override perfection
Step 3: Delegate with constraints
Skill(skill="technical-pm", args="Optimize analysis pipeline: add suggested QC metrics and parallelize computationally intensive steps only. Skip statistical extensions and refactoring due to time constraints.")
```
---
## When NOT to Gather Team Feedback
### Direct delegation appropriate for:
1. **Simple, routine tasks**
- "Plot a histogram of gene expression"
- "Calculate summary statistics"
- Direct to bioinformatician without feedback
2. **Clear, established methods**
- "Run standard DESeq2 pipeline"
- "Perform PCA on normalized data"
- Direct to bioinformatician without feedback
3. **Pure writing tasks**
- "Draft abstract for manuscript"
- "Write figure legend"
- Handle directly without feedback
4. **Research coordination tasks**
- "Review literature on X"
- "Validate method Y across papers"
- Direct to program-officer without feedback
### Team feedback valuable for:
1. **Novel analyses** (no established protocol)
2. **Method selection** (multiple valid approaches)
3. **Unexpected results** (need multi-perspective validation)
4. **Complex implementations** (architectural decisions needed)
5. **Publication-critical analyses** (want thorough review)
---
## Quick Decision Tree
```
START: Received a task
│
├─ Is it routine/simple?
│ YES → Direct delegation (no feedback)
│ NO → Continue
│
├─ Does it require literature/research?
│ YES → Delegate to program-officer
│ NO → Continue
│
├─ Is it implementation (code/pipeline)?
│ YES → Gather feedback: biologist → bioinformatician → calculator → python-developer
│ NO → Continue
│
├─ Is it interpretation (writing/biology)?
│ YES → Gather feedback: python-developer → calculator → bioinformatician → biologist
│ NO → Continue
│
└─ Mixed task?
YES → Context-dependent ordering (start with most relevant expert)
```
---
## Tips for Effective PI Leadership
1. **Be decisive**: Don't defer every decision to the team
2. **Explain reasoning**: When overriding feedback, document why
3. **Know when to skip feedback**: Not every task needs team input
4. **Respect expertise**: Take technical concerns seriously
5. **Focus on science**: Biology and reproducibility trump convenience
6. **Manage time**: Balance perfection with deadlines
7. **Document decisions**: Future you will thank present you
---
## Common Mistakes to Avoid
❌ **Gathering feedback for trivial tasks**
- Don't ask team about plotting a simple graph
- Waste of everyone's time
❌ **Following all feedback blindly**
- You're the PI - make decisions
- Team provides input, not mandates
❌ **Using wrong feedback order**
- Implementation tasks need biologist first (context)
- Interpretation tasks need developer first (validation)
❌ **Skipping synthesis step**
- Don't just forward all feedback to technical-pm
- Make coherent decision from disparate input
❌ **Over-engineering exploratory analyses**
- Not every analysis needs production-quality code
- Match rigor to purpose
✅ **Best Practice**: Use judgment. The workflow is a guide, not a rigid procedure.
references/CHANGELOG.md
# Principal Investigator Skill - Changelog
## 2026-01-28: Team-Directed Workflow Update
### Major Changes
**Previous model**: Direct delegation to bioinformatician or program-officer
**New model**: Team feedback → PI decision → Technical-PM delegation
### New Workflow
1. **Gather team feedback** (ordered by task type)
2. **Synthesize input** and make final decision
3. **Delegate via technical-pm** for implementation
4. **Interpret results** with biological context
### Team Structure
PI now directs:
- **bioinformatician**: Data analysis, statistical methods
- **software-developer**: Code implementation, architecture
- **biologist-commentator**: Biological relevance, interpretation
- **calculator**: Quantitative validation, feasibility
- **technical-pm**: Coordinates implementation team
- **program-officer**: Coordinates research tasks (literature, synthesis)
### Feedback Ordering
**Implementation tasks** (least → most technical):
```
biologist-commentator → bioinformatician → calculator → software-developer
```
**Interpretation tasks** (most → least technical):
```
software-developer → calculator → bioinformatician → biologist-commentator
```
**Research tasks**:
```
Skip team feedback → delegate directly to program-officer
```
### PI Authority
Added explicit guidance that PI has **full authority** to:
- Accept all feedback
- Accept some feedback, reject others
- Override technical recommendations
- Synthesize conflicting input
- Make executive decisions
### Key Additions
1. **Leadership Principles**: Authority, synthesis, scientific judgment, pragmatism
2. **When to Disregard Feedback**: Specific scenarios and examples
3. **Example Workflows**: Three detailed examples showing feedback gathering, synthesis, and delegation
4. **Quick Reference**: Feedback order summary for common task types
5. **Updated Quality Checklist**: Pre-delegation and pre-finalization checks
### Integration Updates
**Technical-PM**: For implementation/execution tasks
**Program-Officer**: For research/literature tasks
Clear decision rules for when to use each coordinator.
### Rationale
This update formalizes the team-based research structure where:
- PI leads strategically
- Specialists provide domain expertise
- PI synthesizes and decides
- Technical-PM manages execution
- Everyone contributes their expertise in the right order
### Files Modified
- `SKILL.md`: Complete rewrite of workflow section
- `CHANGELOG.md`: This file (new)
### Backward Compatibility
**Breaking changes**: None - old workflow patterns still work
**Enhanced**: PI skill now has explicit team coordination workflow
**Migration**: No action needed - new workflow is additive
references/research-coordination-integration.md
# Research Coordination Integration Guide
How principal-investigator skill integrates with research coordination skills (program-officer, researcher, calculator, synthesizer, fact-checker).
## Two-Tier Architecture
### Tier 1: Domain Execution (Bioinformatics Skills)
- **principal-investigator**: Scientific writing and interpretation
- **bioinformatician**: Data analysis implementation
- **copilot**: Code review
- **systems-architect**: Software architecture
- **python-developer**: Production code
- **biologist-commentator**: Biological validation
**Location**: `repos/gpcr_exploration/.claude/skills/`
### Tier 2: Research Coordination (General Skills)
- **program-officer**: Multi-agent coordination
- **researcher**: Literature review
- **calculator**: Quantitative analysis
- **synthesizer**: Cross-source integration
- **fact-checker**: Validation
**Location**: `~/.claude/skills/`
## When to Use Which Tier
### Use Tier 1 Only (Direct PI → Bioinformatician)
**Scenario**: Straightforward analysis with clear methods
**Example**: "Analyze differential expression using DESeq2"
**Flow**:
```
Principal Investigator
↓ Writes analysis plan
Bioinformatician
↓ Implements
Principal Investigator
↓ Interprets results
```
**Characteristics**:
- Established methods (DESeq2, scanpy, standard protocols)
- Clear implementation path
- No need for literature synthesis or validation
- Single-domain expertise sufficient
### Use Both Tiers (PI → Program Officer → Specialists)
**Scenario**: Complex task requiring research coordination
**Example**: "Determine best normalization method for low-expression genes"
**Flow**:
```
Principal Investigator
↓ Delegates to program-officer
Program Officer
├─ Coordinates researcher (literature review)
├─ Coordinates synthesizer (compare methods)
├─ Coordinates calculator (quantitative testing)
└─ Coordinates fact-checker (validate claims)
↓ Returns integrated findings
Principal Investigator
↓ Interprets and writes methods
Bioinformatician
↓ Implements validated approach
Principal Investigator
↓ Interprets results
```
**Characteristics**:
- Multiple approaches possible
- Needs literature support
- Requires quantitative validation
- Multi-source integration needed
## Integration Patterns
### Pattern 1: Literature-Informed Analysis
**Goal**: Choose analysis method based on literature
**Full workflow**:
```
Step 1: PI Assessment
────────────────────────
User asks: "What's the best clustering algorithm for single-cell data?"
PI identifies:
- Question requires literature review
- Multiple methods exist (Louvain, Leiden, hierarchical)
- Need quantitative comparison
- Requires synthesis of recommendations
PI action: Invoke program-officer
Step 2: Program Officer Coordination
──────────────────────────────────
Program Officer receives delegation and coordinates:
→ Researcher task: "Review recent papers on single-cell clustering algorithms"
Returns: List of papers with methods (Louvain, Leiden, hierarchical)
→ Synthesizer task: "Compare clustering algorithms from literature"
Returns: "Leiden outperforms Louvain for resolution parameter tuning,
hierarchical good for exploratory but computationally expensive"
→ Calculator task: "Test Leiden vs Louvain on sample dataset"
Returns: "Leiden gives 12% more stable clusters across resolutions,
runtime comparable"
→ Fact-Checker task: "Verify performance claims from papers on our data"
Returns: "Claims verified - Leiden resolution stability confirmed"
Step 3: Program Officer Delivers to PI
────────────────────────────────────
Integrated findings:
- Method recommendation: Leiden algorithm
- Literature support: Traag et al. (2019), preferred in >80% recent papers
- Quantitative validation: Tested on sample data, 12% improvement
- Confidence: High
Step 4: PI Interpretation
─────────────────────────
PI writes methods section:
"We used the Leiden algorithm (Traag et al., 2019) for community detection
based on its superior performance in resolution parameter tuning compared to
the Louvain algorithm (Blondel et al., 2008). We tested both methods on a
subset of our data and confirmed that Leiden produces more stable cluster
assignments across resolutions (12% improvement in stability metric), consistent
with benchmarks in the literature."
Step 5: Implementation
──────────────────────
PI delegates to bioinformatician:
"Implement Leiden clustering with resolution=0.8"
Bioinformatician implements validated approach.
```
**When to use this pattern**:
- Choosing between multiple valid methods
- Need to justify method selection with literature
- Want quantitative validation before committing to approach
### Pattern 2: Quantitative Feasibility Check
**Goal**: Validate statistical approach before large-scale analysis
**Full workflow**:
```
Step 1: PI Assessment
────────────────────────
User proposes: "Use mixed-effects model for batch correction"
PI questions:
- Is this appropriate for our data structure?
- Do we have adequate power?
- Are assumptions met?
PI action: Invoke program-officer
Step 2: Program Officer Coordination
──────────────────────────────────
Program Officer coordinates validation:
→ Calculator task: "Run power analysis for mixed-effects model"
Returns: "With n=50 samples, 4 batches, adequate power (0.85) to detect
medium effects"
→ Calculator task: "Check mixed-effects model assumptions on sample data"
Returns: "Residuals approximately normal, variance homogeneous across batches,
no severe outliers"
→ Researcher task: "Find papers using mixed-effects for batch correction in similar data"
Returns: "Used successfully in Smith et al. (2023) for multi-batch RNA-seq,
Patel et al. (2024) for similar experimental design"
→ Fact-Checker task: "Verify our data meets model requirements"
Returns: "Requirements met: balanced design, sufficient replication,
batch effects present but not confounded with treatment"
Step 3: Program Officer Delivers to PI
────────────────────────────────────
Validation report:
- Statistical validity: PASS (assumptions met, adequate power)
- Literature support: Used in similar studies (2 recent papers)
- Recommendation: Proceed with mixed-effects model
- Alternative if failed: limma-voom with batch as covariate
- Confidence: High
Step 4: PI Interpretation
─────────────────────────
PI writes methods section:
"To account for batch effects while preserving biological variation, we used
linear mixed-effects models (lme4 package) with batch as a random effect.
Power analysis indicated adequate statistical power (0.85) for our sample size
(n=50), and model diagnostics confirmed that assumptions were satisfied.
This approach has been used successfully for similar multi-batch experimental
designs (Smith et al., 2023; Patel et al., 2024)."
Step 5: Implementation
──────────────────────
PI delegates to bioinformatician with confidence:
"Implement mixed-effects batch correction as validated"
```
**When to use this pattern**:
- Proposing non-standard statistical approach
- Need to validate assumptions before large-scale analysis
- Want to avoid wasted computational time on invalid methods
- Planning to publish and need statistical rigor
### Pattern 3: Multi-Source Validation
**Goal**: Verify unexpected finding across multiple sources
**Full workflow**:
```
Step 1: PI Assessment
────────────────────────
Bioinformatician reports: "Gene X shows 10-fold upregulation in condition A,
but literature says it's constitutively expressed"
PI questions:
- Is this finding real or artifact?
- Technical issue (normalization, batch effect)?
- Biological phenomenon not previously reported?
PI action: Invoke program-officer
Step 2: Program Officer Coordination
──────────────────────────────────
Program Officer coordinates investigation:
→ Researcher task: "Review literature on Gene X expression patterns"
Returns: "Typically constitutively expressed in most tissues, but 2 papers
report condition-specific regulation in stress conditions (Jones 2022,
Kim 2023)"
→ Calculator task: "Test alternative normalizations for Gene X"
Returns: "Pattern robust across 3 normalization methods (TMM, DESeq2, scran),
not driven by normalization choice"
→ Fact-Checker task: "Verify Gene X preprocessing - any filtering/imputation issues?"
Returns: "Gene X passes QC: >100 reads/sample, detected in all samples,
no zeros or outliers, not flagged by QC pipeline"
→ Calculator task: "Check if batch effect could explain Gene X pattern"
Returns: "Pattern persists within each batch independently, not confounded
with batch structure"
→ Synthesizer task: "Integrate evidence - is Gene X finding credible?"
Returns: "High confidence - robust to methods, QC passed, some literature
support for condition-specific regulation in stress"
Step 3: Program Officer Delivers to PI
────────────────────────────────────
Validation report:
- Finding validity: REAL (not artifact)
- Technical validation: Robust to normalization, passes QC, not batch effect
- Literature context: Rare but precedented (stress-responsive regulation)
- Biological plausibility: Consistent with stress response pathway
- Confidence: High
- Recommendation: Report as novel finding with appropriate caveats
Step 4: PI Interpretation
─────────────────────────
PI writes results section:
"We observed significant upregulation of Gene X in condition A (log2FC=3.3,
padj<0.001), a finding that was robust across multiple normalization methods
and not attributable to batch effects. While Gene X is typically constitutively
expressed, recent studies have reported condition-specific regulation in stress
responses (Jones et al., 2022; Kim et al., 2023), suggesting that our observation
may reflect a previously under-appreciated stress-responsive function."
PI writes discussion:
"The unexpected regulation of Gene X warrants further investigation, particularly
given its canonical role as a housekeeping gene. Our finding adds to emerging
evidence that 'housekeeping' genes may exhibit context-dependent regulation..."
```
**When to use this pattern**:
- Unexpected results that contradict literature
- Need to rule out technical artifacts
- Want to assess biological plausibility
- Planning to report novel findings and need evidence
## Decision Tree
**Question**: Do I need program-officer or can I proceed directly to bioinformatician?
```
┌─────────────────────────────────────────────────────┐
│ Is task straightforward with established methods? │
└─────────────────┬───────────────────────────────────┘
│
┌─────────┴─────────┐
│ │
YES NO
│ │
↓ ↓
┌───────────────┐ ┌────────────────────────┐
│ Use PI → │ │ Ask these questions: │
│ Bioinformatician│ └────────┬───────────────┘
└───────────────┘ │
↓
┌────────────────────────────────────────────┐
│ Need literature review of multiple papers? │
└────────┬───────────────────────────────────┘
│
┌────────┴────────┐
YES NO
│ │
↓ ↓
Invoke program-officer Continue...
│
↓
┌──────────────────────────────────────────────┐
│ Need quantitative feasibility check? │
└────────┬─────────────────────────────────────┘
│
┌────┴────┐
YES NO
│ │
↓ ↓
Invoke Continue...
program-officer
│
↓
┌──────────────────────────────────────────────┐
│ Need validation across multiple sources? │
└────────┬─────────────────────────────────────┘
│
┌────┴────┐
YES NO
│ │
↓ ↓
Invoke Continue...
program-officer
│
↓
┌──────────────────────────────────────────────┐
│ Multiple specialists with dependencies? │
└────────┬─────────────────────────────────────┘
│
┌────┴────┐
YES NO
│ │
↓ ↓
Invoke Use PI → Bioinformatician
program-officer
```
**Summary decision rule**:
- **Straightforward task** → PI → Bioinformatician
- **Any of these apply** → PI → Program Officer → Specialists:
- Literature synthesis needed
- Quantitative validation needed
- Multi-source verification needed
- Complex coordination with dependencies
## Examples by Research Phase
### Planning Phase
**Use program-officer when**:
**Scenario 1**: Designing experimental approach
```
User: "We want to identify cell types in our single-cell RNA-seq data"
PI assessment: Multiple methods exist, need literature-informed choice
PI invokes program-officer:
- Researcher: Review cell type identification methods
- Synthesizer: Compare marker-based vs reference-based vs unsupervised
- Calculator: Estimate computational requirements for each
- Fact-Checker: Verify methods appropriate for our organism/tissue
Result: Validated approach with justified method selection
```
**Scenario 2**: Choosing between methods
```
User: "Should we use bulk or single-cell RNA-seq?"
PI assessment: Requires literature review + cost-benefit analysis
PI invokes program-officer:
- Researcher: Review papers comparing bulk vs single-cell for similar questions
- Calculator: Estimate costs (sequencing, compute, time)
- Synthesizer: Compare resolution, power, artifacts, analysis complexity
- Fact-Checker: Verify budget and timeline constraints
Result: Recommendation with trade-offs clearly articulated
```
**Scenario 3**: Estimating sample size
```
User: "How many samples do we need for differential expression analysis?"
PI assessment: Need power analysis + literature benchmarks
PI invokes program-officer:
- Calculator: Run power analysis for expected effect sizes
- Researcher: Find similar studies and their sample sizes
- Fact-Checker: Verify assumptions (variance, effect size realistic)
- Synthesizer: Integrate power analysis + literature + practical constraints
Result: Sample size recommendation with statistical justification
```
### Analysis Phase
**Use direct PI → Bioinformatician when**:
**Scenario 1**: Implementing established methods
```
User: "Run DESeq2 on our RNA-seq data"
PI writes plan: Standard DESeq2 workflow with QC, filtering, normalization, testing
Bioinformatician implements: Follows established protocol
Result: Standard analysis, no coordination needed
```
**Scenario 2**: Following published protocols
```
User: "Reproduce analysis from Smith et al. paper"
PI writes plan: Follow methods from paper section
Bioinformatician implements: Uses same tools/parameters as paper
Result: Straightforward replication, no coordination needed
```
**Scenario 3**: Running standard QC
```
User: "Check quality of sequencing data"
PI writes plan: Standard QC metrics (read depth, duplication, etc.)
Bioinformatician implements: Runs FastQC/MultiQC
Result: Routine QC, no coordination needed
```
### Interpretation Phase
**Use program-officer when**:
**Scenario 1**: Unexpected results need validation
```
Bioinformatician reports: "Housekeeping gene shows differential expression"
PI assessment: Need to verify not artifact, check literature
PI invokes program-officer:
- Calculator: Test alternative methods
- Fact-Checker: Verify QC for this gene
- Researcher: Check if reported in literature
- Synthesizer: Integrate evidence
Result: Validated finding or identified artifact
```
**Scenario 2**: Cross-study comparisons
```
User: "How do our results compare to published studies?"
PI assessment: Need synthesis across multiple papers
PI invokes program-officer:
- Researcher: Extract results from comparable papers
- Synthesizer: Compare findings (overlap, differences)
- Fact-Checker: Verify comparable methods/conditions
- Calculator: Quantify overlap (Fisher's exact test)
Result: Contextualized findings within literature
```
**Scenario 3**: Quantifying biological significance
```
User: "Are these log2 fold changes biologically meaningful?"
PI assessment: Need literature benchmarks + calculations
PI invokes program-officer:
- Researcher: Find typical effect sizes in similar studies
- Calculator: Convert to biological units (fold change → protein abundance)
- Fact-Checker: Verify calculation assumptions
- Synthesizer: Interpret magnitude in biological context
Result: Effect sizes interpreted with biological context
```
### Writing Phase
**Use program-officer when**:
**Scenario 1**: Literature synthesis for introduction
```
PI needs: Comprehensive review of field for introduction
PI invokes program-officer:
- Researcher: Read key papers and extract themes
- Synthesizer: Identify knowledge gaps and organize narrative
- Fact-Checker: Verify citations and claims
- Calculator: Quantify trends if applicable (meta-analysis)
Result: Literature synthesis ready for PI to write introduction
```
**Scenario 2**: Validating methods description
```
PI drafts methods, needs verification
PI invokes program-officer:
- Fact-Checker: Verify all methods accurately described
- Researcher: Check if methods align with field standards
- Calculator: Verify statistical tests correctly reported
Result: Validated methods section ready for submission
```
**Scenario 3**: Checking statistical reporting
```
PI needs to ensure all stats reported correctly
PI invokes program-officer:
- Calculator: Verify all p-values, effect sizes, CIs reported
- Fact-Checker: Check test assumptions stated
- Researcher: Verify statistical reporting follows journal guidelines
Result: Statistics section ready for submission
```
## Key Principles
### 1. Separation of Concerns
**Principal-Investigator** = Scientific brain
- Frames research questions
- Interprets biological significance
- Writes publication-quality narrative
- Makes scientific judgment calls
**Program Officer** = Research coordinator
- Manages information gathering
- Coordinates multiple specialists
- Handles logistics and dependencies
- Delivers integrated findings
**They work together, not in competition.**
### 2. When to Delegate
**Delegate to program-officer when**:
- Task requires input from 2+ specialists
- Literature synthesis needed
- Quantitative validation needed
- Multi-source verification needed
**Don't delegate when**:
- Straightforward implementation
- Established methods
- Single domain of expertise
- Time-sensitive quick analysis
### 3. What Program Officer Delivers
**Deliverables to PI**:
- Synthesis documents (integrated findings)
- Validation reports (claims verified/refuted)
- Computational results (quantitative analyses)
- Literature notes (papers reviewed and summarized)
**What PI does with deliverables**:
- Interprets biological/scientific significance
- Writes publication-quality narrative
- Frames conclusions in research context
- Identifies next steps
### 4. Integration is Seamless
**From user's perspective**:
- Ask principal-investigator to do complex task
- PI automatically delegates to program-officer when needed
- User receives final interpreted results
**User doesn't need to**:
- Decide when to use program-officer
- Coordinate researchers/calculators themselves
- Integrate findings from multiple specialists
**PI handles coordination decisions.**
## Common Questions
### Q: When should I use program-officer vs researcher directly?
**A**: Never invoke researcher directly if you're doing scientific research. Always go through principal-investigator, who will delegate to program-officer if needed.
**Correct workflow**:
```
User → Principal-Investigator → [Program Officer → Researcher]
```
**Incorrect workflow**:
```
User → Researcher ❌ (bypasses scientific interpretation)
```
### Q: Can I use program-officer for simple literature reviews?
**A**: Yes, but it's often overkill. If you just need to read 1-2 papers, PI can do it directly. If you need to synthesize 5+ papers, delegate to program-officer.
**Simple (PI handles directly)**:
- "What method did Smith et al. use?"
- "Check if this approach has been tried before"
**Complex (delegate to program-officer)**:
- "Compare normalization methods across literature"
- "Synthesize findings from single-cell clustering papers"
### Q: What if I'm unsure whether to delegate?
**A**: Err on the side of delegating. Program Officer can always decide a task is simple and handle it quickly. Better to delegate and have it be quick than to miss needed coordination.
**Rule of thumb**: If you think "I should probably check the literature / validate this / get a quantitative estimate" → delegate to program-officer.
### Q: Can program-officer write the manuscript?
**A**: No. Program Officer delivers findings, PI writes the narrative.
**Program Officer delivers**:
- "Method A preferred in 8/10 papers"
- "Validation passed: assumptions met"
- "Effect size comparable to Smith et al."
**PI writes**:
- "We used Method A based on its widespread adoption in recent studies..."
- "Statistical assumptions were verified prior to analysis..."
- "Our effect sizes were consistent with previous reports..."
### Q: How do I know if program-officer succeeded?
**A**: Program Officer returns integrated findings with:
- Clear recommendation or summary
- Supporting evidence from multiple sources
- Confidence level (high/medium/low)
- Alternative if recommendation failed
**If you receive this, program-officer succeeded. If you receive fragmented information, it may need refinement.**
### Q: Can I use this pattern for other domain skills?
**A**: Yes! This two-tier architecture works for any domain-specific skill that needs research coordination.
**Examples**:
- **Chemistry PI** → program-officer → researchers/calculators for synthesis planning
- **Physics PI** → program-officer → researchers/calculators for experimental design
- **Clinical PI** → program-officer → researchers/fact-checkers for guideline synthesis
**The pattern is domain-agnostic.**
## Summary
**Two-tier architecture**:
- **Tier 1** (domain): Bioinformatics skills execute scientific work
- **Tier 2** (coordination): Research coordination skills manage information
**PI is the bridge**:
- Assesses task complexity
- Delegates to program-officer when needed
- Receives integrated findings
- Interprets and writes
**Program Officer coordinates**:
- Manages researcher, calculator, synthesizer, fact-checker
- Handles dependencies and integration
- Delivers validated findings
**User benefit**:
- Ask PI to do complex research task
- PI automatically coordinates needed specialists
- Receive interpreted, publication-ready results
**The integration is invisible to users but powerful in execution.**
---
Created: 2026-01-28
Author: David Angeles Albores
Version: 1.0
references/writing-guidelines.md
# Scientific Writing Guidelines
Comprehensive guide for writing publication-quality scientific text.
## Journal-Specific Style Guides
### Nature Family (Nature, Nature Methods, Nature Communications)
- **Abstract**: 150-200 words, structured (Background, Methods, Results, Conclusions)
- **Introduction**: 3-4 paragraphs, emphasize novelty and significance
- **Results**: Present in logical order, not chronological
- **Methods**: Brief in main text, detailed in supplementary
- **Tense**: Past for specific findings, present for established knowledge
- **Citations**: Author (year) format, e.g., "Smith et al. (2020) showed..."
- **Figures**: Max 6-8 main figures, unlimited supplementary
### Cell Family (Cell, Cell Reports, iScience)
- **Abstract**: 150 words, unstructured single paragraph
- **Highlights**: 3-4 bullet points (85 characters each)
- **eTOC**: One sentence summary (40-50 words)
- **Results**: Combined Results and Discussion
- **Methods**: At end or supplementary
- **Tense**: Present tense for figures ("Figure 1A shows...")
- **Citations**: (Author, year) format, e.g., "(Smith et al., 2020)"
### Science Family (Science, Science Advances)
- **Abstract**: 125 words, structured (one-sentence summaries per section)
- **Main text**: ~3000 words total (very concise)
- **Subheadings**: Required in Results
- **Methods**: Supplementary materials only
- **Tense**: Present for data ("Data show...")
- **Citations**: Numbered (1, 2, 3)
### PLOS Family (PLOS ONE, PLOS Biology, PLOS Genetics)
- **Abstract**: 300 words, unstructured
- **Introduction**: No formal Abstract section, background integrated
- **Results**: Separate from Discussion
- **Methods**: Can be at end of main text
- **Figures**: Unlimited
- **Open Access**: CC-BY license, author retains copyright
### eLife
- **Abstract**: 150 words, single paragraph
- **eLife Digest**: 200-300 word lay summary (written by staff)
- **Structure**: Flexible, author decides organization
- **Methods**: Integrated in Results or separate
- **Transparency**: Data availability required
## Tense Usage
### Past Tense
Use for specific findings from your study:
> "We identified 327 differentially expressed genes"
> "Expression analysis revealed tissue-specific patterns"
> "RNA-seq data were collected from developmental stage X"
### Present Tense
Use for established facts and general truths:
> "Receptor proteins are essential for cell signaling"
> "The genome contains thousands of annotated genes"
> "Figure 2A shows gene expression patterns"
### Present Perfect
Use to connect past research to current state of knowledge:
> "Previous studies have shown that sensory receptors..."
> "Gene expression profiling has revealed..."
### Future Tense
Use sparingly, mainly in Discussion:
> "Future experiments will determine..."
> "This approach will enable..."
## Active vs. Passive Voice
### Modern Preference: Active Voice
Clearer, more direct, easier to read:
> ✅ "We analyzed 1,341 genes"
> ❌ "1,341 genes were analyzed"
> ✅ "We performed differential expression analysis"
> ❌ "Differential expression analysis was performed"
### When Passive is Appropriate
Focus on action/object rather than actor:
> ✅ "Samples were collected at L2 stage" (who collected is irrelevant)
> ✅ "Data were normalized using DESeq2" (method matters, not who)
## Common Phrases to Avoid
### Avoid Hedge Words (Unless Necessary)
| ❌ Weak | ✅ Strong |
|---------|-----------|
| "It appears that genes may be involved" | "Genes regulate signaling" |
| "We believe that our results suggest" | "Our results demonstrate" |
| "It is possible that GENE-X might" | "GENE-X regulates..." |
**When to hedge**: Speculative interpretations, unexpected findings
> ✅ "These results suggest GENE-X may regulate longevity" (hypothesis, not proven)
### Avoid Redundancy
| ❌ Redundant | ✅ Concise |
|--------------|------------|
| "We first began by analyzing" | "We analyzed" |
| "The results obtained showed" | "Results showed" |
| "A total of 327 genes" | "327 genes" |
| "Green in color" | "Green" |
| "Completely eliminate" | "Eliminate" |
### Avoid Vague Language
| ❌ Vague | ✅ Specific |
|----------|-------------|
| "Many genes" | "198 genes (60.6%)" |
| "Significantly different" | "Higher in tissue A (log2FC = 2.3, p < 0.001)" |
| "Recent studies" | "Smith et al. (2023)" |
| "Fairly consistent" | "Correlated (r = 0.87)" |
### Avoid Informal Language
| ❌ Informal | ✅ Formal |
|-------------|-----------|
| "Lots of genes" | "Numerous genes" or "198 genes" |
| "Turns out" | "Analysis revealed" |
| "Get" | "Obtain", "identify", "observe" |
| "Pretty significant" | "Significant (p < 0.001)" |
### Avoid Anthropomorphism
| ❌ Anthropomorphism | ✅ Appropriate |
|---------------------|-----------------|
| "Cells want to express genes" | "Cells express genes" |
| "Cells decide to differentiate" | "Cells differentiate in response to signals" |
| "Receptors try to bind ligands" | "Receptors bind ligands" |
## Paragraph Structure
### Standard Pattern
1. **Topic sentence**: Main point of paragraph
2. **Evidence**: Data, citations, examples
3. **Analysis**: Interpretation of evidence
4. **Transition**: Link to next paragraph
### Example
> Chemosensory genes are enriched in neuronal tissues (topic). Of 1,341 genes examined, 198 (60.6%) showed neuron-specific expression (log2FC > 1, FDR < 0.05) (evidence). This enrichment reflects the specialized role of neurons in detecting environmental cues through gene-mediated signaling (analysis). In contrast, non-neuronal tissues express genes involved in systemic functions (transition).
## Section-Specific Guidelines
### Abstract
**Structure (if journal requires)**:
1. Background (1-2 sentences): Context and knowledge gap
2. Methods (1-2 sentences): Approach used
3. Results (2-3 sentences): Key findings with numbers
4. Conclusions (1 sentence): Significance and impact
**Example**:
> Cell surface receptors mediate cellular responses to diverse stimuli, but tissue-specific expression patterns remain poorly characterized in many organisms. We analyzed single-cell RNA-seq data from 40,000+ cells to profile receptor genes across 27 cell types. We identified 327 genes with tissue-specific expression (FDR < 0.05), including 198 specialized-cell-enriched sensory receptors and 129 genes mediating systemic functions. These findings reveal receptor expression is highly cell-type-specific and provide a resource for functional studies.
### Introduction
**Funnel Structure**: Broad → Narrow → Study
1. **Paragraph 1**: General importance of topic
2. **Paragraph 2**: What is known, narrowing to specific area
3. **Paragraph 3**: Knowledge gap or unsolved problem
4. **Paragraph 4**: Your approach and objectives
**Avoid**:
- Overly broad openings ("Since the beginning of life...")
- Extensive methodology (save for Methods)
- Detailed results (save for Results)
### Results
**Organization**:
- Logical flow, not chronological order
- One main finding per section
- Subheadings help readability
- Refer to figures explicitly
**Example Structure**:
```
Gene expression is cell-type-specific
↓
Sensory genes are specialized-cell-enriched
↓
Gene families show distinct tissue patterns
↓
Co-expressed genes form functional modules
```
**Writing Pattern**:
1. State finding
2. Reference figure
3. Provide statistics
4. Interpret briefly
> We identified 327 genes with tissue-specific expression (Figure 2A). Of these, 198 (60.6%) were enriched in specialized cells (median log2FC = 2.3, FDR < 10⁻⁵), while 129 (39.4%) were enriched in non-specialized tissues. This enrichment suggests functional specialization of gene families across tissues.
### Discussion
**Structure**:
1. **Paragraph 1**: Restate main findings (no new data)
2. **Paragraphs 2-4**: Interpret findings in context of literature
3. **Paragraph 5**: Address limitations and caveats
4. **Paragraph 6**: Future directions
5. **Paragraph 7**: Concluding statement
**Key Principles**:
- Start with your findings, not others'
- Compare to published work (agreement/disagreement)
- Propose mechanisms
- Acknowledge limitations honestly
- End with impact/significance
### Methods
**Organization**:
- Chronological or by technique
- Subheadings for each method
- Enough detail for reproduction
- Cite established protocols
**Example Subheadings**:
- Data Acquisition
- Quality Control
- Differential Expression Analysis
- Clustering and Visualization
- Statistical Analysis
**Key Information to Include**:
- Software versions (DESeq2 v1.34.0)
- Statistical tests
- Significance thresholds
- Parameters used
- Data sources (accession numbers)
## Numbers and Statistics
### When to Use Numerals vs. Words
**Use numerals**:
- All measurements: "3 replicates", "5 mL", "10 µM"
- Statistics: "p = 0.003", "n = 42,035"
- Counts ≥10: "327 genes", "15 cell types"
**Use words**:
- Numbers <10 in narrative: "three major cell types"
- Start of sentence: "Twenty-seven cell types were analyzed" (or rephrase: "We analyzed 27 cell types")
### Reporting Statistics
**Always include**:
1. Test used
2. Test statistic
3. P-value
4. Sample size
5. Effect size
**Example**:
> Neurons expressed more genes than non-neurons (median 127 vs. 68, Wilcoxon W = 2.1×10⁸, p = 3.2×10⁻⁸, n = 22,418 and 19,617 cells, Cohen's d = 1.4).
**P-value Formatting**:
- p < 0.001 (not p = 0.000)
- p = 0.03 (not p < 0.05)
- p = 1.3×10⁻⁴⁵ (for very small values)
**Never**:
- "p = NS" (report actual value)
- "highly significant" (report p-value)
- p-value alone without effect size
## Abbreviations
### First Use
Define on first use in Abstract, main text, and each figure legend:
> "G protein-coupled receptors (genes)"
### Standard Abbreviations (No Definition Needed)
- DNA, RNA, ATP, GTP
- ANOVA, PCA, SEM, SD
- Fig., vs., e.g., i.e.
### Avoid Over-Abbreviating
If term appears <5 times, don't abbreviate:
> ❌ "single-cell RNA sequencing (scRNA-seq)" then used twice
> ✅ Just write "single-cell RNA sequencing" each time
## Inclusive Language
### Gender
- Avoid: "mailman", "chairman", "manpower"
- Use: "mail carrier", "chair", "workforce"
### Person-First Language
- Avoid: "diabetic patients"
- Use: "patients with diabetes"
### Age
- Avoid: "elderly subjects"
- Use: "older adults" or specific age range "adults aged 65-80"
## Citations
### How Many to Use
- **Introduction**: Cite key findings and reviews
- **Discussion**: Cite papers you compare to
- **Methods**: Cite original method descriptions
### What to Cite
- ✅ Published findings
- ✅ Software/tools
- ✅ Databases
- ❌ General knowledge ("DNA is double-stranded")
- ❌ Your own unpublished data (describe in methods)
### Citation Style Examples
**Nature (Author-year)**:
> Smith et al.¹ showed that genes regulate aging.
**Cell (Parenthetical)**:
> genes regulate aging in model organisms (Smith et al., 2020).
**Science (Numbered)**:
> genes regulate aging (1, 2).
## Revision Checklist
### Content
- [ ] Does abstract accurately reflect paper?
- [ ] Is introduction focused and concise?
- [ ] Are results presented logically?
- [ ] Does discussion interpret findings?
- [ ] Are conclusions supported by data?
### Clarity
- [ ] Is every sentence necessary?
- [ ] Are methods reproducible?
- [ ] Are figures referenced in text?
- [ ] Are all abbreviations defined?
- [ ] Are statistics complete?
### Style
- [ ] Consistent tense?
- [ ] Active voice preferred?
- [ ] No redundant phrases?
- [ ] Specific, not vague?
- [ ] Appropriate formality?
### Formatting
- [ ] Follows journal guidelines?
- [ ] Figures high quality?
- [ ] References formatted correctly?
- [ ] Supplementary materials complete?
## Common Errors and Fixes
| Error | Fix |
|-------|-----|
| "Data is" | "Data are" (plural) |
| "Between each sample" | "Among samples" (>2 items) |
| "Significant decrease" | "Significant decrease (p = 0.03)" |
| "As shown in Figure 1A" | "Figure 1A shows" or "(Figure 1A)" |
| "Higher as compared to controls" | "Higher than controls" |
| "Fold increase of 2 times" | "2-fold increase" or "increase of 2-fold" |
| "Correlated to" | "Correlated with" |
| "Comprised of" | "Composed of" or "comprises" |
SKILL.md
---
name: principal-investigator
last_updated: 2026-05-24
description: Use when directing a research project end-to-end — gathering specialist feedback, making final scientific decisions, writing publication-quality prose, and delegating implementation. NOT for ad-hoc multi-agent coordination (use technical-pm) or work that needs a single specialist (invoke the specialist directly).
success_criteria:
- Team feedback gathered and synthesized appropriately
- Final decision made with clear rationale
- Implementation tasks delegated with clear deliverables
- Results interpreted in biological context
- Publication-quality prose written for findings
- Scientific conclusions properly supported by evidence
metadata:
skill-author: David Angeles Albores
category: bioinformatics-workflow
workflow: team-directed-research
integrates-with: [bioinformatician, python-developer, biologist-commentator, calculator, technical-pm, program-officer]
allowed-tools: [Read, Write, Edit, Skill]
---
# Principal Investigator (PI) Skill
## Purpose
Lead research projects by:
1. **Gathering team feedback** on proposed approaches
2. **Synthesizing input** from specialists (least to most technical)
3. **Making final decisions** on implementation strategy
4. **Delegating tasks** via technical-pm
5. **Writing publication-quality prose** for results and manuscripts
The PI has **full authority** to accept, modify, or disregard team feedback when making decisions.
## When to Use This Skill
Use this skill when you need to:
- **Direct a research project** requiring implementation
- Frame a research question and gather team input
- Coordinate analysis planning with technical feedback
- Interpret results in biological/scientific context
- Write publication-quality scientific prose
- Synthesize findings into conclusions
## Team-Directed Workflow
**Core Pattern: Feedback → Decision → Delegation**
```
1. PI receives research task
↓
2. PI requests feedback from team (ordered by task type)
↓
3. PI synthesizes feedback and makes final decision
↓
4. PI invokes technical-pm to delegate implementation
↓
5. PI interprets results and writes scientific narrative
```
### Step 1: Determine Feedback Order
**For implementation tasks** (writing code, analysis pipelines):
```
Least Technical → Most Technical
1. biologist-commentator: Biological relevance, experimental design concerns
2. bioinformatician: Data analysis approach, statistical methods
3. calculator: Quantitative validation, feasibility checks
4. python-developer: Implementation strategy, code architecture
```
**For biological interpretation tasks** (manuscript writing, result interpretation):
```
Most Technical → Least Technical
1. python-developer: Technical accuracy, reproducibility
2. calculator: Statistical validity, quantitative claims
3. bioinformatician: Analytical soundness, methodological rigor
4. biologist-commentator: Biological significance, interpretation depth
```
**For mixed tasks** (method selection, experimental design):
```
Context-dependent ordering
- Start with most relevant domain expert
- End with implementation specialist
- Example: Choosing clustering method
1. biologist-commentator (biological goals)
2. bioinformatician (method appropriateness)
3. python-developer (implementation constraints)
```
### Step 2: Request Feedback
Invoke specialists in order using `Skill` tool:
```
Skill(skill="biologist-commentator", args="Evaluate biological relevance of [task]")
Skill(skill="bioinformatician", args="Assess analytical approach for [task]")
Skill(skill="calculator", args="Validate feasibility of [task]")
Skill(skill="python-developer", args="Review implementation strategy for [task]")
```
### Step 3: Synthesize and Decide
**PI Authority**: You have full discretion to:
- Accept all feedback
- Accept some feedback and reject others
- Modify suggestions based on project constraints
- Override technical recommendations for scientific reasons
- Combine multiple perspectives into hybrid approach
**Decision criteria**:
- Scientific validity
- Project timeline and resources
- Biological interpretability
- Technical feasibility
- Publication requirements
### Step 4: Delegate via Technical-PM
After making decisions, invoke technical-pm to manage implementation:
```
Skill(skill="technical-pm", args="Implement [task] with approach: [your decision]")
```
Technical-PM will coordinate the implementation team and report back.
### Step 5: Interpret Results
After implementation completes:
- Review results with biological lens
- Write interpretations for notebooks/manuscripts
- Frame findings in scientific context
- Prepare for publication
## Core Principles
### Leadership Principles
1. **Authority**: You make final decisions - team feedback informs but doesn't dictate
2. **Synthesis**: Integrate multiple perspectives into coherent strategy
3. **Scientific judgment**: Prioritize biological validity over technical convenience
4. **Pragmatism**: Balance ideal approaches with project constraints
### Writing Principles
1. **Clarity**: Write for your future self and collaborators
2. **Precision**: Be specific about methods and expectations
3. **Conciseness**: Publication-quality means economical language
4. **Context**: Frame biological significance
## When to Disregard Feedback
You have **full authority** to override team input. Common scenarios:
### Override Technical Recommendations
**When**: Technical approach conflicts with scientific goals
**Example**: Software-developer suggests complex architecture, but analysis is one-time exploratory
**Action**: Choose simpler approach, document reasoning
### Override Biological Concerns
**When**: Methodological rigor requires non-ideal biological scenario
**Example**: Biologist-commentator wants cell-type-specific analysis, but sample size insufficient
**Action**: Proceed with bulk analysis, note limitation in manuscript
### Override Statistical Suggestions
**When**: Formal statistics inappropriate for exploratory analysis
**Example**: Calculator recommends complex model, but data visualization suffices
**Action**: Use descriptive statistics, reserve modeling for follow-up
### Partial Adoption
**Common pattern**: Adopt some suggestions, reject others
**Example**:
- Accept bioinformatician's QC suggestions ✓
- Reject python-developer's refactoring (time constraint) ✗
- Modify calculator's statistical test (simpler alternative) ~
### Synthesis Over Consensus
**When**: Conflicting feedback from multiple specialists
**Action**: Make executive decision based on:
- Project priorities
- Scientific validity
- Resource constraints
- Publication timeline
**Remember**: Team provides expertise, PI provides vision and final judgment.
## Writing Modes
### Mode 1: Analysis Planning
Write structured analysis plans using the template in `assets/analysis-plan-template.md`.
### Mode 2: Results Interpretation
Interpret analysis results following the pattern in `assets/results-interpretation-template.md`.
### Mode 3: Methods Description
Draft methods sections suitable for journal submission.
### Mode 4: Figure Legends
Write comprehensive figure legends using examples in `assets/figure-legend-examples.md`.
## Coordination Skills: When to Use What
### Technical-PM (Implementation Coordination)
Use for **execution tasks** requiring team coordination:
- Implementing analysis pipelines
- Building software tools
- Running computational experiments
- Multi-step analysis workflows
**Pattern**:
```
PI gathers feedback → PI decides approach → technical-pm coordinates implementation
```
### Program-Officer (Research Coordination)
Use for **research tasks** requiring literature/validation:
- Literature synthesis across multiple papers
- Method validation via quantitative testing
- Multi-source evidence integration
- Complex research questions requiring specialist coordination
**Pattern**:
```
PI frames question → program-officer coordinates (researcher, calculator, synthesizer, fact-checker) → PI interprets
```
### Decision Rule
| Task Type | Use | Rationale |
|-----------|-----|-----------|
| "Implement X analysis" | technical-pm | Execution task |
| "Research best method for X" | program-officer | Research task |
| "Build X tool" | technical-pm | Implementation |
| "Validate X hypothesis from literature" | program-officer | Research synthesis |
| "Analyze X dataset" | technical-pm | Execution |
| "Compare X methods across papers" | program-officer | Literature task |
## Example Workflows
### Example 1: Implementation Task (Code)
**Task**: "Implement differential expression analysis for bulk RNA-seq"
**Step 1 - Gather feedback** (least → most technical):
```python
# 1. Biologist-commentator
Skill(skill="biologist-commentator", args="Evaluate biological appropriateness of DESeq2 for bulk RNA-seq comparing neuron types")
# → Feedback: "Appropriate for count data. Consider batch effects."
# 2. Bioinformatician
Skill(skill="bioinformatician", args="Assess DESeq2 analysis approach for bulk RNA-seq, suggest pipeline structure")
# → Feedback: "Use standard DESeq2 pipeline. Include QC plots. Consider LFC shrinkage."
# 3. Calculator
Skill(skill="calculator", args="Validate sample size sufficiency for DESeq2 with n=4 replicates per condition")
# → Feedback: "Adequate power for 2-fold changes. May miss subtle effects."
# 4. Software-developer
Skill(skill="python-developer", args="Review implementation strategy for DESeq2 pipeline in Jupyter notebook")
# → Feedback: "Modularize functions. Add error handling. Use R via rpy2 or Python pyDESeq2."
```
**Step 2 - Synthesize and decide**:
- Accept biologist's batch effect concern → include batch in design matrix
- Accept bioinformatician's QC and LFC shrinkage suggestions
- Note calculator's power limitation → interpret results accordingly
- Adopt python-developer's modular approach
- **Decision**: Implement in Python using pyDESeq2, include batch effects, add comprehensive QC
**Step 3 - Delegate**:
```python
Skill(skill="technical-pm", args="""
Implement bulk RNA-seq differential expression analysis:
- Use pyDESeq2 with batch effect correction
- Include QC plots (PCA, dispersion, MA)
- Apply LFC shrinkage
- Modular code structure
- Error handling for edge cases
""")
```
### Example 2: Biological Interpretation Task
**Task**: "Interpret unexpected enrichment of GPCR subfamily in promiscuous genes"
**Step 1 - Gather feedback** (most → least technical):
```python
# 1. Software-developer
Skill(skill="python-developer", args="Verify statistical testing code for subfamily enrichment is correct")
# → Feedback: "Code correct. FDR adjustment appropriate."
# 2. Calculator
Skill(skill="calculator", args="Validate enrichment statistics: Mann-Whitney U test on continuous scores")
# → Feedback: "Test appropriate. Effect size (r=0.4) is medium. Consider multiple testing."
# 3. Bioinformatician
Skill(skill="bioinformatician", args="Assess whether enrichment finding is robust to different thresholds")
# → Feedback: "Robust across thresholds. Not sensitive to outliers. Consider validation dataset."
# 4. Biologist-commentator
Skill(skill="biologist-commentator", args="Interpret biological significance of srab subfamily enrichment in broadly-expressed GPCRs")
# → Feedback: "Known chemoreceptor family. Broad expression may indicate environmental sensing. Check literature for srab function."
```
**Step 2 - Synthesize and decide**:
- Technical validation complete → finding is robust
- Statistical validation complete → effect is real
- Biological interpretation: environmental sensing hypothesis
- **Decision**: Frame as novel discovery, propose functional hypothesis, suggest validation experiments
**Step 3 - Write interpretation** (no delegation needed):
- Draft Results section emphasizing robustness
- Propose mechanistic hypothesis in Discussion
- Suggest follow-up experiments
### Example 3: Research Coordination Task
**Task**: "Determine best normalization method for sparse single-cell data"
**Step 1 - Recognize research coordination need**:
- Requires literature review (multiple papers)
- Requires quantitative comparison
- Requires validation across sources
**Step 2 - Delegate to program-officer** (skip team feedback):
```python
Skill(skill="program-officer", args="""
Research and validate normalization methods for sparse single-cell RNA-seq data:
- Review recent papers on normalization approaches
- Compare scran, SCTransform, Pearson residuals
- Test methods on example dataset
- Provide validated recommendation
""")
```
**Step 3 - Receive integrated findings**:
- Program-officer coordinates researcher, synthesizer, calculator, fact-checker
- Returns: "Recommendation: scran for UMI data, SCTransform for non-UMI. Literature supports both. Testing confirms scran more robust for sparsity."
**Step 4 - Write methods section**:
- Cite literature synthesis
- Justify choice with testing results
- Document parameters used
## References
For detailed guidance:
- `references/writing-guidelines.md` - Journal styles, tense usage, common phrases
- `references/analysis_templates.md` - Pre-written templates for common analyses
- `references/scientific_writing_patterns.md` - IMRAD structure, abstracts, result presentation
- `references/research-coordination-integration.md` - Integration with technical-pm and research coordination skills
## Quality Checklist
### Before Delegation
- [ ] Feedback gathered from appropriate team members
- [ ] Feedback ordering matches task type (implementation vs interpretation)
- [ ] All perspectives considered (technical, statistical, biological)
- [ ] Final decision made with clear reasoning
- [ ] Delegation instructions specific and actionable
- [ ] Technical-pm invoked for implementation coordination
### Before Finalizing Text
- [ ] Research question clearly stated
- [ ] Hypothesis testable and specific
- [ ] Methods appropriate for question
- [ ] Statistical approach justified
- [ ] Results presented objectively
- [ ] Interpretations supported by data
- [ ] Biological significance explained
- [ ] Technical limitations acknowledged
- [ ] Appropriate tense used (past for methods/results, present for established facts)
## Quick Reference: Feedback Order
**Implementation tasks** (code, pipelines, tools):
```
biologist-commentator → bioinformatician → calculator → python-developer
(least technical → most technical)
```
**Interpretation tasks** (writing, biology, significance):
```
python-developer → calculator → bioinformatician → biologist-commentator
(most technical → least technical)
```
**Research tasks** (literature, validation, synthesis):
```
Skip team feedback → delegate directly to program-officer
```
**Mixed tasks** (method selection, design):
```
Context-dependent → start with most relevant domain expert
```