deep-research-client 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- deep_research_client-0.1.0/.claude/skills/README.md +78 -0
- deep_research_client-0.1.0/.claude/skills/gene-set-enrichment/SKILL.md +231 -0
- deep_research_client-0.1.0/.claude/skills/gene-set-enrichment/examples/enrichment_template.md +22 -0
- deep_research_client-0.1.0/.claude/skills/run-deep-research/SKILL.md +220 -0
- deep_research_client-0.1.0/.claude/skills/run-deep-research/examples/gene_research.md +38 -0
- deep_research_client-0.1.0/.copier-answers.yml +14 -0
- deep_research_client-0.1.0/.editorconfig +18 -0
- deep_research_client-0.1.0/.github/actions/claude-code-action/action.yml +167 -0
- deep_research_client-0.1.0/.github/actions/claude-issue-summarize-action/action.yml +74 -0
- deep_research_client-0.1.0/.github/actions/claude-issue-triage-action/action.yml +91 -0
- deep_research_client-0.1.0/.github/ai-controllers.json +1 -0
- deep_research_client-0.1.0/.github/copilot-setup-steps.yml +40 -0
- deep_research_client-0.1.0/.github/dependabot.yml +9 -0
- deep_research_client-0.1.0/.github/workflows/ai.yml +183 -0
- deep_research_client-0.1.0/.github/workflows/claude-code-review.yml +78 -0
- deep_research_client-0.1.0/.github/workflows/claude-issue-summarize.yml +25 -0
- deep_research_client-0.1.0/.github/workflows/claude-issue-triage.yml +24 -0
- deep_research_client-0.1.0/.github/workflows/claude-ontology-review.yml +115 -0
- deep_research_client-0.1.0/.github/workflows/claude.yml +96 -0
- deep_research_client-0.1.0/.github/workflows/deploy-docs.yaml +57 -0
- deep_research_client-0.1.0/.github/workflows/dragon-ai.yml +188 -0
- deep_research_client-0.1.0/.github/workflows/main.yaml +55 -0
- deep_research_client-0.1.0/.github/workflows/pypi-publish.yaml +35 -0
- deep_research_client-0.1.0/.gitignore +142 -0
- deep_research_client-0.1.0/.pre-commit-config.yaml +45 -0
- deep_research_client-0.1.0/.yamllint.yaml +12 -0
- deep_research_client-0.1.0/AGENTS.md +45 -0
- deep_research_client-0.1.0/CLAUDE.md +1 -0
- deep_research_client-0.1.0/CODE_OF_CONDUCT.md +76 -0
- deep_research_client-0.1.0/CONTRIBUTING.md +218 -0
- deep_research_client-0.1.0/PKG-INFO +687 -0
- deep_research_client-0.1.0/README.md +670 -0
- deep_research_client-0.1.0/ai.just +49 -0
- deep_research_client-0.1.0/docs/about.md +3 -0
- deep_research_client-0.1.0/docs/elements/.gitkeep +0 -0
- deep_research_client-0.1.0/docs/index.md +5 -0
- deep_research_client-0.1.0/docs/templates-linkml/README.md +7 -0
- deep_research_client-0.1.0/docs/templates.md +367 -0
- deep_research_client-0.1.0/examples/README.md +9 -0
- deep_research_client-0.1.0/examples/gene_research_template.md +57 -0
- deep_research_client-0.1.0/justfile +114 -0
- deep_research_client-0.1.0/mkdocs.yml +30 -0
- deep_research_client-0.1.0/mypy.ini +17 -0
- deep_research_client-0.1.0/project.justfile +1 -0
- deep_research_client-0.1.0/ptest16.md +98 -0
- deep_research_client-0.1.0/pyproject.toml +87 -0
- deep_research_client-0.1.0/pytest.ini +8 -0
- deep_research_client-0.1.0/src/deep_research_client/__init__.py +43 -0
- deep_research_client-0.1.0/src/deep_research_client/_version.py +8 -0
- deep_research_client-0.1.0/src/deep_research_client/cache.py +124 -0
- deep_research_client-0.1.0/src/deep_research_client/cli.py +437 -0
- deep_research_client-0.1.0/src/deep_research_client/client.py +248 -0
- deep_research_client-0.1.0/src/deep_research_client/formatter.py +112 -0
- deep_research_client-0.1.0/src/deep_research_client/model_cards.py +477 -0
- deep_research_client-0.1.0/src/deep_research_client/models.py +45 -0
- deep_research_client-0.1.0/src/deep_research_client/processing/__init__.py +11 -0
- deep_research_client-0.1.0/src/deep_research_client/processing/processor.py +108 -0
- deep_research_client-0.1.0/src/deep_research_client/processing/result_formatter.py +112 -0
- deep_research_client-0.1.0/src/deep_research_client/processing/template_processor.py +392 -0
- deep_research_client-0.1.0/src/deep_research_client/provider_params.py +200 -0
- deep_research_client-0.1.0/src/deep_research_client/providers/__init__.py +110 -0
- deep_research_client-0.1.0/src/deep_research_client/providers/consensus.py +251 -0
- deep_research_client-0.1.0/src/deep_research_client/providers/falcon.py +167 -0
- deep_research_client-0.1.0/src/deep_research_client/providers/mock.py +133 -0
- deep_research_client-0.1.0/src/deep_research_client/providers/openai.py +117 -0
- deep_research_client-0.1.0/src/deep_research_client/providers/perplexity.py +158 -0
- deep_research_client-0.1.0/src/deep_research_client/system_prompts.py +14 -0
- deep_research_client-0.1.0/src/deep_research_client/templates.py +158 -0
- deep_research_client-0.1.0/templates/gene_family.md +4 -0
- deep_research_client-0.1.0/templates/gene_frontmatter.md +10 -0
- deep_research_client-0.1.0/templates/gene_jinja.md.j2 +9 -0
- deep_research_client-0.1.0/tests/__init__.py +1 -0
- deep_research_client-0.1.0/tests/test_cache_hashing.py +248 -0
- deep_research_client-0.1.0/tests/test_client.py +218 -0
- deep_research_client-0.1.0/tests/test_consensus_provider.py +146 -0
- deep_research_client-0.1.0/tests/test_model_cards.py +368 -0
- deep_research_client-0.1.0/tests/test_models.py +135 -0
- deep_research_client-0.1.0/tests/test_simple.py +6 -0
- deep_research_client-0.1.0/tests/test_templates.py +409 -0
- deep_research_client-0.1.0/tests/test_templates_new.py +67 -0
- deep_research_client-0.1.0/uv.lock +4192 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Deep Research Client Skills
|
|
2
|
+
|
|
3
|
+
This directory contains Claude Code skills for the deep-research-client project.
|
|
4
|
+
|
|
5
|
+
## Available Skills
|
|
6
|
+
|
|
7
|
+
### run-deep-research
|
|
8
|
+
|
|
9
|
+
A comprehensive skill for performing deep research using multiple AI research providers (OpenAI, Falcon, Perplexity, Consensus).
|
|
10
|
+
|
|
11
|
+
**Key Features:**
|
|
12
|
+
- Support for multiple research providers with different speed/depth trade-offs
|
|
13
|
+
- Smart caching to avoid expensive re-queries
|
|
14
|
+
- Template-based research with variable substitution
|
|
15
|
+
- Rich markdown output with citations and metadata
|
|
16
|
+
|
|
17
|
+
**Installation:**
|
|
18
|
+
|
|
19
|
+
To use this skill locally:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# Copy the skill to your local skills directory
|
|
23
|
+
cp -r .claude/skills/run-deep-research ~/.claude/skills/
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Or to use it project-wide, it's already available in `.claude/skills/run-deep-research/`.
|
|
27
|
+
|
|
28
|
+
**Usage:**
|
|
29
|
+
|
|
30
|
+
Once installed, Claude Code will automatically use this skill when you request deep research tasks. The skill will:
|
|
31
|
+
|
|
32
|
+
1. Ask you to choose between fast/light or comprehensive/slow approaches
|
|
33
|
+
2. Help you select the appropriate provider and model
|
|
34
|
+
3. Execute the research query
|
|
35
|
+
4. Save results with proper citations and metadata
|
|
36
|
+
|
|
37
|
+
**Example prompts that trigger this skill:**
|
|
38
|
+
- "Research the latest developments in CRISPR gene editing"
|
|
39
|
+
- "I need a comprehensive analysis of quantum computing trends"
|
|
40
|
+
- "Do a literature review on machine learning interpretability"
|
|
41
|
+
- "Research gene TP53 in humans focusing on cancer associations"
|
|
42
|
+
|
|
43
|
+
## Adding More Skills
|
|
44
|
+
|
|
45
|
+
To add additional skills to this project:
|
|
46
|
+
|
|
47
|
+
1. **Simple skill**: Create a single `.md` file like `skill-name.md` with YAML frontmatter:
|
|
48
|
+
```yaml
|
|
49
|
+
---
|
|
50
|
+
name: your-skill-name
|
|
51
|
+
description: Brief description of what your skill does (200 char max)
|
|
52
|
+
---
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
2. **Complex skill** (with templates/examples): Create a directory with `SKILL.md`:
|
|
56
|
+
```
|
|
57
|
+
.claude/skills/skill-name/
|
|
58
|
+
├── SKILL.md # Main skill with YAML frontmatter
|
|
59
|
+
└── examples/ # Optional supporting files
|
|
60
|
+
└── template.md
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
3. Add the skill instructions and documentation in the markdown body
|
|
64
|
+
|
|
65
|
+
## Skill Development Guidelines
|
|
66
|
+
|
|
67
|
+
When creating skills for this project:
|
|
68
|
+
|
|
69
|
+
- Follow the YAML frontmatter format with `name` and `description`
|
|
70
|
+
- Include clear "When to Use" sections
|
|
71
|
+
- Provide concrete usage examples with `uv run` commands
|
|
72
|
+
- Document all environment variables and configuration
|
|
73
|
+
- Include workflow steps for Claude to follow
|
|
74
|
+
- Add common patterns and use cases
|
|
75
|
+
|
|
76
|
+
## License
|
|
77
|
+
|
|
78
|
+
Skills in this directory are part of the deep-research-client project and follow the same BSD-3-Clause license.
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gene-set-enrichment
|
|
3
|
+
description: Perform gene set enrichment analysis using AI research providers. Analyzes lists of genes to identify biological themes, pathways, and functional associations.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# gene-set-enrichment
|
|
7
|
+
|
|
8
|
+
Toolkit for performing gene set enrichment analysis on lists of genes using AI research providers. Identifies biological themes, pathways, diseases, and functional relationships within gene sets.
|
|
9
|
+
|
|
10
|
+
## When to Use
|
|
11
|
+
|
|
12
|
+
Use this skill when:
|
|
13
|
+
- The user provides a list of genes and wants to understand what they have in common
|
|
14
|
+
- The user needs pathway or functional enrichment analysis
|
|
15
|
+
- The user wants to identify biological themes in differential expression results
|
|
16
|
+
- The user needs to understand disease associations for a gene set
|
|
17
|
+
- The user has genomic analysis results and wants biological interpretation
|
|
18
|
+
|
|
19
|
+
## Default Configuration
|
|
20
|
+
|
|
21
|
+
**This skill uses HEAVYWEIGHT mode by default:**
|
|
22
|
+
- **Provider**: Perplexity
|
|
23
|
+
- **Model**: `sonar-deep-research`
|
|
24
|
+
- **Rationale**: Extensive research is required to give meaningful results.
|
|
25
|
+
|
|
26
|
+
Users can override to use comprehensive mode if needed for publication-quality analysis.
|
|
27
|
+
|
|
28
|
+
## Features
|
|
29
|
+
|
|
30
|
+
- **Pathway Analysis**: Identifies enriched biological pathways
|
|
31
|
+
- **Disease Associations**: Finds disease connections for gene sets
|
|
32
|
+
- **Functional Themes**: Discovers common biological functions
|
|
33
|
+
- **Tissue Specificity**: Analyzes expression patterns across tissues
|
|
34
|
+
- **Drug Targets**: Identifies potential therapeutic connections
|
|
35
|
+
- **Template-Based**: Reusable template with space-separated gene lists
|
|
36
|
+
|
|
37
|
+
## Required Environment Variables
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# At least one is required:
|
|
41
|
+
export PERPLEXITY_API_KEY="your-perplexity-key" # Recommended for speed
|
|
42
|
+
export OPENAI_API_KEY="your-openai-key" # For comprehensive analysis
|
|
43
|
+
export FUTUREHOUSE_API_KEY="your-futurehouse-key" # For scientific literature
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Basic Usage
|
|
47
|
+
|
|
48
|
+
### Using the Template (Recommended)
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Quick enrichment analysis
|
|
52
|
+
uv run deep-research-client research \
|
|
53
|
+
--template .claude/skills/gene-set-enrichment/examples/enrichment_template.md \
|
|
54
|
+
--var "geneset=APOH APP COL3A1 VEGFA THBD" \
|
|
55
|
+
--var "organism=human" \
|
|
56
|
+
--provider perplexity \
|
|
57
|
+
--model sonar-deep-research \
|
|
58
|
+
--output enrichment_results.md
|
|
59
|
+
|
|
60
|
+
# Comprehensive analysis (slower, more detailed)
|
|
61
|
+
uv run deep-research-client research \
|
|
62
|
+
--template .claude/skills/gene-set-enrichment/examples/enrichment_template.md \
|
|
63
|
+
--var "geneset=APOH APP COL3A1 VEGFA THBD" \
|
|
64
|
+
--var "organism=human" \
|
|
65
|
+
--provider openai \
|
|
66
|
+
--output enrichment_detailed.md
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Direct Query (No Template)
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
uv run deep-research-client research \
|
|
73
|
+
"Perform gene set enrichment analysis on: APOH APP COL3A1 VEGFA THBD. Identify common pathways, biological processes, and disease associations." \
|
|
74
|
+
--provider perplexity \
|
|
75
|
+
--model sonar-deep-research \
|
|
76
|
+
--output quick_enrichment.md
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Template Variables
|
|
80
|
+
|
|
81
|
+
The enrichment template accepts:
|
|
82
|
+
|
|
83
|
+
- `{geneset}` - **Space-separated** list of gene symbols (e.g., "APOH APP VEGFA")
|
|
84
|
+
- `{organism}` - Organism name (e.g., "human", "mouse", "rat")
|
|
85
|
+
- `{context}` - Optional: Study context (e.g., "upregulated in heart disease", "differentially expressed in cancer")
|
|
86
|
+
|
|
87
|
+
## Workflow
|
|
88
|
+
|
|
89
|
+
1. **Prepare gene list**: Convert gene list to space-separated format
|
|
90
|
+
2. **Choose analysis mode**:
|
|
91
|
+
- Fast (sonar-pro): Quick exploratory analysis
|
|
92
|
+
- Comprehensive (openai): Publication-quality detailed analysis
|
|
93
|
+
3. **Run template**: Use template with geneset variable
|
|
94
|
+
4. **Review results**: Check identified pathways, functions, diseases
|
|
95
|
+
5. **Iterate**: Refine analysis based on initial results
|
|
96
|
+
|
|
97
|
+
## Output Format
|
|
98
|
+
|
|
99
|
+
Results include:
|
|
100
|
+
|
|
101
|
+
- **Enriched Pathways**: KEGG, Reactome, WikiPathways
|
|
102
|
+
- **Biological Processes**: GO terms and functional categories
|
|
103
|
+
- **Disease Associations**: OMIM, disease databases
|
|
104
|
+
- **Tissue Expression**: Where genes are co-expressed
|
|
105
|
+
- **Protein Interactions**: Known interaction networks
|
|
106
|
+
- **Drug Connections**: Therapeutic targets and compounds
|
|
107
|
+
- **Citations**: Links to relevant databases and publications
|
|
108
|
+
|
|
109
|
+
## Example Gene Sets
|
|
110
|
+
|
|
111
|
+
### Cardiovascular/ECM Example (36 genes)
|
|
112
|
+
```
|
|
113
|
+
APOH APP CND2 COL3A1 COL5A2 CXCL6 FGFR1 FSTL1 ITGAV JAG1 JAG2 KCNJ8 LPL LRPAP1 LUM MSX1 NRP1 OLR1 PDGFA PF4 PGLYRP1 POSTN PRG2 PTK2 S100A4 SERPINA5 SLCO2A1 SPP1 STC1 THBD TIMP1 TNFRSF21 VAV2 VCAN VEGFA VTN
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
This set appears enriched for:
|
|
117
|
+
- Extracellular matrix organization
|
|
118
|
+
- Cardiovascular development
|
|
119
|
+
- Angiogenesis and vascular remodeling
|
|
120
|
+
- Cell adhesion and migration
|
|
121
|
+
|
|
122
|
+
### Small Test Set
|
|
123
|
+
```
|
|
124
|
+
TP53 BRCA1 BRCA2 PTEN RB1
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Cancer-related tumor suppressors for testing.
|
|
128
|
+
|
|
129
|
+
## Common Patterns
|
|
130
|
+
|
|
131
|
+
### Quick exploratory enrichment
|
|
132
|
+
```bash
|
|
133
|
+
uv run deep-research-client research \
|
|
134
|
+
--template .claude/skills/gene-set-enrichment/examples/enrichment_template.md \
|
|
135
|
+
--var "geneset=GENE1 GENE2 GENE3" \
|
|
136
|
+
--var "organism=human" \
|
|
137
|
+
--provider perplexity \
|
|
138
|
+
--model sonar-pro
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Context-specific enrichment
|
|
142
|
+
```bash
|
|
143
|
+
uv run deep-research-client research \
|
|
144
|
+
--template .claude/skills/gene-set-enrichment/examples/enrichment_template.md \
|
|
145
|
+
--var "geneset=GENE1 GENE2 GENE3" \
|
|
146
|
+
--var "organism=human" \
|
|
147
|
+
--var "context=upregulated in diabetic cardiomyopathy" \
|
|
148
|
+
--var "focus=cardiac remodeling pathways"
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Comprehensive publication-quality
|
|
152
|
+
```bash
|
|
153
|
+
uv run deep-research-client research \
|
|
154
|
+
--template .claude/skills/gene-set-enrichment/examples/enrichment_template.md \
|
|
155
|
+
--var "geneset=GENE1 GENE2 GENE3" \
|
|
156
|
+
--var "organism=human" \
|
|
157
|
+
--provider openai
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Tips for Best Results
|
|
161
|
+
|
|
162
|
+
1. **Gene Symbol Format**: Use official gene symbols (HUGO for human, MGI for mouse)
|
|
163
|
+
2. **List Size**: Works best with 10-500 genes
|
|
164
|
+
- Too few (<5): Limited statistical power
|
|
165
|
+
- Too many (>1000): May be too broad
|
|
166
|
+
3. **Organism**: Specify organism to avoid ambiguity
|
|
167
|
+
4. **Context**: Add experimental context for more relevant results
|
|
168
|
+
5. **Iteration**: Start with fast mode, then use comprehensive for final analysis
|
|
169
|
+
6. **Caching**: Results are cached - use `--no-cache` to force re-analysis with updated databases
|
|
170
|
+
|
|
171
|
+
## Integration with Analysis Pipelines
|
|
172
|
+
|
|
173
|
+
### From differential expression results
|
|
174
|
+
```python
|
|
175
|
+
# Python example: extract top genes
|
|
176
|
+
import pandas as pd
|
|
177
|
+
|
|
178
|
+
# Load DEG results
|
|
179
|
+
degs = pd.read_csv("deg_results.csv")
|
|
180
|
+
top_genes = degs[degs['padj'] < 0.05].head(50)['gene_symbol'].tolist()
|
|
181
|
+
geneset = " ".join(top_genes)
|
|
182
|
+
|
|
183
|
+
# Use with template
|
|
184
|
+
print(f"--var \"geneset={geneset}\"")
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### From genomic analysis
|
|
188
|
+
```bash
|
|
189
|
+
# Extract gene symbols from analysis output
|
|
190
|
+
cut -f1 significant_genes.txt | tr '\n' ' ' > geneset.txt
|
|
191
|
+
|
|
192
|
+
# Use in template
|
|
193
|
+
uv run deep-research-client research \
|
|
194
|
+
--template .claude/skills/gene-set-enrichment/examples/enrichment_template.md \
|
|
195
|
+
--var "geneset=$(cat geneset.txt)" \
|
|
196
|
+
--var "organism=human"
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
## Comparison with Traditional Tools
|
|
200
|
+
|
|
201
|
+
This AI-based approach complements traditional enrichment tools (DAVID, Enrichr, g:Profiler):
|
|
202
|
+
|
|
203
|
+
**Advantages:**
|
|
204
|
+
- Natural language interpretation
|
|
205
|
+
- Integrated cross-database search
|
|
206
|
+
- Literature context and recent discoveries
|
|
207
|
+
- Flexible, conversational analysis
|
|
208
|
+
|
|
209
|
+
**Traditional Tools Still Better For:**
|
|
210
|
+
- Precise statistical p-values
|
|
211
|
+
- Large-scale batch processing
|
|
212
|
+
- Specific database versions
|
|
213
|
+
- Reproducible computational workflows
|
|
214
|
+
|
|
215
|
+
**Best Practice**: Use both approaches:
|
|
216
|
+
1. Run traditional enrichment for statistics
|
|
217
|
+
2. Use this skill for biological interpretation and context
|
|
218
|
+
|
|
219
|
+
## Important Notes
|
|
220
|
+
|
|
221
|
+
- **Default is fast mode**: Uses sonar-pro for quick results
|
|
222
|
+
- **Gene symbols**: Use standard nomenclature (HGNC for human)
|
|
223
|
+
- **List format**: Space-separated gene symbols in the template variable
|
|
224
|
+
- **Caching**: Results cached by gene set and provider
|
|
225
|
+
- **Updates**: AI models have knowledge cutoff - very recent discoveries may not be included
|
|
226
|
+
- **Validation**: Cross-reference with traditional enrichment tools for important findings
|
|
227
|
+
|
|
228
|
+
## Related Skills
|
|
229
|
+
|
|
230
|
+
- **run-deep-research**: For individual gene deep-dive analysis
|
|
231
|
+
- Custom analysis workflows can combine both skills
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Gene Set Enrichment Analysis
|
|
2
|
+
|
|
3
|
+
Please perform a comprehensive gene set enrichment analysis on the following list of genes from {organism}.
|
|
4
|
+
|
|
5
|
+
## Gene Set
|
|
6
|
+
|
|
7
|
+
{geneset}
|
|
8
|
+
|
|
9
|
+
## Analysis Context
|
|
10
|
+
|
|
11
|
+
{context}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## Output Requirements
|
|
15
|
+
|
|
16
|
+
Please provide:
|
|
17
|
+
|
|
18
|
+
- **Summary**: 2-3 sentence overview of the main biological themes
|
|
19
|
+
- **Top Pathways**: List of most significant pathways with descriptions
|
|
20
|
+
- **Biological Interpretation**: Integrated biological interpretation of the gene set
|
|
21
|
+
- **Literature Support**: Recent relevant publications (last 5 years preferred)
|
|
22
|
+
- **Database Links**: Links to relevant pathway/disease databases where appropriate
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: run-deep-research
|
|
3
|
+
description: Toolkit for performing deep research on complex topics using multiple AI research providers (OpenAI, Falcon, Perplexity, Consensus). Emphasizes explicit speed vs depth trade-offs.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# run-deep-research
|
|
7
|
+
|
|
8
|
+
Toolkit for performing deep research on complex topics using multiple AI research providers including OpenAI Deep Research, FutureHouse Falcon, Perplexity AI, and Consensus AI.
|
|
9
|
+
|
|
10
|
+
## When to Use
|
|
11
|
+
|
|
12
|
+
Use this skill when:
|
|
13
|
+
- The user requests comprehensive research on a topic
|
|
14
|
+
- The user needs citations and sources for their research
|
|
15
|
+
- The user wants to explore scientific literature or academic papers
|
|
16
|
+
- The user needs structured markdown reports with metadata
|
|
17
|
+
|
|
18
|
+
## CRITICAL: Speed vs Depth Trade-offs
|
|
19
|
+
|
|
20
|
+
**ALWAYS** ask the user to be explicit about their approach preference:
|
|
21
|
+
|
|
22
|
+
### Fast/Light Approach (seconds to complete)
|
|
23
|
+
- **Provider**: Perplexity
|
|
24
|
+
- **Models**: `sonar`, `sonar-pro`, `sonar-reasoning`, `sonar-reasoning-pro`
|
|
25
|
+
- **Use when**: Quick answers, initial exploration, time-sensitive queries
|
|
26
|
+
- **Cost**: Lower API costs
|
|
27
|
+
- **Example**:
|
|
28
|
+
```bash
|
|
29
|
+
uv run deep-research-client research "What is CRISPR?" --provider perplexity --model sonar-pro
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Comprehensive/Slow Approach (minutes to complete)
|
|
33
|
+
- **Provider**: Perplexity with deep research model, or OpenAI
|
|
34
|
+
- **Models**: `sonar-deep-research` (Perplexity), `o3-deep-research-2025-06-26` (OpenAI)
|
|
35
|
+
- **Use when**: Thorough analysis needed, critical decisions, comprehensive reports
|
|
36
|
+
- **Cost**: Higher API costs and longer wait times
|
|
37
|
+
- **Example**:
|
|
38
|
+
```bash
|
|
39
|
+
uv run deep-research-client research "What is CRISPR?" --provider perplexity --model sonar-deep-research
|
|
40
|
+
```
|
|
41
|
+
or
|
|
42
|
+
```bash
|
|
43
|
+
uv run deep-research-client research "What is CRISPR?" --provider openai
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Specialized Approaches
|
|
47
|
+
- **Scientific Literature**: Use `falcon` provider for academic/scientific focus
|
|
48
|
+
- **Academic Papers**: Use `consensus` provider for peer-reviewed research (requires API approval)
|
|
49
|
+
|
|
50
|
+
## Features
|
|
51
|
+
|
|
52
|
+
- **Multiple Providers**: OpenAI Deep Research, FutureHouse Falcon, Perplexity AI, Consensus AI
|
|
53
|
+
- **Rich Output**: Comprehensive markdown reports with citations and YAML frontmatter metadata
|
|
54
|
+
- **Smart Caching**: File-based caching in `~/.deep_research_cache/` to avoid expensive re-queries
|
|
55
|
+
- **Auto-detection**: Automatically detects available providers from environment variables
|
|
56
|
+
- **Templates**: Support for reusable research queries with variable substitution
|
|
57
|
+
- **Citation Management**: Citations included by default or saved to separate file
|
|
58
|
+
|
|
59
|
+
## Required Environment Variables
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# At least one of these is required:
|
|
63
|
+
export OPENAI_API_KEY="your-openai-key" # For OpenAI Deep Research
|
|
64
|
+
export FUTUREHOUSE_API_KEY="your-futurehouse-key" # For Falcon
|
|
65
|
+
export PERPLEXITY_API_KEY="your-perplexity-key" # For Perplexity AI
|
|
66
|
+
export CONSENSUS_API_KEY="your-consensus-key" # For Consensus AI (requires approval)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Basic Usage
|
|
70
|
+
|
|
71
|
+
### Simple Research Query
|
|
72
|
+
```bash
|
|
73
|
+
# Basic query (uses auto-detected provider)
|
|
74
|
+
uv run deep-research-client research "What is quantum computing?"
|
|
75
|
+
|
|
76
|
+
# With specific provider and model
|
|
77
|
+
uv run deep-research-client research "What is quantum computing?" --provider perplexity --model sonar-pro
|
|
78
|
+
|
|
79
|
+
# Save to file
|
|
80
|
+
uv run deep-research-client research "Machine learning trends 2024" --output report.md
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### List Available Providers
|
|
84
|
+
```bash
|
|
85
|
+
uv run deep-research-client providers
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Using Templates
|
|
89
|
+
Templates allow reusable research queries with variable substitution:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# Use template with variables
|
|
93
|
+
uv run deep-research-client research \
|
|
94
|
+
--template gene_research.md \
|
|
95
|
+
--var "gene=TP53" \
|
|
96
|
+
--var "organism=human" \
|
|
97
|
+
--var "tissue=brain tissue" \
|
|
98
|
+
--var "year=2020"
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Template files use `{variable}` placeholders:
|
|
102
|
+
```markdown
|
|
103
|
+
Please research the gene {gene} in {organism}, focusing on:
|
|
104
|
+
1. Function and molecular mechanisms
|
|
105
|
+
2. Disease associations in {tissue} tissue
|
|
106
|
+
3. Recent discoveries since {year}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Cache Management
|
|
110
|
+
```bash
|
|
111
|
+
# List cached research
|
|
112
|
+
uv run deep-research-client list-cache
|
|
113
|
+
|
|
114
|
+
# Clear all cache
|
|
115
|
+
uv run deep-research-client clear-cache
|
|
116
|
+
|
|
117
|
+
# Bypass cache for single query
|
|
118
|
+
uv run deep-research-client research "query" --no-cache
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Output Format
|
|
122
|
+
|
|
123
|
+
Research results are returned as markdown with YAML frontmatter:
|
|
124
|
+
|
|
125
|
+
```yaml
|
|
126
|
+
---
|
|
127
|
+
provider: perplexity
|
|
128
|
+
model: sonar-pro
|
|
129
|
+
cached: false
|
|
130
|
+
start_time: '2025-10-18T17:43:49.437056'
|
|
131
|
+
end_time: '2025-10-18T17:44:08.922200'
|
|
132
|
+
duration_seconds: 19.49
|
|
133
|
+
citation_count: 18
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Question
|
|
137
|
+
|
|
138
|
+
What is machine learning?
|
|
139
|
+
|
|
140
|
+
## Output
|
|
141
|
+
|
|
142
|
+
**Machine learning** is a branch of artificial intelligence...
|
|
143
|
+
|
|
144
|
+
## Citations
|
|
145
|
+
|
|
146
|
+
1. https://www.ibm.com/topics/machine-learning
|
|
147
|
+
2. https://www.coursera.org/articles/what-is-machine-learning
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Model Selection Guide
|
|
151
|
+
|
|
152
|
+
| Provider | Default Model | Alternative Models | Speed | Depth | Best For |
|
|
153
|
+
|----------|---------------|-------------------|-------|-------|----------|
|
|
154
|
+
| **Perplexity** | `sonar-deep-research` | `sonar`, `sonar-pro`, `sonar-reasoning`, `sonar-reasoning-pro` | Pro models: Fast | Deep Research: Comprehensive | Real-time web search |
|
|
155
|
+
| **OpenAI** | `o3-deep-research-2025-06-26` | - | Slow | Very Comprehensive | Thorough analysis |
|
|
156
|
+
| **Falcon** | Default API | - | Medium | Scientific | Academic/scientific literature |
|
|
157
|
+
| **Consensus** | Default API | - | Medium | Academic | Peer-reviewed papers |
|
|
158
|
+
|
|
159
|
+
## Workflow
|
|
160
|
+
|
|
161
|
+
1. **Ask user for speed preference**: Always clarify if they want fast/light or comprehensive/slow approach
|
|
162
|
+
2. **Check environment variables**: Ensure appropriate API keys are set
|
|
163
|
+
3. **Run research**: Use `uv run deep-research-client research` with appropriate provider and model
|
|
164
|
+
4. **Save output**: Use `--output` flag to save to file if needed
|
|
165
|
+
5. **Review results**: Check the markdown output, citations, and metadata
|
|
166
|
+
6. **Cache management**: Be aware that results are cached permanently unless cleared
|
|
167
|
+
|
|
168
|
+
## Important Notes
|
|
169
|
+
|
|
170
|
+
- **Cost awareness**: Deep research models can be expensive - always confirm with user before using
|
|
171
|
+
- **Time awareness**: Deep research can take several minutes - warn user about expected wait time
|
|
172
|
+
- **Caching**: Results are cached permanently in `~/.deep_research_cache/` - use `--no-cache` to bypass
|
|
173
|
+
- **Citations**: Always included by default; use `--separate-citations` to save to separate file
|
|
174
|
+
- **Templates**: Great for repeated research patterns (e.g., gene research, company analysis)
|
|
175
|
+
- **Metadata**: YAML frontmatter includes timing, provider info, and configuration details
|
|
176
|
+
|
|
177
|
+
## Common Patterns
|
|
178
|
+
|
|
179
|
+
### Quick exploratory research
|
|
180
|
+
```bash
|
|
181
|
+
uv run deep-research-client research "overview of topic X" --provider perplexity --model sonar-pro --output quick-research.md
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Comprehensive deep dive
|
|
185
|
+
```bash
|
|
186
|
+
uv run deep-research-client research "comprehensive analysis of topic X" --provider openai --output deep-research.md
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Scientific literature review
|
|
190
|
+
```bash
|
|
191
|
+
uv run deep-research-client research "scientific review of topic X" --provider falcon --output scientific-review.md
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Template-based gene research
|
|
195
|
+
```bash
|
|
196
|
+
uv run deep-research-client research --template gene_research.md --var "gene=BRCA1" --var "organism=human" --output brca1-research.md
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
## Python Library Usage
|
|
200
|
+
|
|
201
|
+
```python
|
|
202
|
+
from deep_research_client import DeepResearchClient
|
|
203
|
+
|
|
204
|
+
# Initialize client (auto-detects providers from env vars)
|
|
205
|
+
client = DeepResearchClient()
|
|
206
|
+
|
|
207
|
+
# Perform research
|
|
208
|
+
result = client.research(
|
|
209
|
+
"What are the latest developments in AI?",
|
|
210
|
+
provider="perplexity",
|
|
211
|
+
model="sonar-pro"
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
print(result.markdown) # Full markdown report
|
|
215
|
+
print(f"Provider: {result.provider}")
|
|
216
|
+
print(f"Model: {result.model}")
|
|
217
|
+
print(f"Duration: {result.duration_seconds:.2f}s")
|
|
218
|
+
print(f"Citations: {len(result.citations)}")
|
|
219
|
+
print(f"Cached: {result.cached}")
|
|
220
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Gene Research Template
|
|
2
|
+
|
|
3
|
+
Please research the gene {gene} in {organism}, providing a comprehensive analysis focusing on:
|
|
4
|
+
|
|
5
|
+
## Requested Analysis
|
|
6
|
+
|
|
7
|
+
1. **Molecular Function and Mechanisms**
|
|
8
|
+
- Primary molecular function
|
|
9
|
+
- Key protein interactions
|
|
10
|
+
- Cellular localization
|
|
11
|
+
- Post-translational modifications
|
|
12
|
+
|
|
13
|
+
2. **Disease Associations**
|
|
14
|
+
- Known disease associations
|
|
15
|
+
- Mutation effects and pathogenicity
|
|
16
|
+
- Clinical significance
|
|
17
|
+
- Therapeutic implications
|
|
18
|
+
|
|
19
|
+
3. **Expression Patterns**
|
|
20
|
+
- Tissue-specific expression
|
|
21
|
+
- Expression in {tissue}
|
|
22
|
+
- Developmental regulation
|
|
23
|
+
- Expression changes in disease states
|
|
24
|
+
|
|
25
|
+
4. **Recent Discoveries**
|
|
26
|
+
- Key findings since {year}
|
|
27
|
+
- Novel therapeutic approaches
|
|
28
|
+
- Emerging research directions
|
|
29
|
+
- Clinical trials and applications
|
|
30
|
+
|
|
31
|
+
## Search Parameters
|
|
32
|
+
|
|
33
|
+
- Gene: {gene}
|
|
34
|
+
- Organism: {organism}
|
|
35
|
+
- Tissue of Interest: {tissue}
|
|
36
|
+
- Time Frame: Research since {year}
|
|
37
|
+
|
|
38
|
+
Please provide comprehensive citations from peer-reviewed sources and include links to relevant databases (NCBI Gene, UniProt, ClinVar, etc.) where appropriate.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Changes here will be overwritten by Copier
|
|
2
|
+
_commit: 08e42af
|
|
3
|
+
_src_path: monarch-project-copier
|
|
4
|
+
copyright_year: '2025'
|
|
5
|
+
email: my-name@my-org.org
|
|
6
|
+
full_name: My Name
|
|
7
|
+
gh_action_docs_preview: false
|
|
8
|
+
github_handle: cmungall
|
|
9
|
+
github_org: ai4curation
|
|
10
|
+
license: BSD-3-Clause
|
|
11
|
+
project_description: Wrapper for multiple deep research tools
|
|
12
|
+
project_name: deep-research-client
|
|
13
|
+
project_slug: deep_research_client
|
|
14
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Check http://editorconfig.org for more information
|
|
2
|
+
# This is the main config file for this project:
|
|
3
|
+
root = true
|
|
4
|
+
|
|
5
|
+
[*]
|
|
6
|
+
charset = utf-8
|
|
7
|
+
end_of_line = lf
|
|
8
|
+
insert_final_newline = true
|
|
9
|
+
indent_style = space
|
|
10
|
+
indent_size = 2
|
|
11
|
+
trim_trailing_whitespace = true
|
|
12
|
+
|
|
13
|
+
[*.py]
|
|
14
|
+
indent_style = space
|
|
15
|
+
indent_size = 4
|
|
16
|
+
|
|
17
|
+
[*.md]
|
|
18
|
+
trim_trailing_whitespace = false
|