opencode-bioresearcher 1.6.0
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.
- package/LICENSE +201 -0
- package/README.md +103 -0
- package/agents/bioresearcher-dr-worker.md +54 -0
- package/connector-meta.json +23 -0
- package/index.js +77 -0
- package/loader.js +3 -0
- package/package.json +42 -0
- package/skill-bundle.json +12 -0
- package/skills/bioresearcher-deep-research/SKILL.md +330 -0
- package/skills/bioresearcher-deep-research/references/analysis-methods.md +90 -0
- package/skills/bioresearcher-deep-research/references/article-literature.md +89 -0
- package/skills/bioresearcher-deep-research/references/best-practices.md +102 -0
- package/skills/bioresearcher-deep-research/references/citations.md +146 -0
- package/skills/bioresearcher-deep-research/references/clinical-trials.md +87 -0
- package/skills/bioresearcher-deep-research/references/diseases.md +94 -0
- package/skills/bioresearcher-deep-research/references/drugs.md +88 -0
- package/skills/bioresearcher-deep-research/references/ensembl-pdb.md +134 -0
- package/skills/bioresearcher-deep-research/references/functional-genomics.md +118 -0
- package/skills/bioresearcher-deep-research/references/genes.md +93 -0
- package/skills/bioresearcher-deep-research/references/optional-analysis.md +108 -0
- package/skills/bioresearcher-deep-research/references/patents.md +92 -0
- package/skills/bioresearcher-deep-research/references/rate-limiting-auth.md +95 -0
- package/skills/bioresearcher-deep-research/references/report-template.md +117 -0
- package/skills/bioresearcher-deep-research/references/tool-selection.md +142 -0
- package/skills/bioresearcher-deep-research/references/utility-config.md +116 -0
- package/skills/bioresearcher-deep-research/references/variants.md +109 -0
- package/skills/bioresearcher-deep-research/references/worker-protocol.md +110 -0
- package/skills/bioresearcher-deep-research/scripts/markdown-to-html.py +86 -0
- package/skills/bioresearcher-plot-making/SKILL.md +97 -0
- package/skills/bioresearcher-plot-making/references/literature-search-method-summary.md +163 -0
- package/skills/bioresearcher-plot-making/references/qa-gates-and-gotchas.md +156 -0
- package/skills/bioresearcher-plot-making/references/structural-biology-binder-visualization.md +206 -0
- package/skills/bioresearcher-plot-making/scripts/audit_figure_collisions.py +742 -0
- package/skills/bioresearcher-plot-making/scripts/audit_panel_alignment.py +935 -0
- package/skills/bioresearcher-plot-making/scripts/audit_pdf_text.py +152 -0
- package/skills/bioresearcher-plot-making/scripts/plot_helpers.py +177 -0
- package/skills/bioresearcher-pubmed-weekly/SKILL.md +223 -0
- package/skills/bioresearcher-pubmed-weekly/scripts/parse_updatefiles.py +272 -0
- package/skills/bioresearcher-pubmed-weekly/scripts/pubmed_weekly.py +493 -0
- package/skills/bioresearcher-python-setup-uv/SKILL.md +184 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# Citation Formats
|
|
2
|
+
|
|
3
|
+
Numbered-citation formats per source type, with URL forms.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
All findings are cited with numbered in-text markers ([1], [2, 3], [1-5]),
|
|
8
|
+
numbered by order of appearance, resolved against a bibliography at the end
|
|
9
|
+
of the document. Each source type has a fixed format so reports stay
|
|
10
|
+
consistent across workers and aspects.
|
|
11
|
+
|
|
12
|
+
## In-text citation forms
|
|
13
|
+
|
|
14
|
+
```markdown
|
|
15
|
+
Single: BRAF V600E occurs in ~50% of cutaneous melanomas [1].
|
|
16
|
+
Multiple: Several studies confirm the association [1, 2, 3].
|
|
17
|
+
Range: Extensively documented [1-5].
|
|
18
|
+
Timeline: Approved in 2011 [1] and became standard of care [2, 3].
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Bibliography formats by source type
|
|
22
|
+
|
|
23
|
+
### Journal articles (from article_search / article_get)
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
[N] FirstAuthor AB, SecondAuthor CD, et al. Article Title. Journal. Year;Volume(Issue):Pages. PMID: XXXXXXXX.
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Example:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
[1] Chapman PB, Hauschild A, Robert C, et al. Improved survival with vemurafenib in melanoma with BRAF V600E mutation. N Engl J Med. 2011;364(26):2507-2516. PMID: 21639808.
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
When PMID is unavailable, use DOI: `DOI: 10.xxxx/xxxxx`. Both may be given.
|
|
36
|
+
|
|
37
|
+
### Clinical trials (from trial_search / trial_get)
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
[N] NCTXXXXXXXX: Official Title. Phase X. Sponsor: [sponsor]. Status: [status]. https://clinicaltrials.gov/study/NCTXXXXXXXX
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Example:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
[2] NCT04280705: A Study of Encorafenib Plus Cetuximab With or Without Nivolumab in Metastatic Colorectal Cancer. Phase 2. Sponsor: Pfizer. Status: Completed. https://clinicaltrials.gov/study/NCT04280705
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Patents (from patent_search / patent_get)
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
[N] [Assignee]. Title of invention. Patent publication number (status). URL
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Example:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
[3] ModernaTx, Inc. Nucleoside-modified mRNA encoding SARS-CoV-2 spike protein. US11027025B2 (granted). https://patents.google.com/patent/US11027025B2
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
EP/WO patents: use `https://register.epo.org/application?number=<number>` or
|
|
62
|
+
Google Patents.
|
|
63
|
+
|
|
64
|
+
### Genes (from gene_search / gene_get)
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
[N] SYMBOL: Full gene name. NCBI Gene ID: XXXXXX. HGNC: HGNC:XXXX. https://www.ncbi.nlm.nih.gov/gene/XXXXXX
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Example:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
[4] BRAF: B-Raf proto-oncogene, serine/threonine kinase. NCBI Gene ID: 673. HGNC: HGNC:1097. https://www.ncbi.nlm.nih.gov/gene/673
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Variants (from variant_search / variant_get / variant_oncokb)
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
[N] GENE p.PROTEINCHANGE (rsID): ClinVar significance [ClinVar ID]. URL
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Example:
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
[5] BRAF p.V600E (rs113488022): Pathogenic/Likely pathogenic [ClinVar: 13961]. https://www.ncbi.nlm.nih.gov/clinvar/variation/13961
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Drugs (from drug_search / drug_get)
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
[N] Drug Name. Indication: [indication]. [ChEMBL ID / ChEBI ID / UNII when present]. URL
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Example:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
[6] Vemurafenib. Indication: BRAF V600E-mutant melanoma. ChEMBL: CHEMBL1229517. https://www.ebi.ac.uk/chembl/compound_report_card/CHEMBL1229517/
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
FDA label findings cite the safety section: append "Source: FDA label
|
|
101
|
+
(drug_get safety section)."
|
|
102
|
+
|
|
103
|
+
### Diseases (from disease_search / disease_get)
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
[N] Disease Name. Ontology ID ([DOID/MONDO/OMIM/EFO]). URL
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Example:
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
[7] Cutaneous melanoma. MONDO:0002025. https://monarchinitiative.org/MONDO:0002025
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Datasets / sequences (geo_get / sra_get / genbank_get)
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
[N] GEO series GSEXXXXXX: [title]. [organism]. https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSEXXXXXX
|
|
119
|
+
[N] SRA run SRRXXXXXXX: [experiment description]. https://trace.ncbi.nlm.nih.gov/Traces/?run=SRRXXXXXXX
|
|
120
|
+
[N] GenBank accession XXXXXXXX.X: [definition]. https://www.ncbi.nlm.nih.gov/nuccore/XXXXXXXX.X
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Official web sources (fallback when biomcp lacks coverage)
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
[N] Page Title. Organization. Updated [date if shown]. URL. Accessed: YYYY-MM-DD.
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## What to cite
|
|
130
|
+
|
|
131
|
+
| Source type | Cite? |
|
|
132
|
+
|-------------|-------|
|
|
133
|
+
| Tool-returned articles, trials, patents, annotations | Yes |
|
|
134
|
+
| Statistical/quantitative claims | Yes - always |
|
|
135
|
+
| Direct quotes | Yes |
|
|
136
|
+
| General textbook knowledge ("DNA has 4 bases") | No |
|
|
137
|
+
|
|
138
|
+
## Integrity rules
|
|
139
|
+
|
|
140
|
+
1. Verify identifiers exist in the tool output - never fabricate a PMID,
|
|
141
|
+
NCT ID, or accession.
|
|
142
|
+
2. Cite primary sources over reviews when both are available.
|
|
143
|
+
3. Quote accurately; do not overstate findings beyond what the source says.
|
|
144
|
+
4. Per-aspect files keep their own [1..N]; the orchestrator re-numers all
|
|
145
|
+
citations into one bibliography for final_report.md.
|
|
146
|
+
5. Access dates only for web sources (tools log their own query date).
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Clinical Trials Research
|
|
2
|
+
|
|
3
|
+
ClinicalTrials.gov search and detail via `trial_search` / `trial_get`.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
`trial_search` queries the ClinicalTrials.gov API v2 by condition,
|
|
8
|
+
intervention, or keyword with status/phase filters and CURSOR pagination.
|
|
9
|
+
`trial_get` retrieves one trial by NCT ID with selectable sections.
|
|
10
|
+
|
|
11
|
+
## Tools
|
|
12
|
+
|
|
13
|
+
### trial_search
|
|
14
|
+
|
|
15
|
+
| Parameter | Type | Notes |
|
|
16
|
+
|-----------|------|-------|
|
|
17
|
+
| query | string (required) | Condition, intervention, or keyword |
|
|
18
|
+
| status | string, optional | e.g. "Recruiting", "Completed" |
|
|
19
|
+
| phase | string, optional | e.g. "Phase 1", "Phase 2" |
|
|
20
|
+
| intervention_type | string, optional | e.g. "Drug", "Device" |
|
|
21
|
+
| limit | int 1-50, default 10 | Maximum results per page |
|
|
22
|
+
| page_token | string, optional | Cursor from the previous response - the ONLY pagination mechanism (no offset) |
|
|
23
|
+
|
|
24
|
+
Response includes a next-page token when more results exist; pass it back as
|
|
25
|
+
`page_token` to continue.
|
|
26
|
+
|
|
27
|
+
### trial_get
|
|
28
|
+
|
|
29
|
+
| Parameter | Type | Notes |
|
|
30
|
+
|-----------|------|-------|
|
|
31
|
+
| nct_id | string (required) | e.g. "NCT01234567" |
|
|
32
|
+
| sections | enum array, optional | `core`, `eligibility`, `locations`, `outcomes`, `all` |
|
|
33
|
+
| limit | int 1-100, default 20 | Caps array lengths (e.g. location rows) |
|
|
34
|
+
|
|
35
|
+
IMPORTANT: there is NO `protocol` section. Trial protocol content (design,
|
|
36
|
+
arms, eligibility) is covered by `core` + `eligibility`:
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{"nct_id": "NCT04280705", "sections": ["core", "eligibility"]}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Section contents: `core` = identification, status, phase, design, sponsors,
|
|
43
|
+
brief/official summary; `eligibility` = inclusion/exclusion criteria, sex,
|
|
44
|
+
age range, healthy-volunteer acceptance; `locations` = sites and contacts;
|
|
45
|
+
`outcomes` = primary/secondary outcome measures.
|
|
46
|
+
|
|
47
|
+
## Worked examples
|
|
48
|
+
|
|
49
|
+
Recruiting Phase 3 melanoma drug trials:
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{"query": "melanoma", "status": "Recruiting", "phase": "Phase 3",
|
|
53
|
+
"intervention_type": "Drug", "limit": 20}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Page deeper with the cursor from the previous response:
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{"query": "melanoma", "status": "Recruiting", "phase": "Phase 3",
|
|
60
|
+
"limit": 20, "page_token": "<token from previous response>"}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Outcome measures for one trial:
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{"nct_id": "NCT04511078", "sections": ["outcomes"]}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Failure modes
|
|
70
|
+
|
|
71
|
+
| Symptom | Cause | Fix |
|
|
72
|
+
|---------|-------|-----|
|
|
73
|
+
| Sections missing after requesting "protocol" | no such section exists | request `["core","eligibility"]` for protocol content |
|
|
74
|
+
| Same first page returned repeatedly | retrying with the same args re-issues page 1 | thread `page_token` from each response; do not use offset-style paging |
|
|
75
|
+
| 0 hits for a valid condition | overly narrow combined filters | drop filters one at a time (keep `query`), then re-apply selectively |
|
|
76
|
+
| Trial not found for an NCT ID | typo or unindexed/very new record | verify the NCT ID via `trial_search(query="NCT04511078")` |
|
|
77
|
+
|
|
78
|
+
## Integration notes
|
|
79
|
+
|
|
80
|
+
- Cross-entity shortcuts avoid manual query crafting: `drug_trials(drug)`,
|
|
81
|
+
`gene_trials(symbol)`, `disease_trials(disease_id)`, `variant_trials(variant)`
|
|
82
|
+
return compact nct_id/title/status lists - then use `trial_get` for detail.
|
|
83
|
+
- `disease_trials` accepts a disease ID (DOID/MONDO/OMIM) or a plain disease
|
|
84
|
+
name; IDs are resolved to a name before searching.
|
|
85
|
+
- Cite trials by NCT ID with the clinicaltrials.gov URL (references/citations.md).
|
|
86
|
+
- ClinicalTrials.gov API is server-limited at 100 ms intervals - no manual
|
|
87
|
+
throttling needed.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Disease Research
|
|
2
|
+
|
|
3
|
+
Disease discovery, annotation, and cross-links via `disease_search` /
|
|
4
|
+
`disease_get` / `disease_drugs` / `disease_trials`.
|
|
5
|
+
|
|
6
|
+
## Overview
|
|
7
|
+
|
|
8
|
+
`disease_search` finds diseases by name/phenotype/keyword (MyDisease-backed);
|
|
9
|
+
`disease_get` retrieves detail by ontology ID; `disease_drugs` returns
|
|
10
|
+
OpenTargets drug-disease associations; `disease_trials` searches
|
|
11
|
+
ClinicalTrials.gov by the resolved disease name.
|
|
12
|
+
|
|
13
|
+
## Tools
|
|
14
|
+
|
|
15
|
+
### disease_search
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Notes |
|
|
18
|
+
|-----------|------|-------|
|
|
19
|
+
| query | string (required) | Disease name, phenotype, or keyword |
|
|
20
|
+
| limit | int 1-50, default 10 | Maximum results |
|
|
21
|
+
| offset | int >= 0, default 0 | Result offset |
|
|
22
|
+
|
|
23
|
+
Use it to obtain the canonical `disease_id` for `disease_get`.
|
|
24
|
+
|
|
25
|
+
### disease_get
|
|
26
|
+
|
|
27
|
+
| Parameter | Type | Notes |
|
|
28
|
+
|-----------|------|-------|
|
|
29
|
+
| disease_id | string (required) | Disease ID: DOID (`DOID:0060268`), MONDO, OMIM, OMOPS, EFO, Orphanet (`ORPHA...`/`Orphanet:...`), or UMLS CUI (`C0018794`, matches `C` + 7 digits) |
|
|
30
|
+
| sections | enum array, optional | `core`, `gene_associations`, `phenotypes`, `pathways`, `all` |
|
|
31
|
+
| limit | int 1-100, default 20 | Caps arrays (gene association rows, phenotype rows, etc.) |
|
|
32
|
+
|
|
33
|
+
Section contents: `core` = names, definitions, ontology cross-refs;
|
|
34
|
+
`gene_associations` = associated genes; `phenotypes` = HPO phenotype terms;
|
|
35
|
+
`pathways` = implicated pathways.
|
|
36
|
+
|
|
37
|
+
### disease_drugs
|
|
38
|
+
|
|
39
|
+
| Parameter | Type | Notes |
|
|
40
|
+
|-----------|------|-------|
|
|
41
|
+
| disease_id | string (required) | Disease ID (ontology ID or name resolvable via OpenTargets) |
|
|
42
|
+
| limit | int 1-50, default 20 | Caps the association list |
|
|
43
|
+
|
|
44
|
+
Sources drugs via OpenTargets.
|
|
45
|
+
|
|
46
|
+
### disease_trials
|
|
47
|
+
|
|
48
|
+
| Parameter | Type | Notes |
|
|
49
|
+
|-----------|------|-------|
|
|
50
|
+
| disease_id | string (required) | Disease ID OR plain disease name - IDs are resolved to a name first |
|
|
51
|
+
| limit | int 1-50, default 20 | Page size |
|
|
52
|
+
|
|
53
|
+
Returns compact `{nct_id, title, status}` rows; follow up with `trial_get`.
|
|
54
|
+
|
|
55
|
+
## Worked examples
|
|
56
|
+
|
|
57
|
+
Find the canonical ID, then annotate:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{"query": "melanoma", "limit": 5}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{"disease_id": "DOID:0060268", "sections": ["core", "gene_associations", "phenotypes"]}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Drugs associated with a disease:
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{"disease_id": "MONDO:0002025", "limit": 15}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Trial landscape directly (name accepted):
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
{"disease_id": "pancreatic adenocarcinoma", "limit": 20}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Failure modes
|
|
80
|
+
|
|
81
|
+
| Symptom | Cause | Fix |
|
|
82
|
+
|---------|-------|-----|
|
|
83
|
+
| `_error: Disease ... not found` from disease_trials | invalid/unresolvable ID | call `disease_search` first and copy the exact ID; supported formats are MONDO/DOID/OMIM (message text) plus EFO/Orphanet/CUI accepted by the resolver |
|
|
84
|
+
| disease_get 0 hits for a raw name | the tool wants an ID, not a name | resolve via `disease_search`, or use `disease_trials`/`disease_drugs` which accept names |
|
|
85
|
+
| Sections empty | over-narrow section set or sparse annotation for rare diseases | try `sections: ["all"]` and note data sparsity in the report |
|
|
86
|
+
|
|
87
|
+
## Integration notes
|
|
88
|
+
|
|
89
|
+
- Gene-centric disease questions can go the other way: `gene_diseases(symbol)`
|
|
90
|
+
(references/genes.md) - note its DisGeNET/OpenTargets fallback semantics.
|
|
91
|
+
- Disease -> trials -> detail chain: `disease_trials` then `trial_get`
|
|
92
|
+
(references/clinical-trials.md).
|
|
93
|
+
- MyDisease and Monarch are server-limited at 100 ms; OpenTargets at 500 ms -
|
|
94
|
+
no manual throttling.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Drug Research
|
|
2
|
+
|
|
3
|
+
Drug identity, regulatory status, labels, adverse events, and targets via
|
|
4
|
+
`drug_search` / `drug_get` / `drug_trials`.
|
|
5
|
+
|
|
6
|
+
## Overview
|
|
7
|
+
|
|
8
|
+
`drug_search` finds drugs by name/mechanism/keyword (MyChem-backed);
|
|
9
|
+
`drug_get` returns per-drug detail with sections spanning US/EU/WHO
|
|
10
|
+
regulatory data, FDA labels (safety), FAERS adverse events, targets, and
|
|
11
|
+
indications; `drug_trials` cross-links to clinical trials.
|
|
12
|
+
|
|
13
|
+
## Tools
|
|
14
|
+
|
|
15
|
+
### drug_search
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Notes |
|
|
18
|
+
|-----------|------|-------|
|
|
19
|
+
| query | string (required) | Drug name, mechanism, or keyword |
|
|
20
|
+
| limit | int 1-50, default 10 | Maximum results |
|
|
21
|
+
| offset | int >= 0, default 0 | Result offset |
|
|
22
|
+
|
|
23
|
+
### drug_get
|
|
24
|
+
|
|
25
|
+
| Parameter | Type | Notes |
|
|
26
|
+
|-----------|------|-------|
|
|
27
|
+
| name | string (required) | Drug name, e.g. "imatinib", "aspirin" |
|
|
28
|
+
| sections | enum array, optional | `core`, `us_regulatory`, `eu_regulatory`, `who_regulatory`, `safety`, `targets`, `indications`, `adverse_events`, `all` |
|
|
29
|
+
| limit | int 1-100, default 20 | For `adverse_events`, caps the number of ranked reaction rows |
|
|
30
|
+
|
|
31
|
+
Section semantics (important - commonly confused):
|
|
32
|
+
|
|
33
|
+
| Section | Contents |
|
|
34
|
+
|---------|----------|
|
|
35
|
+
| core | identity, identifiers, description |
|
|
36
|
+
| us_regulatory | US brand name + `fda_status` (e.g. approved) - NOT full labels, NOT approval history |
|
|
37
|
+
| eu_regulatory / who_regulatory | EMA / WHO regulatory summaries |
|
|
38
|
+
| safety | FDA LABEL TEXT: box_warning, warnings, adverse_reactions - this is where label prose lives |
|
|
39
|
+
| adverse_events | FDA FAERS adverse reactions RANKED by report count - no filters (no patient age/sex/date/reaction filtering) |
|
|
40
|
+
| targets | drug targets |
|
|
41
|
+
| indications | approved/use indications |
|
|
42
|
+
| all | every non-core section |
|
|
43
|
+
|
|
44
|
+
### drug_trials
|
|
45
|
+
|
|
46
|
+
| Parameter | Type | Notes |
|
|
47
|
+
|-----------|------|-------|
|
|
48
|
+
| drug | string (required) | Drug name |
|
|
49
|
+
|
|
50
|
+
## Worked examples
|
|
51
|
+
|
|
52
|
+
Label (safety) information for vemurafenib:
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{"name": "vemurafenib", "sections": ["safety"]}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Top FAERS adverse events (ranked, unfilterable):
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{"name": "imatinib", "sections": ["adverse_events"], "limit": 15}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Regulatory snapshot + targets + indications in one call:
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{"name": "trastuzumab",
|
|
68
|
+
"sections": ["us_regulatory", "eu_regulatory", "targets", "indications"]}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Failure modes
|
|
72
|
+
|
|
73
|
+
| Symptom | Cause | Fix |
|
|
74
|
+
|---------|-------|-----|
|
|
75
|
+
| us_regulatory is surprisingly thin | it only carries brand name + fda_status | label text (warnings, box warning, adverse reactions) is in `safety` |
|
|
76
|
+
| Wanting FAERS filtered by age/sex/date | `adverse_events` exposes ranked counts only - no filters | take the ranked list and note the limitation in the report; do not claim subgroup-level FAERS results |
|
|
77
|
+
| 0 hits for a trade name | search index prefers generic/mechanism terms | `drug_search` by generic name or mechanism, then `drug_get` by the matched name |
|
|
78
|
+
| Payload too large | `sections: ["all"]` on a heavily annotated drug | request only the needed sections; lower `limit` for reaction rows |
|
|
79
|
+
|
|
80
|
+
## Integration notes
|
|
81
|
+
|
|
82
|
+
- Reverse direction (target -> drugs): `gene_drugs(symbol)`; disease ->
|
|
83
|
+
drugs: `disease_drugs(disease_id)` (references/diseases.md).
|
|
84
|
+
- openFDA rate limits improve with `OPENFDA_API_KEY`
|
|
85
|
+
(references/rate-limiting-auth.md).
|
|
86
|
+
- MyChem and openFDA are server-limited at 100 ms - no manual throttling.
|
|
87
|
+
- Cite drugs with identifiers (ChEMBL/ChEBI/UNII where present in core output; drugBank IDs are not returned by drug_get)
|
|
88
|
+
per references/citations.md.
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# Ensembl & PDB Research
|
|
2
|
+
|
|
3
|
+
Identifier/structure authority and variant consequence prediction via
|
|
4
|
+
`ensembl_*` tools, and macromolecular structures via the tri-mode `pdb` tool.
|
|
5
|
+
|
|
6
|
+
## Overview
|
|
7
|
+
|
|
8
|
+
The Ensembl tools cover any of 356 Ensembl species: stable-ID lookup,
|
|
9
|
+
cross-species homology, on-demand VEP consequence prediction (works for novel
|
|
10
|
+
variants), and region content. The single `pdb` tool switches between search,
|
|
11
|
+
metadata get, and file download by its arguments.
|
|
12
|
+
|
|
13
|
+
## Tools
|
|
14
|
+
|
|
15
|
+
### ensembl_lookup
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Notes |
|
|
18
|
+
|-----------|------|-------|
|
|
19
|
+
| gene_or_id | string (required) | HGNC symbol (BRAF) or Ensembl gene ID (ENSG00000157764, versioned or bare - versions resolve to current) |
|
|
20
|
+
| species | string, default "human" | Name or alias: "human", "mus_musculus", "mouse", "rat", ... (356 species) |
|
|
21
|
+
| expand | boolean, default false | Include all transcripts with translation/protein IDs |
|
|
22
|
+
|
|
23
|
+
Returns stable ID, symbol<->ID mapping, canonical transcript, coordinates on
|
|
24
|
+
the current assembly (GRCh38 human, GRCm39 mouse, ...). For rich HUMAN gene
|
|
25
|
+
annotation use `gene_get` (references/genes.md) - this tool is the
|
|
26
|
+
identifier/structure authority.
|
|
27
|
+
|
|
28
|
+
### ensembl_homology
|
|
29
|
+
|
|
30
|
+
| Parameter | Type | Notes |
|
|
31
|
+
|-----------|------|-------|
|
|
32
|
+
| gene | string (required) | Symbol or Ensembl gene ID |
|
|
33
|
+
| species | string, default "human" | Source species |
|
|
34
|
+
| type | `orthologues` (default) / `paralogues` | Homology type |
|
|
35
|
+
| target_species | string, optional | Restrict to one species, e.g. "mouse" |
|
|
36
|
+
| target_taxon | int, optional | Restrict to taxon ID, e.g. 10090 (Mus musculus) |
|
|
37
|
+
| limit | int 1-100, default 20 | Max homologies (sorted by percent identity) |
|
|
38
|
+
|
|
39
|
+
### ensembl_consequence
|
|
40
|
+
|
|
41
|
+
| Parameter | Type | Notes |
|
|
42
|
+
|-----------|------|-------|
|
|
43
|
+
| variant | string (required) | HGVS c./p./g. ("NM_004333:c.1799T>A", "ENST00000288602:c.1799T>A") or dbSNP rsID ("rs113488060"); prefer HGVS over rsIDs |
|
|
44
|
+
| species | string, default "human" | Species |
|
|
45
|
+
| limit | int 1-50, default 10 | Max transcript consequences (sorted by impact severity) |
|
|
46
|
+
|
|
47
|
+
Predicts functional consequence via Ensembl VEP - works even for NOVEL
|
|
48
|
+
variants absent from every database, and for non-human species. Returns most
|
|
49
|
+
severe consequence, per-transcript effects (impact, codon/amino-acid change,
|
|
50
|
+
SIFT/PolyPhen), and co-located known variants (ClinVar/COSMIC IDs,
|
|
51
|
+
gnomAD/1000G frequencies when present). For KNOWN human variants,
|
|
52
|
+
`variant_get` additionally provides pre-computed deep scores (CADD, REVEL,
|
|
53
|
+
ClinVar stars).
|
|
54
|
+
|
|
55
|
+
### ensembl_region
|
|
56
|
+
|
|
57
|
+
| Parameter | Type | Notes |
|
|
58
|
+
|-----------|------|-------|
|
|
59
|
+
| region | string (required) | `chr:start-end`, 1-based, e.g. "7:140450000-140480000" (GRCh38 for human) |
|
|
60
|
+
| features | array, default ["gene","variation"] | From `gene`, `transcript`, `variation` |
|
|
61
|
+
| species | string, default "human" | Species |
|
|
62
|
+
| limit | int 1-500, default 50 | Max features (output capped with a truncated marker) |
|
|
63
|
+
|
|
64
|
+
Ideal for locus triage ("what genes and known variants sit in this GWAS hit
|
|
65
|
+
interval?"). Keep spans modest (< 1 Mb recommended). For sequence TEXT use
|
|
66
|
+
`genbank_get`; for annotation chain IDs into `gene_get`/`variant_get`.
|
|
67
|
+
|
|
68
|
+
### pdb (tri-mode tool)
|
|
69
|
+
|
|
70
|
+
| Parameter | Type | Notes |
|
|
71
|
+
|-----------|------|-------|
|
|
72
|
+
| query | string, optional | SEARCH mode: free-text structure search; omit pdb_id |
|
|
73
|
+
| pdb_id | string, optional | GET mode: 4-char ID (e.g. "4HHB"); required for get/download |
|
|
74
|
+
| sections | enum array, optional | `core`, `polymer_entities`, `ligands`, `assembly`, `experiment`, `citation`, `all` |
|
|
75
|
+
| download | boolean, default false | DOWNLOAD mode: saves the structure file, returns file path (only with pdb_id) |
|
|
76
|
+
| format | `cif` (default) / `pdb` | Download format; cif always available, legacy pdb may not exist for some entries |
|
|
77
|
+
| limit / offset | int | Search result paging (limit 1-50, default 10) |
|
|
78
|
+
|
|
79
|
+
Providing NEITHER query nor pdb_id is an error.
|
|
80
|
+
|
|
81
|
+
## Worked examples
|
|
82
|
+
|
|
83
|
+
All human BRAF transcripts:
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{"gene_or_id": "BRAF", "expand": true}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Mouse orthologues of BRAF:
|
|
90
|
+
|
|
91
|
+
```json
|
|
92
|
+
{"gene": "BRAF", "type": "orthologues", "target_species": "mouse"}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Consequence of a novel HGVS variant:
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{"variant": "NM_004333.4:c.1799T>A"}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
What lives in a GWAS interval:
|
|
102
|
+
|
|
103
|
+
```json
|
|
104
|
+
{"region": "7:140450000-140480000", "features": ["gene", "variation"]}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Structure workflow:
|
|
108
|
+
|
|
109
|
+
```json
|
|
110
|
+
{"query": "BRAF kinase inhibitor"}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
```json
|
|
114
|
+
{"pdb_id": "4HHB", "sections": ["core", "experiment"]}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Failure modes
|
|
118
|
+
|
|
119
|
+
| Symptom | Cause | Fix |
|
|
120
|
+
|---------|-------|-----|
|
|
121
|
+
| Transient Ensembl 5xx errors | upstream REST occasionally 500/503s | the server retries 3x with backoff; one client retry is reasonable if it still fails |
|
|
122
|
+
| pdb error "Provide either query or pdb_id" | neither argument given | pass `query` for search or `pdb_id` for get/download |
|
|
123
|
+
| Legacy `format: "pdb"` download fails | not all entries have the legacy format | use `format: "cif"` |
|
|
124
|
+
| ensembl_region output truncated | span or feature count too high | narrow the region (< 1 Mb) or raise `limit` toward 500 |
|
|
125
|
+
| ensembl_consequence vague for an rsID | rsID coordinate mapping is less specific | prefer HGVS notation input |
|
|
126
|
+
|
|
127
|
+
## Integration notes
|
|
128
|
+
|
|
129
|
+
- Ensembl REST is server-limited at 100 ms; RCSB data endpoints at 100-200 ms
|
|
130
|
+
- no manual throttling.
|
|
131
|
+
- `pdb` download writes to disk (readOnlyHint false) - clean up large files if
|
|
132
|
+
the workspace matters.
|
|
133
|
+
- Chain ensembl_lookup -> gene_get for human annotation; ensembl_region ->
|
|
134
|
+
variant_get for variant detail; pdb citation sections -> article_get.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Functional Genomics Research
|
|
2
|
+
|
|
3
|
+
Dataset and sequence research via GEO (`geo_search`/`geo_get`), SRA
|
|
4
|
+
(`sra_search`/`sra_get`), GenBank (`genbank_search`/`genbank_get`/
|
|
5
|
+
`genbank_genes`), and GTEx (`gtex_expression`/`gtex_eqtl`).
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
These tools find and retrieve functional genomics studies (expression,
|
|
10
|
+
RNA-seq, sequencing runs, sequence records) and tissue expression genetics,
|
|
11
|
+
with rich cross-links (accession chaining) between them.
|
|
12
|
+
|
|
13
|
+
## Tools
|
|
14
|
+
|
|
15
|
+
### geo_search / geo_get
|
|
16
|
+
|
|
17
|
+
`geo_search`: `query` (free text or NCBI field syntax like
|
|
18
|
+
`GSE183947[Accession]`), `entry_type` (`gse` study default / `gsm` sample /
|
|
19
|
+
`gpl` platform / `gds` curated dataset), `organism`, `limit` (1-50, default
|
|
20
|
+
10), `offset`. Results carry chaining fields: `sra_project` -> sra_get,
|
|
21
|
+
`bioproject`, `pubmed_ids` -> article_get, `accession` -> geo_get.
|
|
22
|
+
|
|
23
|
+
`geo_get`: `accession` (matches `^(GSE|GSM|GPL|GDS)\d+$`), `download`
|
|
24
|
+
(boolean; saves the FIRST supplementary file .gz/.csv/.txt to a local temp
|
|
25
|
+
path and returns path/size/URL), `max_bytes` (min 1,000,000; default
|
|
26
|
+
52428800 = 50 MB). GDS accessions return guidance pointing at the underlying
|
|
27
|
+
GSE/GSM.
|
|
28
|
+
|
|
29
|
+
### sra_search / sra_get
|
|
30
|
+
|
|
31
|
+
`sra_search`: `query` (free text, an accession SRP/SRX/SRR/SRS, or field
|
|
32
|
+
syntax like `RNA-SEQ AND Homo sapiens[Organism]`), `limit`, `offset`.
|
|
33
|
+
|
|
34
|
+
`sra_get`: `accession` - SRP study / SRX experiment / SRR run / SRS sample.
|
|
35
|
+
European (ERP/ERR) and DDBJ (DRP/DRR) accessions are REJECTED - NCBI SRA does
|
|
36
|
+
not index them; the error points at ENA (https://www.ebi.ac.uk/ena).
|
|
37
|
+
|
|
38
|
+
### genbank_search / genbank_get / genbank_genes
|
|
39
|
+
|
|
40
|
+
`genbank_search`: `query` (terms, accession, or field syntax like
|
|
41
|
+
`TP53[Gene Name] AND Homo sapiens[Organism]`), `organism`, `limit`, `offset`.
|
|
42
|
+
|
|
43
|
+
`genbank_get`: `accession` (versioned or bare, e.g. NC_000023.11),
|
|
44
|
+
`format` (`genbank` default / `fasta`), `seq_start`/`seq_stop` (1-based
|
|
45
|
+
inclusive region), `strand` (1 plus; 2 minus, allows seq_start > seq_stop for
|
|
46
|
+
reverse slices), `max_response_bytes` (default 30,000,000; oversized errors
|
|
47
|
+
rather than truncates). Caps: whole-record fetches max 2,000,000 bp - larger
|
|
48
|
+
records REQUIRE a seq_start/seq_stop region (up to 10 Mb span); output
|
|
49
|
+
`sequence_text` is truncated to its first 200,000 characters when oversized.
|
|
50
|
+
|
|
51
|
+
`genbank_genes`: maps a nucleotide accession to NCBI Gene IDs (elink
|
|
52
|
+
nuccore->gene) usable directly with gene_get/gene_search (entrezgene IDs) -
|
|
53
|
+
the bridge from sequence records to gene annotation.
|
|
54
|
+
|
|
55
|
+
### gtex_expression / gtex_eqtl
|
|
56
|
+
|
|
57
|
+
`gtex_expression`: `gene` (HGNC symbol or Ensembl gene ID, versioned or
|
|
58
|
+
bare), `tissue` (optional tissueSiteDetailId filter, e.g. Brain_Cortex,
|
|
59
|
+
Whole_Blood), `limit` (1-54, default 20; tissues sorted highest TPM first).
|
|
60
|
+
GTEx Analysis v10, 54 tissue sites, median TPM.
|
|
61
|
+
|
|
62
|
+
`gtex_eqtl`: `gene`, `tissue` (REQUIRED tissueSiteDetailId), `limit`
|
|
63
|
+
(1-100, default 20). Significant cis-eQTLs sorted by ascending p-value:
|
|
64
|
+
variant_id, p_value, NES.
|
|
65
|
+
|
|
66
|
+
## Worked examples
|
|
67
|
+
|
|
68
|
+
Find melanoma single-cell studies:
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{"query": "melanoma single cell", "organism": "Homo sapiens", "limit": 10}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Series detail with supplementary download:
|
|
75
|
+
|
|
76
|
+
```json
|
|
77
|
+
{"accession": "GSE183947", "download": true, "max_bytes": 100000000}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Runs for a study:
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{"query": "SRP123456"}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
A 5 kb region slice of a big chromosome record:
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
{"accession": "NC_000023.11", "seq_start": 43070000, "seq_stop": 43075000,
|
|
90
|
+
"format": "fasta"}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Expression profile across tissues:
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{"gene": "TP53", "limit": 10}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Failure modes
|
|
100
|
+
|
|
101
|
+
| Symptom | Cause | Fix |
|
|
102
|
+
|---------|-------|-----|
|
|
103
|
+
| sra_get error: European/DDBJ accession | ERP/ERR/DRP/DRR not in NCBI SRA | use ENA (https://www.ebi.ac.uk/ena) for those accessions |
|
|
104
|
+
| genbank_get error requiring region | record > 2,000,000 bp without seq_start/seq_stop | supply a 1-based inclusive region (max 10 Mb span) |
|
|
105
|
+
| sequence_text ends with "...[truncated N of M chars ...]" | output guard caps at 200,000 chars | request a narrower region for the full text |
|
|
106
|
+
| geo_get download refused | non-NCBI host or file exceeds max_bytes | raise `max_bytes` (cap applies) or download manually from the returned URL |
|
|
107
|
+
| GEO supplementary downloads slow | unthrottled raw downloads | pace download calls manually; only download when analysis truly needs the file |
|
|
108
|
+
| gtex_eqtl error about tissue | missing/invalid tissueSiteDetailId | tissue is required - use e.g. "Whole_Blood", "Brain_Cortex" |
|
|
109
|
+
|
|
110
|
+
## Integration notes
|
|
111
|
+
|
|
112
|
+
- Chaining map: geo -> sra (`sra_project`/first_run), geo -> literature
|
|
113
|
+
(`pubmed_ids` -> article_get), genbank -> genes (`genbank_genes`), gene ->
|
|
114
|
+
GTEx (symbol or Ensembl ID), geo sample/platform -> geo_get.
|
|
115
|
+
- E-utilities (PubMed/GEO/SRA/GenBank) share ONE server-side limiter: 334 ms
|
|
116
|
+
keyless, 100 ms with NCBI_API_KEY - no manual throttling.
|
|
117
|
+
- GEO SOFT record fetches are separately limited at 300 ms; supplementary
|
|
118
|
+
file downloads are unthrottled.
|