@cyanheads/ensembl-mcp-server 0.1.1
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/AGENTS.md +383 -0
- package/CLAUDE.md +383 -0
- package/Dockerfile +99 -0
- package/LICENSE +201 -0
- package/README.md +326 -0
- package/changelog/0.1.x/0.1.1.md +31 -0
- package/changelog/template.md +127 -0
- package/dist/config/server-config.d.ts +14 -0
- package/dist/config/server-config.d.ts.map +1 -0
- package/dist/config/server-config.js +21 -0
- package/dist/config/server-config.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +40 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp-server/prompts/definitions/gene-dossier.prompt.d.ts +10 -0
- package/dist/mcp-server/prompts/definitions/gene-dossier.prompt.d.ts.map +1 -0
- package/dist/mcp-server/prompts/definitions/gene-dossier.prompt.js +60 -0
- package/dist/mcp-server/prompts/definitions/gene-dossier.prompt.js.map +1 -0
- package/dist/mcp-server/resources/definitions/gene.resource.d.ts +15 -0
- package/dist/mcp-server/resources/definitions/gene.resource.d.ts.map +1 -0
- package/dist/mcp-server/resources/definitions/gene.resource.js +59 -0
- package/dist/mcp-server/resources/definitions/gene.resource.js.map +1 -0
- package/dist/mcp-server/resources/definitions/species.resource.d.ts +15 -0
- package/dist/mcp-server/resources/definitions/species.resource.d.ts.map +1 -0
- package/dist/mcp-server/resources/definitions/species.resource.js +48 -0
- package/dist/mcp-server/resources/definitions/species.resource.js.map +1 -0
- package/dist/mcp-server/resources/definitions/transcript.resource.d.ts +15 -0
- package/dist/mcp-server/resources/definitions/transcript.resource.d.ts.map +1 -0
- package/dist/mcp-server/resources/definitions/transcript.resource.js +53 -0
- package/dist/mcp-server/resources/definitions/transcript.resource.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-homology.tool.d.ts +43 -0
- package/dist/mcp-server/tools/definitions/get-homology.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-homology.tool.js +183 -0
- package/dist/mcp-server/tools/definitions/get-homology.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-sequence.tool.d.ts +35 -0
- package/dist/mcp-server/tools/definitions/get-sequence.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-sequence.tool.js +154 -0
- package/dist/mcp-server/tools/definitions/get-sequence.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-xrefs.tool.d.ts +28 -0
- package/dist/mcp-server/tools/definitions/get-xrefs.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-xrefs.tool.js +122 -0
- package/dist/mcp-server/tools/definitions/get-xrefs.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/list-species.tool.d.ts +28 -0
- package/dist/mcp-server/tools/definitions/list-species.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/list-species.tool.js +105 -0
- package/dist/mcp-server/tools/definitions/list-species.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/lookup-gene.tool.d.ts +57 -0
- package/dist/mcp-server/tools/definitions/lookup-gene.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/lookup-gene.tool.js +254 -0
- package/dist/mcp-server/tools/definitions/lookup-gene.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/predict-variant.tool.d.ts +58 -0
- package/dist/mcp-server/tools/definitions/predict-variant.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/predict-variant.tool.js +246 -0
- package/dist/mcp-server/tools/definitions/predict-variant.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/query-region.tool.d.ts +48 -0
- package/dist/mcp-server/tools/definitions/query-region.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/query-region.tool.js +162 -0
- package/dist/mcp-server/tools/definitions/query-region.tool.js.map +1 -0
- package/dist/services/ensembl/ensembl-service.d.ts +32 -0
- package/dist/services/ensembl/ensembl-service.d.ts.map +1 -0
- package/dist/services/ensembl/ensembl-service.js +366 -0
- package/dist/services/ensembl/ensembl-service.js.map +1 -0
- package/dist/services/ensembl/types.d.ts +289 -0
- package/dist/services/ensembl/types.d.ts.map +1 -0
- package/dist/services/ensembl/types.js +6 -0
- package/dist/services/ensembl/types.js.map +1 -0
- package/package.json +106 -0
- package/server.json +113 -0
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Ensembl REST API service — HTTP client, rate-limit-aware retry,
|
|
3
|
+
* error normalization, and typed methods per endpoint family.
|
|
4
|
+
* @module services/ensembl/ensembl-service
|
|
5
|
+
*/
|
|
6
|
+
import { notFound, serviceUnavailable, validationError } from '@cyanheads/mcp-ts-core/errors';
|
|
7
|
+
import { requestContextService, withRetry } from '@cyanheads/mcp-ts-core/utils';
|
|
8
|
+
import { getServerConfig } from '../../config/server-config.js';
|
|
9
|
+
// --- Normalizers ---
|
|
10
|
+
function normalizeGene(raw) {
|
|
11
|
+
const desc = raw.description?.split('[')[0]?.trim();
|
|
12
|
+
return {
|
|
13
|
+
id: raw.id,
|
|
14
|
+
...(raw.species && { species: raw.species }),
|
|
15
|
+
...(raw.display_name && { displayName: raw.display_name }),
|
|
16
|
+
...(desc ? { description: desc } : {}),
|
|
17
|
+
...(raw.biotype && { biotype: raw.biotype }),
|
|
18
|
+
...(raw.seq_region_name && { chromosome: raw.seq_region_name }),
|
|
19
|
+
...(typeof raw.start === 'number' && { start: raw.start }),
|
|
20
|
+
...(typeof raw.end === 'number' && { end: raw.end }),
|
|
21
|
+
...(typeof raw.strand === 'number' && { strand: raw.strand }),
|
|
22
|
+
...(raw.assembly_name && { assemblyName: raw.assembly_name }),
|
|
23
|
+
...(raw.Transcript && {
|
|
24
|
+
transcripts: raw.Transcript.map((t) => ({
|
|
25
|
+
id: t.id,
|
|
26
|
+
...(t.display_name && { displayName: t.display_name }),
|
|
27
|
+
...(t.biotype && { biotype: t.biotype }),
|
|
28
|
+
isCanonical: t.is_canonical === 1,
|
|
29
|
+
...(typeof t.start === 'number' && { start: t.start }),
|
|
30
|
+
...(typeof t.end === 'number' && { end: t.end }),
|
|
31
|
+
...(typeof t.strand === 'number' && { strand: t.strand }),
|
|
32
|
+
...(typeof t.length === 'number' && { lengthInBp: t.length }),
|
|
33
|
+
})),
|
|
34
|
+
}),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function normalizeTranscript(raw) {
|
|
38
|
+
return {
|
|
39
|
+
id: raw.id,
|
|
40
|
+
...(raw.Parent && { parentGeneId: raw.Parent }),
|
|
41
|
+
...(raw.display_name && { displayName: raw.display_name }),
|
|
42
|
+
...(raw.biotype && { biotype: raw.biotype }),
|
|
43
|
+
isCanonical: raw.is_canonical === 1,
|
|
44
|
+
...(raw.species && { species: raw.species }),
|
|
45
|
+
...(raw.seq_region_name && { chromosome: raw.seq_region_name }),
|
|
46
|
+
...(typeof raw.start === 'number' && { start: raw.start }),
|
|
47
|
+
...(typeof raw.end === 'number' && { end: raw.end }),
|
|
48
|
+
...(typeof raw.strand === 'number' && { strand: raw.strand }),
|
|
49
|
+
...(raw.assembly_name && { assemblyName: raw.assembly_name }),
|
|
50
|
+
...(typeof raw.length === 'number' && { lengthInBp: raw.length }),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function normalizeSequence(raw, type) {
|
|
54
|
+
return {
|
|
55
|
+
id: raw.id,
|
|
56
|
+
type,
|
|
57
|
+
seq: raw.seq,
|
|
58
|
+
lengthInBp: raw.seq.length,
|
|
59
|
+
...(raw.desc && { description: raw.desc }),
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function normalizeOverlapFeature(raw) {
|
|
63
|
+
return {
|
|
64
|
+
...(raw.id && { id: raw.id }),
|
|
65
|
+
...(raw.external_name && { name: raw.external_name }),
|
|
66
|
+
featureType: raw.feature_type ?? 'unknown',
|
|
67
|
+
...(raw.biotype && { biotype: raw.biotype }),
|
|
68
|
+
chromosome: raw.seq_region_name ?? '',
|
|
69
|
+
start: raw.start ?? 0,
|
|
70
|
+
end: raw.end ?? 0,
|
|
71
|
+
...(typeof raw.strand === 'number' && { strand: raw.strand }),
|
|
72
|
+
...(raw.description && { description: raw.description }),
|
|
73
|
+
...(raw.consequence_type && { consequenceType: raw.consequence_type }),
|
|
74
|
+
...(raw.clinical_significance?.length && {
|
|
75
|
+
clinicalSignificance: raw.clinical_significance,
|
|
76
|
+
}),
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
function normalizeVep(raw) {
|
|
80
|
+
return {
|
|
81
|
+
...(raw.input && { input: raw.input }),
|
|
82
|
+
...(raw.seq_region_name && { chromosome: raw.seq_region_name }),
|
|
83
|
+
...(typeof raw.start === 'number' && { start: raw.start }),
|
|
84
|
+
...(typeof raw.end === 'number' && { end: raw.end }),
|
|
85
|
+
...(raw.assembly_name && { assemblyName: raw.assembly_name }),
|
|
86
|
+
...(raw.most_severe_consequence && {
|
|
87
|
+
mostSevereConsequence: raw.most_severe_consequence,
|
|
88
|
+
}),
|
|
89
|
+
transcriptConsequences: (raw.transcript_consequences ?? []).map((tc) => ({
|
|
90
|
+
...(tc.transcript_id && { transcriptId: tc.transcript_id }),
|
|
91
|
+
...(tc.gene_id && { geneId: tc.gene_id }),
|
|
92
|
+
...(tc.gene_symbol && { geneSymbol: tc.gene_symbol }),
|
|
93
|
+
consequenceTerms: tc.consequence_terms ?? [],
|
|
94
|
+
...(tc.impact && { impact: tc.impact }),
|
|
95
|
+
...(tc.biotype && { biotype: tc.biotype }),
|
|
96
|
+
...(tc.hgvsc && { hgvsc: tc.hgvsc }),
|
|
97
|
+
...(tc.hgvsp && { hgvsp: tc.hgvsp }),
|
|
98
|
+
...(tc.amino_acids && { aminoAcids: tc.amino_acids }),
|
|
99
|
+
...(tc.sift && { sift: tc.sift }),
|
|
100
|
+
...(tc.polyphen && { polyphen: tc.polyphen }),
|
|
101
|
+
})),
|
|
102
|
+
colocatedVariants: (raw.colocated_variants ?? []).map((cv) => ({
|
|
103
|
+
...(cv.id && { id: cv.id }),
|
|
104
|
+
...(cv.allele_string && { alleleString: cv.allele_string }),
|
|
105
|
+
...(cv.clinical_significance?.length && {
|
|
106
|
+
clinicalSignificance: cv.clinical_significance,
|
|
107
|
+
}),
|
|
108
|
+
...(cv.pubmed?.length && { pubmed: cv.pubmed }),
|
|
109
|
+
})),
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
function normalizeHomology(raw, sourceId) {
|
|
113
|
+
const dataEntry = raw.data?.find((d) => d.id === sourceId) ?? raw.data?.[0];
|
|
114
|
+
if (!dataEntry?.homologies)
|
|
115
|
+
return [];
|
|
116
|
+
return dataEntry.homologies.map((h) => ({
|
|
117
|
+
targetId: h.target?.id ?? h.id,
|
|
118
|
+
...(h.target?.species
|
|
119
|
+
? { targetSpecies: h.target.species }
|
|
120
|
+
: h.species
|
|
121
|
+
? { targetSpecies: h.species }
|
|
122
|
+
: {}),
|
|
123
|
+
...(h.type && { type: h.type }),
|
|
124
|
+
...(typeof (h.target?.perc_id ?? h.perc_id) === 'number' && {
|
|
125
|
+
percId: h.target?.perc_id ?? h.perc_id,
|
|
126
|
+
}),
|
|
127
|
+
...(typeof (h.target?.perc_pos ?? h.perc_pos) === 'number' && {
|
|
128
|
+
percPos: h.target?.perc_pos ?? h.perc_pos,
|
|
129
|
+
}),
|
|
130
|
+
...(h.taxonomy_level && { taxonomyLevel: h.taxonomy_level }),
|
|
131
|
+
}));
|
|
132
|
+
}
|
|
133
|
+
function normalizeXref(raw) {
|
|
134
|
+
return {
|
|
135
|
+
...(raw.dbname && { dbname: raw.dbname }),
|
|
136
|
+
...(raw.db_display_name && { dbDisplayName: raw.db_display_name }),
|
|
137
|
+
...(raw.primary_id && { primaryId: raw.primary_id }),
|
|
138
|
+
...(raw.display_id && { displayId: raw.display_id }),
|
|
139
|
+
...(raw.description && { description: raw.description }),
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
function normalizeSpecies(raw) {
|
|
143
|
+
return (raw.species ?? []).map((s) => ({
|
|
144
|
+
name: s.name ?? '',
|
|
145
|
+
...(s.display_name && { displayName: s.display_name }),
|
|
146
|
+
...(s.common_name && { commonName: s.common_name }),
|
|
147
|
+
...(s.taxon_id && { taxonId: s.taxon_id }),
|
|
148
|
+
...(s.assembly && { assembly: s.assembly }),
|
|
149
|
+
...(s.division && { division: s.division }),
|
|
150
|
+
}));
|
|
151
|
+
}
|
|
152
|
+
// --- Service ---
|
|
153
|
+
export class EnsemblService {
|
|
154
|
+
baseUrl;
|
|
155
|
+
constructor(_config, _storage) {
|
|
156
|
+
this.baseUrl = getServerConfig().baseUrl;
|
|
157
|
+
}
|
|
158
|
+
// --- Core fetch ---
|
|
159
|
+
async fetchJson(path, ctx, options) {
|
|
160
|
+
const url = `${this.baseUrl}${path}`;
|
|
161
|
+
const method = options?.method ?? 'GET';
|
|
162
|
+
const fetchOptions = {
|
|
163
|
+
method,
|
|
164
|
+
headers: {
|
|
165
|
+
Accept: 'application/json',
|
|
166
|
+
'Content-Type': 'application/json',
|
|
167
|
+
},
|
|
168
|
+
signal: options?.signal ?? ctx.signal,
|
|
169
|
+
};
|
|
170
|
+
if (options?.body !== undefined) {
|
|
171
|
+
fetchOptions.body = JSON.stringify(options.body);
|
|
172
|
+
}
|
|
173
|
+
ctx.log.debug('Ensembl request', { url, method });
|
|
174
|
+
const response = await fetch(url, fetchOptions);
|
|
175
|
+
if (response.status === 429) {
|
|
176
|
+
const retryAfter = response.headers.get('Retry-After');
|
|
177
|
+
throw serviceUnavailable(`Ensembl rate limit exceeded.${retryAfter ? ` Retry after ${retryAfter}s.` : ''}`, { retryAfter: retryAfter ? Number(retryAfter) : undefined });
|
|
178
|
+
}
|
|
179
|
+
const text = await response.text();
|
|
180
|
+
// Detect HTML error pages
|
|
181
|
+
if (/^\s*<(!DOCTYPE\s+html|html[\s>])/i.test(text)) {
|
|
182
|
+
throw serviceUnavailable('Ensembl API returned HTML instead of JSON — service may be degraded.');
|
|
183
|
+
}
|
|
184
|
+
let parsed;
|
|
185
|
+
try {
|
|
186
|
+
parsed = JSON.parse(text);
|
|
187
|
+
}
|
|
188
|
+
catch {
|
|
189
|
+
throw serviceUnavailable(`Ensembl API returned unparseable response.`, {
|
|
190
|
+
status: response.status,
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
// Ensembl error envelope: { error: "..." }
|
|
194
|
+
if (typeof parsed === 'object' &&
|
|
195
|
+
parsed !== null &&
|
|
196
|
+
'error' in parsed &&
|
|
197
|
+
typeof parsed.error === 'string') {
|
|
198
|
+
const msg = parsed.error;
|
|
199
|
+
// Classify based on message content
|
|
200
|
+
if (/not found|not exist|does not exist|no stable id/i.test(msg)) {
|
|
201
|
+
throw notFound(msg);
|
|
202
|
+
}
|
|
203
|
+
if (/invalid|unrecognized|malformed|bad request/i.test(msg)) {
|
|
204
|
+
throw validationError(msg);
|
|
205
|
+
}
|
|
206
|
+
// Generic API error — treat as not found for ID-based lookups
|
|
207
|
+
throw notFound(msg);
|
|
208
|
+
}
|
|
209
|
+
if (!response.ok) {
|
|
210
|
+
throw serviceUnavailable(`Ensembl API returned HTTP ${response.status}.`, {
|
|
211
|
+
status: response.status,
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
return parsed;
|
|
215
|
+
}
|
|
216
|
+
// --- withRetry wrapper ---
|
|
217
|
+
fetchWithRetry(path, ctx, options) {
|
|
218
|
+
const operation = `EnsemblService.fetch:${path.split('?')[0]}`;
|
|
219
|
+
const reqCtx = requestContextService.createRequestContext({
|
|
220
|
+
operation,
|
|
221
|
+
parentContext: { requestId: ctx.requestId },
|
|
222
|
+
});
|
|
223
|
+
return withRetry(() => this.fetchJson(path, ctx, options), {
|
|
224
|
+
operation,
|
|
225
|
+
context: reqCtx,
|
|
226
|
+
baseDelayMs: 1000,
|
|
227
|
+
signal: ctx.signal,
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
// --- Gene lookup ---
|
|
231
|
+
async lookupGene(symbol, species, expandTranscripts, ctx) {
|
|
232
|
+
const expand = expandTranscripts ? '?expand=1' : '';
|
|
233
|
+
const path = `/lookup/symbol/${encodeURIComponent(species)}/${encodeURIComponent(symbol)}${expand}`;
|
|
234
|
+
const raw = await this.fetchWithRetry(path, ctx);
|
|
235
|
+
return normalizeGene(raw);
|
|
236
|
+
}
|
|
237
|
+
async lookupGeneById(id, expandTranscripts, ctx) {
|
|
238
|
+
const expand = expandTranscripts ? '?expand=1' : '';
|
|
239
|
+
const path = `/lookup/id/${encodeURIComponent(id)}${expand}`;
|
|
240
|
+
const raw = await this.fetchWithRetry(path, ctx);
|
|
241
|
+
return normalizeGene(raw);
|
|
242
|
+
}
|
|
243
|
+
async lookupGenesBatch(ids, expandTranscripts, ctx) {
|
|
244
|
+
const body = { ids };
|
|
245
|
+
if (expandTranscripts)
|
|
246
|
+
body.expand = 1;
|
|
247
|
+
const raw = await this.fetchWithRetry('/lookup/id', ctx, {
|
|
248
|
+
method: 'POST',
|
|
249
|
+
body,
|
|
250
|
+
});
|
|
251
|
+
const result = new Map();
|
|
252
|
+
for (const [k, v] of Object.entries(raw)) {
|
|
253
|
+
if (v)
|
|
254
|
+
result.set(k, normalizeGene(v));
|
|
255
|
+
}
|
|
256
|
+
return result;
|
|
257
|
+
}
|
|
258
|
+
async lookupSymbolsBatch(symbols, species, expandTranscripts, ctx) {
|
|
259
|
+
const body = { symbols };
|
|
260
|
+
if (expandTranscripts)
|
|
261
|
+
body.expand = 1;
|
|
262
|
+
const raw = await this.fetchWithRetry(`/lookup/symbol/${encodeURIComponent(species)}`, ctx, { method: 'POST', body });
|
|
263
|
+
const result = new Map();
|
|
264
|
+
for (const [k, v] of Object.entries(raw)) {
|
|
265
|
+
if (v)
|
|
266
|
+
result.set(k, normalizeGene(v));
|
|
267
|
+
}
|
|
268
|
+
return result;
|
|
269
|
+
}
|
|
270
|
+
// --- Transcript lookup ---
|
|
271
|
+
async lookupTranscript(id, ctx) {
|
|
272
|
+
const path = `/lookup/id/${encodeURIComponent(id)}`;
|
|
273
|
+
const raw = await this.fetchWithRetry(path, ctx);
|
|
274
|
+
return normalizeTranscript(raw);
|
|
275
|
+
}
|
|
276
|
+
// --- Sequence ---
|
|
277
|
+
async getSequenceById(id, type, ctx) {
|
|
278
|
+
const path = `/sequence/id/${encodeURIComponent(id)}?type=${encodeURIComponent(type)}`;
|
|
279
|
+
const raw = await this.fetchWithRetry(path, ctx);
|
|
280
|
+
return normalizeSequence(raw, type);
|
|
281
|
+
}
|
|
282
|
+
async getSequenceByRegion(species, region, expand5prime, expand3prime, ctx) {
|
|
283
|
+
let path = `/sequence/region/${encodeURIComponent(species)}/${encodeURIComponent(region)}`;
|
|
284
|
+
const params = [];
|
|
285
|
+
if (expand5prime > 0)
|
|
286
|
+
params.push(`expand_5prime=${expand5prime}`);
|
|
287
|
+
if (expand3prime > 0)
|
|
288
|
+
params.push(`expand_3prime=${expand3prime}`);
|
|
289
|
+
if (params.length > 0)
|
|
290
|
+
path += `?${params.join('&')}`;
|
|
291
|
+
const raw = await this.fetchWithRetry(path, ctx);
|
|
292
|
+
return normalizeSequence(raw, 'genomic');
|
|
293
|
+
}
|
|
294
|
+
// --- Overlap/region ---
|
|
295
|
+
async queryRegion(species, region, features, biotype, ctx) {
|
|
296
|
+
const featureParams = features.map((f) => `feature=${encodeURIComponent(f)}`).join('&');
|
|
297
|
+
let path = `/overlap/region/${encodeURIComponent(species)}/${encodeURIComponent(region)}?${featureParams}`;
|
|
298
|
+
if (biotype)
|
|
299
|
+
path += `&biotype=${encodeURIComponent(biotype)}`;
|
|
300
|
+
const raw = await this.fetchWithRetry(path, ctx);
|
|
301
|
+
if (!Array.isArray(raw))
|
|
302
|
+
return [];
|
|
303
|
+
return raw.map(normalizeOverlapFeature);
|
|
304
|
+
}
|
|
305
|
+
// --- VEP ---
|
|
306
|
+
async predictVariantHgvs(notation, species, ctx) {
|
|
307
|
+
const path = `/vep/${encodeURIComponent(species)}/hgvs/${encodeURIComponent(notation)}`;
|
|
308
|
+
const raw = await this.fetchWithRetry(path, ctx);
|
|
309
|
+
if (!Array.isArray(raw))
|
|
310
|
+
return [];
|
|
311
|
+
return raw.map(normalizeVep);
|
|
312
|
+
}
|
|
313
|
+
async predictVariantRegion(chr, start, end, strand, allele, species, ctx) {
|
|
314
|
+
const regionAllele = `${encodeURIComponent(`${chr}:${start}:${end}:${strand}`)}/${encodeURIComponent(allele)}`;
|
|
315
|
+
const path = `/vep/${encodeURIComponent(species)}/region/${regionAllele}`;
|
|
316
|
+
const raw = await this.fetchWithRetry(path, ctx);
|
|
317
|
+
if (!Array.isArray(raw))
|
|
318
|
+
return [];
|
|
319
|
+
return raw.map(normalizeVep);
|
|
320
|
+
}
|
|
321
|
+
// --- Homology ---
|
|
322
|
+
async getHomologyBySymbol(symbol, species, type, targetSpecies, ctx) {
|
|
323
|
+
let path = `/homology/symbol/${encodeURIComponent(species)}/${encodeURIComponent(symbol)}?type=${encodeURIComponent(type)}`;
|
|
324
|
+
if (targetSpecies)
|
|
325
|
+
path += `&target_species=${encodeURIComponent(targetSpecies)}`;
|
|
326
|
+
const raw = await this.fetchWithRetry(path, ctx);
|
|
327
|
+
return normalizeHomology(raw, symbol);
|
|
328
|
+
}
|
|
329
|
+
async getHomologyById(id, species, type, targetSpecies, ctx) {
|
|
330
|
+
let path = `/homology/id/${encodeURIComponent(species)}/${encodeURIComponent(id)}?type=${encodeURIComponent(type)}`;
|
|
331
|
+
if (targetSpecies)
|
|
332
|
+
path += `&target_species=${encodeURIComponent(targetSpecies)}`;
|
|
333
|
+
const raw = await this.fetchWithRetry(path, ctx);
|
|
334
|
+
return normalizeHomology(raw, id);
|
|
335
|
+
}
|
|
336
|
+
// --- Xrefs ---
|
|
337
|
+
async getXrefsById(id, dbname, ctx) {
|
|
338
|
+
let path = `/xrefs/id/${encodeURIComponent(id)}`;
|
|
339
|
+
if (dbname)
|
|
340
|
+
path += `?external_db=${encodeURIComponent(dbname)}`;
|
|
341
|
+
const raw = await this.fetchWithRetry(path, ctx);
|
|
342
|
+
if (!Array.isArray(raw))
|
|
343
|
+
return [];
|
|
344
|
+
return raw.map(normalizeXref);
|
|
345
|
+
}
|
|
346
|
+
// --- Species ---
|
|
347
|
+
async listSpecies(division, ctx) {
|
|
348
|
+
let path = '/info/species';
|
|
349
|
+
if (division)
|
|
350
|
+
path += `?division=${encodeURIComponent(division)}`;
|
|
351
|
+
const raw = await this.fetchWithRetry(path, ctx);
|
|
352
|
+
return normalizeSpecies(raw);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
// --- Init/accessor pattern ---
|
|
356
|
+
let _service;
|
|
357
|
+
export function initEnsemblService(config, storage) {
|
|
358
|
+
_service = new EnsemblService(config, storage);
|
|
359
|
+
}
|
|
360
|
+
export function getEnsemblService() {
|
|
361
|
+
if (!_service) {
|
|
362
|
+
throw new Error('EnsemblService not initialized — call initEnsemblService() in setup()');
|
|
363
|
+
}
|
|
364
|
+
return _service;
|
|
365
|
+
}
|
|
366
|
+
//# sourceMappingURL=ensembl-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ensembl-service.js","sourceRoot":"","sources":["../../../src/services/ensembl/ensembl-service.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAE9F,OAAO,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAqB5D,sBAAsB;AAEtB,SAAS,aAAa,CAAC,GAAkB;IACvC,MAAM,IAAI,GAAG,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC;IACpD,OAAO;QACL,EAAE,EAAE,GAAG,CAAC,EAAE;QACV,GAAG,CAAC,GAAG,CAAC,OAAO,IAAI,EAAE,OAAO,EAAE,GAAG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G,GAAG,MAAM,IAAI,CAAC,cAAc,CAAqB,IAAI,EAAE,GAAG,CAAC,CAAC;QACrE,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;CACF;AAED,gCAAgC;AAEhC,IAAI,QAAoC,CAAC;AAEzC,MAAM,UAAU,kBAAkB,CAAC,MAAiB,EAAE,OAAuB;IAC3E,QAAQ,GAAG,IAAI,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC/B,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;IAC3F,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Ensembl REST API response types confirmed against live API payloads.
|
|
3
|
+
* @module services/ensembl/types
|
|
4
|
+
*/
|
|
5
|
+
export type RawGeneRecord = {
|
|
6
|
+
id: string;
|
|
7
|
+
display_name?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
biotype?: string;
|
|
10
|
+
species?: string;
|
|
11
|
+
seq_region_name?: string;
|
|
12
|
+
start?: number;
|
|
13
|
+
end?: number;
|
|
14
|
+
strand?: number;
|
|
15
|
+
assembly_name?: string;
|
|
16
|
+
Transcript?: RawTranscriptSummary[];
|
|
17
|
+
is_canonical?: number;
|
|
18
|
+
version?: number;
|
|
19
|
+
object_type?: string;
|
|
20
|
+
logic_name?: string;
|
|
21
|
+
db_type?: string;
|
|
22
|
+
source?: string;
|
|
23
|
+
};
|
|
24
|
+
export type RawTranscriptSummary = {
|
|
25
|
+
id: string;
|
|
26
|
+
display_name?: string;
|
|
27
|
+
biotype?: string;
|
|
28
|
+
is_canonical?: number;
|
|
29
|
+
start?: number;
|
|
30
|
+
end?: number;
|
|
31
|
+
strand?: number;
|
|
32
|
+
length?: number;
|
|
33
|
+
Parent?: string;
|
|
34
|
+
object_type?: string;
|
|
35
|
+
};
|
|
36
|
+
export type RawTranscriptRecord = {
|
|
37
|
+
id: string;
|
|
38
|
+
display_name?: string;
|
|
39
|
+
biotype?: string;
|
|
40
|
+
is_canonical?: number;
|
|
41
|
+
start?: number;
|
|
42
|
+
end?: number;
|
|
43
|
+
strand?: number;
|
|
44
|
+
length?: number;
|
|
45
|
+
Parent?: string;
|
|
46
|
+
species?: string;
|
|
47
|
+
seq_region_name?: string;
|
|
48
|
+
assembly_name?: string;
|
|
49
|
+
Exon?: Array<{
|
|
50
|
+
id: string;
|
|
51
|
+
start: number;
|
|
52
|
+
end: number;
|
|
53
|
+
strand: number;
|
|
54
|
+
}>;
|
|
55
|
+
object_type?: string;
|
|
56
|
+
db_type?: string;
|
|
57
|
+
source?: string;
|
|
58
|
+
version?: number;
|
|
59
|
+
};
|
|
60
|
+
export type RawSequenceRecord = {
|
|
61
|
+
id: string;
|
|
62
|
+
seq: string;
|
|
63
|
+
molecule?: string;
|
|
64
|
+
desc?: string;
|
|
65
|
+
version?: number;
|
|
66
|
+
query?: string;
|
|
67
|
+
};
|
|
68
|
+
export type RawOverlapFeature = {
|
|
69
|
+
id?: string;
|
|
70
|
+
external_name?: string;
|
|
71
|
+
biotype?: string;
|
|
72
|
+
feature_type?: string;
|
|
73
|
+
seq_region_name?: string;
|
|
74
|
+
start?: number;
|
|
75
|
+
end?: number;
|
|
76
|
+
strand?: number;
|
|
77
|
+
assembly_name?: string;
|
|
78
|
+
description?: string;
|
|
79
|
+
consequence_type?: string;
|
|
80
|
+
clinical_significance?: string[];
|
|
81
|
+
alleles?: string[];
|
|
82
|
+
source?: string;
|
|
83
|
+
};
|
|
84
|
+
export type RawVepTranscriptConsequence = {
|
|
85
|
+
transcript_id?: string;
|
|
86
|
+
gene_id?: string;
|
|
87
|
+
gene_symbol?: string;
|
|
88
|
+
consequence_terms?: string[];
|
|
89
|
+
impact?: string;
|
|
90
|
+
biotype?: string;
|
|
91
|
+
strand?: number;
|
|
92
|
+
amino_acids?: string;
|
|
93
|
+
codons?: string;
|
|
94
|
+
hgvsc?: string;
|
|
95
|
+
hgvsp?: string;
|
|
96
|
+
protein_id?: string;
|
|
97
|
+
sift?: {
|
|
98
|
+
prediction: string;
|
|
99
|
+
score: number;
|
|
100
|
+
};
|
|
101
|
+
polyphen?: {
|
|
102
|
+
prediction: string;
|
|
103
|
+
score: number;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
export type RawColocatedVariant = {
|
|
107
|
+
id?: string;
|
|
108
|
+
allele_string?: string;
|
|
109
|
+
clinical_significance?: string[];
|
|
110
|
+
frequencies?: Record<string, unknown>;
|
|
111
|
+
pubmed?: number[];
|
|
112
|
+
somatic?: number;
|
|
113
|
+
};
|
|
114
|
+
export type RawVepRecord = {
|
|
115
|
+
input?: string;
|
|
116
|
+
allele_string?: string;
|
|
117
|
+
start?: number;
|
|
118
|
+
end?: number;
|
|
119
|
+
strand?: number;
|
|
120
|
+
seq_region_name?: string;
|
|
121
|
+
assembly_name?: string;
|
|
122
|
+
most_severe_consequence?: string;
|
|
123
|
+
transcript_consequences?: RawVepTranscriptConsequence[];
|
|
124
|
+
colocated_variants?: RawColocatedVariant[];
|
|
125
|
+
};
|
|
126
|
+
export type RawHomologyEntry = {
|
|
127
|
+
id: string;
|
|
128
|
+
species?: string;
|
|
129
|
+
type?: string;
|
|
130
|
+
perc_id?: number;
|
|
131
|
+
perc_pos?: number;
|
|
132
|
+
taxonomy_level?: string;
|
|
133
|
+
target?: {
|
|
134
|
+
id?: string;
|
|
135
|
+
species?: string;
|
|
136
|
+
perc_id?: number;
|
|
137
|
+
perc_pos?: number;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
export type RawHomologyResponse = {
|
|
141
|
+
data?: Array<{
|
|
142
|
+
id: string;
|
|
143
|
+
homologies?: RawHomologyEntry[];
|
|
144
|
+
}>;
|
|
145
|
+
};
|
|
146
|
+
export type RawXrefEntry = {
|
|
147
|
+
dbname?: string;
|
|
148
|
+
db_display_name?: string;
|
|
149
|
+
primary_id?: string;
|
|
150
|
+
display_id?: string;
|
|
151
|
+
description?: string;
|
|
152
|
+
info_type?: string;
|
|
153
|
+
synonyms?: string[];
|
|
154
|
+
version?: string;
|
|
155
|
+
};
|
|
156
|
+
export type RawSpeciesInfo = {
|
|
157
|
+
name?: string;
|
|
158
|
+
display_name?: string;
|
|
159
|
+
common_name?: string;
|
|
160
|
+
taxon_id?: string;
|
|
161
|
+
assembly?: string;
|
|
162
|
+
division?: string;
|
|
163
|
+
groups?: string[];
|
|
164
|
+
aliases?: string[];
|
|
165
|
+
accession?: string;
|
|
166
|
+
strain?: string;
|
|
167
|
+
};
|
|
168
|
+
export type RawSpeciesResponse = {
|
|
169
|
+
species?: RawSpeciesInfo[];
|
|
170
|
+
};
|
|
171
|
+
export type EnsemblErrorEnvelope = {
|
|
172
|
+
error: string;
|
|
173
|
+
};
|
|
174
|
+
export type GeneRecord = {
|
|
175
|
+
id: string;
|
|
176
|
+
species?: string;
|
|
177
|
+
displayName?: string;
|
|
178
|
+
description?: string;
|
|
179
|
+
biotype?: string;
|
|
180
|
+
chromosome?: string;
|
|
181
|
+
start?: number;
|
|
182
|
+
end?: number;
|
|
183
|
+
strand?: number;
|
|
184
|
+
assemblyName?: string;
|
|
185
|
+
transcripts?: TranscriptSummary[];
|
|
186
|
+
};
|
|
187
|
+
export type TranscriptSummary = {
|
|
188
|
+
id: string;
|
|
189
|
+
displayName?: string;
|
|
190
|
+
biotype?: string;
|
|
191
|
+
isCanonical: boolean;
|
|
192
|
+
start?: number;
|
|
193
|
+
end?: number;
|
|
194
|
+
strand?: number;
|
|
195
|
+
lengthInBp?: number;
|
|
196
|
+
};
|
|
197
|
+
export type TranscriptRecord = {
|
|
198
|
+
id: string;
|
|
199
|
+
parentGeneId?: string;
|
|
200
|
+
displayName?: string;
|
|
201
|
+
biotype?: string;
|
|
202
|
+
isCanonical: boolean;
|
|
203
|
+
species?: string;
|
|
204
|
+
chromosome?: string;
|
|
205
|
+
start?: number;
|
|
206
|
+
end?: number;
|
|
207
|
+
strand?: number;
|
|
208
|
+
assemblyName?: string;
|
|
209
|
+
lengthInBp?: number;
|
|
210
|
+
};
|
|
211
|
+
export type SequenceRecord = {
|
|
212
|
+
id: string;
|
|
213
|
+
type: string;
|
|
214
|
+
seq: string;
|
|
215
|
+
lengthInBp: number;
|
|
216
|
+
description?: string;
|
|
217
|
+
};
|
|
218
|
+
export type OverlapFeature = {
|
|
219
|
+
id?: string;
|
|
220
|
+
name?: string;
|
|
221
|
+
featureType: string;
|
|
222
|
+
biotype?: string;
|
|
223
|
+
chromosome: string;
|
|
224
|
+
start: number;
|
|
225
|
+
end: number;
|
|
226
|
+
strand?: number;
|
|
227
|
+
description?: string;
|
|
228
|
+
consequenceType?: string;
|
|
229
|
+
clinicalSignificance?: string[];
|
|
230
|
+
};
|
|
231
|
+
export type VepConsequence = {
|
|
232
|
+
transcriptId?: string;
|
|
233
|
+
geneId?: string;
|
|
234
|
+
geneSymbol?: string;
|
|
235
|
+
consequenceTerms: string[];
|
|
236
|
+
impact?: string;
|
|
237
|
+
biotype?: string;
|
|
238
|
+
hgvsc?: string;
|
|
239
|
+
hgvsp?: string;
|
|
240
|
+
aminoAcids?: string;
|
|
241
|
+
sift?: {
|
|
242
|
+
prediction: string;
|
|
243
|
+
score: number;
|
|
244
|
+
};
|
|
245
|
+
polyphen?: {
|
|
246
|
+
prediction: string;
|
|
247
|
+
score: number;
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
export type ColocatedVariant = {
|
|
251
|
+
id?: string;
|
|
252
|
+
alleleString?: string;
|
|
253
|
+
clinicalSignificance?: string[];
|
|
254
|
+
pubmed?: number[];
|
|
255
|
+
};
|
|
256
|
+
export type VepRecord = {
|
|
257
|
+
input?: string;
|
|
258
|
+
chromosome?: string;
|
|
259
|
+
start?: number;
|
|
260
|
+
end?: number;
|
|
261
|
+
assemblyName?: string;
|
|
262
|
+
mostSevereConsequence?: string;
|
|
263
|
+
transcriptConsequences: VepConsequence[];
|
|
264
|
+
colocatedVariants: ColocatedVariant[];
|
|
265
|
+
};
|
|
266
|
+
export type HomologyEntry = {
|
|
267
|
+
targetId: string;
|
|
268
|
+
targetSpecies?: string;
|
|
269
|
+
type?: string;
|
|
270
|
+
percId?: number;
|
|
271
|
+
percPos?: number;
|
|
272
|
+
taxonomyLevel?: string;
|
|
273
|
+
};
|
|
274
|
+
export type XrefEntry = {
|
|
275
|
+
dbname?: string;
|
|
276
|
+
dbDisplayName?: string;
|
|
277
|
+
primaryId?: string;
|
|
278
|
+
displayId?: string;
|
|
279
|
+
description?: string;
|
|
280
|
+
};
|
|
281
|
+
export type SpeciesInfo = {
|
|
282
|
+
name: string;
|
|
283
|
+
displayName?: string;
|
|
284
|
+
commonName?: string;
|
|
285
|
+
taxonId?: string;
|
|
286
|
+
assembly?: string;
|
|
287
|
+
division?: string;
|
|
288
|
+
};
|
|
289
|
+
//# sourceMappingURL=types.d.ts.map
|