p2s_mapper 1.3.0 → 2.0.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.
Files changed (94) hide show
  1. package/README.md +214 -32
  2. package/dist/alphaFoldModels.d.ts +4 -0
  3. package/dist/alphaFoldModels.js +4 -0
  4. package/dist/alphaFoldModels.js.map +1 -1
  5. package/dist/coordinates.d.ts +8 -6
  6. package/dist/coordinates.js.map +1 -1
  7. package/dist/dbIds.d.ts +1 -2
  8. package/dist/dbIds.js +5 -1
  9. package/dist/dbIds.js.map +1 -1
  10. package/dist/extractPerResidueConfidence.d.ts +1 -2
  11. package/dist/extractStructureSequences.d.ts +14 -15
  12. package/dist/fetchUtils.js +19 -1
  13. package/dist/fetchUtils.js.map +1 -1
  14. package/dist/index.d.ts +1 -3
  15. package/dist/index.js +2 -4
  16. package/dist/index.js.map +1 -1
  17. package/dist/isoformRanking.d.ts +3 -0
  18. package/dist/pairwiseAlignment.d.ts +1 -2
  19. package/dist/pdbEntry.d.ts +32 -0
  20. package/dist/pdbEntry.js +182 -0
  21. package/dist/pdbEntry.js.map +1 -0
  22. package/dist/pdbUniProtMapping.d.ts +9 -33
  23. package/dist/pdbUniProtMapping.js +17 -134
  24. package/dist/pdbUniProtMapping.js.map +1 -1
  25. package/dist/structureSources.d.ts +37 -13
  26. package/dist/structureSources.js +144 -57
  27. package/dist/structureSources.js.map +1 -1
  28. package/dist/structureUrls.d.ts +2 -0
  29. package/dist/structureUrls.js +11 -0
  30. package/dist/structureUrls.js.map +1 -1
  31. package/esm/alphaFoldModels.d.ts +4 -0
  32. package/esm/alphaFoldModels.js +4 -0
  33. package/esm/alphaFoldModels.js.map +1 -1
  34. package/esm/coordinates.d.ts +8 -6
  35. package/esm/coordinates.js.map +1 -1
  36. package/esm/dbIds.d.ts +1 -2
  37. package/esm/dbIds.js +5 -1
  38. package/esm/dbIds.js.map +1 -1
  39. package/esm/extractPerResidueConfidence.d.ts +1 -2
  40. package/esm/extractStructureSequences.d.ts +14 -15
  41. package/esm/fetchUtils.js +19 -1
  42. package/esm/fetchUtils.js.map +1 -1
  43. package/esm/index.d.ts +1 -3
  44. package/esm/index.js +2 -4
  45. package/esm/index.js.map +1 -1
  46. package/esm/isoformRanking.d.ts +3 -0
  47. package/esm/pairwiseAlignment.d.ts +1 -2
  48. package/esm/pdbEntry.d.ts +32 -0
  49. package/esm/pdbEntry.js +174 -0
  50. package/esm/pdbEntry.js.map +1 -0
  51. package/esm/pdbUniProtMapping.d.ts +9 -33
  52. package/esm/pdbUniProtMapping.js +17 -131
  53. package/esm/pdbUniProtMapping.js.map +1 -1
  54. package/esm/structureSources.d.ts +37 -13
  55. package/esm/structureSources.js +139 -55
  56. package/esm/structureSources.js.map +1 -1
  57. package/esm/structureUrls.d.ts +2 -0
  58. package/esm/structureUrls.js +9 -0
  59. package/esm/structureUrls.js.map +1 -1
  60. package/package.json +3 -2
  61. package/src/alphaFoldModels.ts +12 -0
  62. package/src/coordinates.ts +3 -4
  63. package/src/dbIds.ts +6 -2
  64. package/src/extractPerResidueConfidence.ts +1 -1
  65. package/src/extractStructureSequences.ts +14 -14
  66. package/src/fetchUtils.ts +23 -1
  67. package/src/index.ts +2 -4
  68. package/src/isoformRanking.ts +3 -3
  69. package/src/pairwiseAlignment.ts +1 -1
  70. package/src/pdbEntry.ts +240 -0
  71. package/src/pdbUniProtMapping.ts +20 -158
  72. package/src/structureSources.ts +194 -70
  73. package/src/structureUrls.ts +11 -0
  74. package/dist/pdbeBestStructures.d.ts +0 -23
  75. package/dist/pdbeBestStructures.js +0 -79
  76. package/dist/pdbeBestStructures.js.map +0 -1
  77. package/dist/pdbeEntryMolecules.d.ts +0 -7
  78. package/dist/pdbeEntryMolecules.js +0 -39
  79. package/dist/pdbeEntryMolecules.js.map +0 -1
  80. package/dist/siftsNumbering.d.ts +0 -23
  81. package/dist/siftsNumbering.js +0 -44
  82. package/dist/siftsNumbering.js.map +0 -1
  83. package/esm/pdbeBestStructures.d.ts +0 -23
  84. package/esm/pdbeBestStructures.js +0 -73
  85. package/esm/pdbeBestStructures.js.map +0 -1
  86. package/esm/pdbeEntryMolecules.d.ts +0 -7
  87. package/esm/pdbeEntryMolecules.js +0 -35
  88. package/esm/pdbeEntryMolecules.js.map +0 -1
  89. package/esm/siftsNumbering.d.ts +0 -23
  90. package/esm/siftsNumbering.js +0 -40
  91. package/esm/siftsNumbering.js.map +0 -1
  92. package/src/pdbeBestStructures.ts +0 -94
  93. package/src/pdbeEntryMolecules.ts +0 -37
  94. package/src/siftsNumbering.ts +0 -61
@@ -0,0 +1,182 @@
1
+ "use strict";
2
+ // What RCSB knows about one PDB entry that a mapping needs, in one GraphQL
3
+ // call: each polymer entity's sequence, its author chains, and its alignment
4
+ // to UniProt. The alignment is what SIFTS publishes per chain, numbered the
5
+ // same way (`entity_beg_seq_id` is label_seq_id, 1-based into the SEQRES),
6
+ // and agreed with PDBe's SIFTS on every residue of 23 entries checked
7
+ // (2026-10-11, 1TUP, 2RH1, 4HHB, 7K00 among them), in a tenth of the time.
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.RCSB_DATA_GRAPHQL_URL = void 0;
10
+ exports.pdbEntryQuery = pdbEntryQuery;
11
+ exports.graphqlFetch = graphqlFetch;
12
+ exports.fetchPdbEntry = fetchPdbEntry;
13
+ exports.fetchUniProtStructureMappings = fetchUniProtStructureMappings;
14
+ exports.parsePdbEntry = parsePdbEntry;
15
+ const fetchUtils_ts_1 = require("./fetchUtils.js");
16
+ exports.RCSB_DATA_GRAPHQL_URL = 'https://data.rcsb.org/graphql';
17
+ function pdbEntryQuery(pdbId) {
18
+ return `{ entry(entry_id: "${pdbId.toUpperCase()}") { polymer_entities {
19
+ rcsb_id
20
+ entity_poly { type pdbx_seq_one_letter_code_can }
21
+ rcsb_polymer_entity_container_identifiers { auth_asym_ids }
22
+ rcsb_polymer_entity_align {
23
+ reference_database_name reference_database_accession
24
+ aligned_regions { entity_beg_seq_id ref_beg_seq_id length }
25
+ }
26
+ uniprots { rcsb_id rcsb_uniprot_entry_name }
27
+ } } }`;
28
+ }
29
+ const RETRY_DELAYS_MS = [1000, 3000];
30
+ // bounded, since a view reports itself loading until the entry answers
31
+ const TIMEOUT_MS = 20_000;
32
+ /**
33
+ * A GraphQL request. The server answers 200 whatever happened, so a failure
34
+ * is read from the body's `errors`, and counts as a 400: the server
35
+ * understood the query and declined it, so asking again gets the same answer.
36
+ */
37
+ async function graphqlFetch(url, query, variables, opts) {
38
+ const json = await (0, fetchUtils_ts_1.jsonfetch)(url, {
39
+ ...opts,
40
+ method: 'POST',
41
+ headers: { 'Content-Type': 'application/json' },
42
+ body: JSON.stringify({ query, variables }),
43
+ });
44
+ const errors = isRecord(json) ? json.errors : undefined;
45
+ if (Array.isArray(errors) && errors.length > 0) {
46
+ const first = errors[0];
47
+ const message = isRecord(first) && typeof first.message === 'string'
48
+ ? first.message
49
+ : 'unknown error';
50
+ throw new fetchUtils_ts_1.HttpError(`${new URL(url).host}: ${message}`, 400);
51
+ }
52
+ return isRecord(json) ? json.data : undefined;
53
+ }
54
+ /**
55
+ * The entry, retried twice: one failed request would otherwise leave a fusion
56
+ * construct mapped onto its partner for the whole session. An id RCSB has no
57
+ * entry for is a 404, which is not retried, since that answer cannot change.
58
+ */
59
+ async function fetchPdbEntry(pdbId, opts) {
60
+ const { signal: caller, ...rest } = opts ?? {};
61
+ const signal = caller ?? undefined;
62
+ const deadline = () => signal
63
+ ? AbortSignal.any([signal, AbortSignal.timeout(TIMEOUT_MS)])
64
+ : AbortSignal.timeout(TIMEOUT_MS);
65
+ for (let attempt = 0;; attempt++) {
66
+ try {
67
+ const entry = parsePdbEntry(await graphqlFetch(exports.RCSB_DATA_GRAPHQL_URL, pdbEntryQuery(pdbId), undefined, { ...rest, signal: deadline() }));
68
+ if (!entry) {
69
+ throw new fetchUtils_ts_1.HttpError(`RCSB has no entry ${pdbId.toUpperCase()}`, 404);
70
+ }
71
+ return entry;
72
+ }
73
+ catch (e) {
74
+ const delay = RETRY_DELAYS_MS[attempt];
75
+ // the caller's own abort is not a failure to retry either
76
+ if (delay === undefined || (0, fetchUtils_ts_1.isDefinitiveFailure)(e) || signal?.aborted) {
77
+ throw e;
78
+ }
79
+ await (0, fetchUtils_ts_1.timeout)(delay, signal);
80
+ }
81
+ }
82
+ }
83
+ /** The entry's UniProt alignment alone. */
84
+ async function fetchUniProtStructureMappings(pdbId, opts) {
85
+ return (await fetchPdbEntry(pdbId, opts)).mappings;
86
+ }
87
+ function isRecord(value) {
88
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
89
+ }
90
+ function finiteNumber(value) {
91
+ return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
92
+ }
93
+ function strings(value) {
94
+ return Array.isArray(value)
95
+ ? value.filter((v) => typeof v === 'string')
96
+ : [];
97
+ }
98
+ /**
99
+ * Parses the `data` of `pdbEntryQuery`. Undefined when RCSB has no such
100
+ * entry; an entry nothing aligns to UniProt (DNA alone, say) parses to no
101
+ * mappings. An unparseable alignment is skipped rather than failing the
102
+ * entry, so a chimera with one malformed region still maps its other chains.
103
+ */
104
+ function parsePdbEntry(data) {
105
+ const entry = isRecord(data) ? data.entry : undefined;
106
+ if (!isRecord(entry)) {
107
+ return undefined;
108
+ }
109
+ const entities = Array.isArray(entry.polymer_entities)
110
+ ? entry.polymer_entities.filter(isRecord)
111
+ : [];
112
+ const byAccession = new Map();
113
+ const proteinSequences = [];
114
+ for (const entity of entities.toSorted((a, b) => entityNumber(a.rcsb_id) - entityNumber(b.rcsb_id))) {
115
+ const entityId = String(entityNumber(entity.rcsb_id));
116
+ const poly = isRecord(entity.entity_poly) ? entity.entity_poly : undefined;
117
+ const sequence = poly?.pdbx_seq_one_letter_code_can;
118
+ if (typeof poly?.type === 'string' &&
119
+ poly.type.startsWith('polypeptide') &&
120
+ typeof sequence === 'string' &&
121
+ sequence.length > 0) {
122
+ proteinSequences.push(sequence);
123
+ }
124
+ const ids = entity.rcsb_polymer_entity_container_identifiers;
125
+ const chains = strings(isRecord(ids) ? ids.auth_asym_ids : undefined);
126
+ const names = new Map((Array.isArray(entity.uniprots) ? entity.uniprots : [])
127
+ .filter(isRecord)
128
+ .map(u => [u.rcsb_id, strings(u.rcsb_uniprot_entry_name)[0]]));
129
+ for (const align of Array.isArray(entity.rcsb_polymer_entity_align)
130
+ ? entity.rcsb_polymer_entity_align.filter(isRecord)
131
+ : []) {
132
+ const accession = align.reference_database_accession;
133
+ if (align.reference_database_name !== 'UniProt' ||
134
+ typeof accession !== 'string') {
135
+ continue;
136
+ }
137
+ const segments = (Array.isArray(align.aligned_regions) ? align.aligned_regions : []).flatMap(region => parseSegments(region, entityId, chains));
138
+ if (segments.length === 0) {
139
+ continue;
140
+ }
141
+ const mapping = byAccession.get(accession) ?? {
142
+ accession,
143
+ name: names.get(accession),
144
+ segments: [],
145
+ };
146
+ mapping.segments.push(...segments);
147
+ byAccession.set(accession, mapping);
148
+ }
149
+ }
150
+ return { mappings: [...byAccession.values()], proteinSequences };
151
+ }
152
+ function entityNumber(rcsbId) {
153
+ return typeof rcsbId === 'string' ? Number(rcsbId.split('_')[1]) : NaN;
154
+ }
155
+ /** One segment per chain carrying the entity, so a PDB-format file, whose
156
+ * entities Mol* numbers per chain, still matches by chain. */
157
+ function parseSegments(region, entityId, chains) {
158
+ if (!isRecord(region)) {
159
+ return [];
160
+ }
161
+ const entityBeg = finiteNumber(region.entity_beg_seq_id);
162
+ const refBeg = finiteNumber(region.ref_beg_seq_id);
163
+ const length = finiteNumber(region.length);
164
+ if (entityBeg === undefined ||
165
+ refBeg === undefined ||
166
+ length === undefined ||
167
+ length < 1) {
168
+ return [];
169
+ }
170
+ const segment = {
171
+ entityId,
172
+ unpStart: refBeg,
173
+ unpEnd: refBeg + length - 1,
174
+ // SEQRES/label_seq_id is 1-based, structure positions are 0-based
175
+ structStart: entityBeg - 1,
176
+ structEnd: entityBeg + length - 2,
177
+ };
178
+ return chains.length === 0
179
+ ? [segment]
180
+ : chains.map(chainId => ({ ...segment, chainId }));
181
+ }
182
+ //# sourceMappingURL=pdbEntry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pdbEntry.js","sourceRoot":"","sources":["../src/pdbEntry.ts"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,6EAA6E;AAC7E,4EAA4E;AAC5E,2EAA2E;AAC3E,sEAAsE;AACtE,2EAA2E;;;AAyB3E,sCAWC;AAWD,oCAsBC;AAOD,sCAiCC;AAGD,sEAKC;AAsBD,sCAyDC;AAlMD,mDAKwB;AAQX,QAAA,qBAAqB,GAAG,+BAA+B,CAAA;AAUpE,SAAgB,aAAa,CAAC,KAAa;IACzC,OAAO,sBAAsB,KAAK,CAAC,WAAW,EAAE;;;;;;;;;MAS5C,CAAA;AACN,CAAC;AAED,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;AACpC,uEAAuE;AACvE,MAAM,UAAU,GAAG,MAAM,CAAA;AAEzB;;;;GAIG;AACI,KAAK,UAAU,YAAY,CAChC,GAAW,EACX,KAAa,EACb,SAA8C,EAC9C,IAAmB;IAEnB,MAAM,IAAI,GAAY,MAAM,IAAA,yBAAS,EAAC,GAAG,EAAE;QACzC,GAAG,IAAI;QACP,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;KAC3C,CAAC,CAAA;IACF,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAA;IACvD,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/C,MAAM,KAAK,GAAY,MAAM,CAAC,CAAC,CAAC,CAAA;QAChC,MAAM,OAAO,GACX,Q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AAO,CAAC;QACX,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,CAAA;AACtD,CAAC"}
@@ -1,19 +1,14 @@
1
- import type { FetchOptions } from './fetchUtils.ts';
2
1
  /** One contiguous UniProt <-> structure correspondence for a single entity.
3
2
  * `unp*` are 1-based UniProt positions; `struct*` are 0-based inclusive
4
- * structure-sequence positions, this plugin's native coordinate. */
3
+ * structure-sequence positions, this package's native coordinate. */
5
4
  export interface UniProtStructureSegment {
6
5
  entityId: string;
7
- /** author chain id, when the response names it */
6
+ /** author chain id, when the source names it */
8
7
  chainId?: string;
9
8
  unpStart: number;
10
9
  unpEnd: number;
11
10
  structStart: number;
12
11
  structEnd: number;
13
- /** the endpoints' author residue numbers, the numbering a paper cites and a
14
- * Mol* hover shows; absent when the response omits them */
15
- authorStart?: number;
16
- authorEnd?: number;
17
12
  }
18
13
  export interface UniProtStructureMapping {
19
14
  accession: string;
@@ -27,27 +22,7 @@ export interface UniProtStructureMapping {
27
22
  * the feature instead of drawing it somewhere misleading.
28
23
  */
29
24
  export type MapUniProtPosition = (uniprotPos: number) => number | undefined;
30
- export declare function pdbeSiftsUrl(pdbId: string): string;
31
- /**
32
- * SIFTS for an entry, retried twice: one failed request would otherwise leave a
33
- * fusion construct mapped onto its partner for the whole session.
34
- *
35
- * A 4xx is not retried. PDBe answers 404 for an entry it has no UniProt
36
- * mapping for at all — a DNA-only or obsolete entry — and that answer cannot
37
- * change, so the retries only postponed it: measured 2026-09-16, `1hhb` and
38
- * `1bna` each took three requests and ~4.8s to say so, which a caller shows as
39
- * four and a half seconds of "resolving" for a structure that will never
40
- * resolve.
41
- */
42
- export declare function fetchUniProtStructureMappings(pdbId: string, opts?: FetchOptions): Promise<UniProtStructureMapping[]>;
43
- /**
44
- * Parses a PDBe `mappings/uniprot/{pdbId}` response into one entry per UniProt
45
- * accession. Unparseable segments are skipped rather than failing the whole
46
- * response — a chimera with one malformed segment still maps its other chains.
47
- * The response is keyed by pdb id, so the single entry is taken whatever its key.
48
- */
49
- export declare function parseUniProtStructureMappings(json: unknown): UniProtStructureMapping[];
50
- /** The entity a SIFTS segment is matched against: its mmCIF id and the author
25
+ /** The entity a segment is matched against: its mmCIF id and the author
51
26
  * chains carrying it. */
52
27
  export interface SegmentEntity {
53
28
  entityId: string;
@@ -63,10 +38,11 @@ export interface SegmentEntity {
63
38
  */
64
39
  export declare function chooseUniProtMappingForEntity(mappings: UniProtStructureMapping[], entity: SegmentEntity | undefined): UniProtStructureMapping | undefined;
65
40
  /**
66
- * Mapped structure positions that SIFTS assigns to a protein other than the
67
- * transcript's, on a chain that fuses two. Local alignment bridges a fusion
68
- * boundary, and on every GPCR fusion construct checked it scattered receptor
69
- * residues onto the partner, 33 of them onto T4 lysozyme in 2RH1.
41
+ * Mapped structure positions the entry's UniProt alignment assigns to a
42
+ * protein other than the transcript's, on a chain that fuses two. Local
43
+ * alignment bridges a fusion boundary, and on every GPCR fusion construct
44
+ * checked it scattered receptor residues onto the partner, 33 of them onto T4
45
+ * lysozyme in 2RH1.
70
46
  *
71
47
  * `mapped` is each mapped structure position and whether its pair is
72
48
  * identical. The transcript's own accession is the one whose covered positions
@@ -75,7 +51,7 @@ export declare function chooseUniProtMappingForEntity(mappings: UniProtStructure
75
51
  * fused to CDK2 covers 11 positions against 224 chance hits on the kinase, and
76
52
  * counting unmapped the peptide. Unless that accession reaches half identity
77
53
  * the transcript is taken to be neither protein, and nothing is unmapped.
78
- * Residues SIFTS assigns to no accession, such as tags, stay mapped.
54
+ * Residues assigned to no accession, such as tags, stay mapped.
79
55
  */
80
56
  export declare function fusionPartnerPositions(mappings: UniProtStructureMapping[], entity: SegmentEntity | undefined, mapped: ReadonlyMap<number, boolean>): Set<number>;
81
57
  /** 1-based UniProt position -> 0-based structure position, for an AlphaFold
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // SIFTS UniProt <-> PDB residue mapping.
2
+ // UniProt <-> PDB residue mapping.
3
3
  //
4
4
  // UniProt feature coordinates are positions in the UniProt canonical sequence.
5
5
  // For an AlphaFold model that *is* the structure's own sequence, so a feature at
@@ -7,142 +7,24 @@
7
7
  // entry it is not: the deposited construct is usually a fragment, often with
8
8
  // tags or engineered residues, so the two numberings differ by a per-segment
9
9
  // offset (1TUP's p53 chain starts at UniProt 94; 6VXX's spike SEQRES 33 is
10
- // UniProt 14). SIFTS is the authoritative alignment between the two, published
11
- // per entity/chain by PDBe.
10
+ // UniProt 14). The entry's own UniProt alignment, which `fetchPdbEntry` reads
11
+ // from RCSB, is the authority on that correspondence.
12
12
  //
13
- // `residue_number` in the PDBe response is the 1-based index into the entity's
14
- // SEQRES, i.e. label_seq_id, which is exactly this plugin's structure-sequence
15
- // position + 1 (see applyLociInteractivity.ts for the other place that boundary
16
- // is crossed).
13
+ // Structure positions here index the entity's SEQRES from 0, i.e.
14
+ // label_seq_id - 1, which is this package's structure-sequence position.
17
15
  Object.defineProperty(exports, "__esModule", { value: true });
18
16
  exports.identityUniProtPositionMap = void 0;
19
- exports.pdbeSiftsUrl = pdbeSiftsUrl;
20
- exports.fetchUniProtStructureMappings = fetchUniProtStructureMappings;
21
- exports.parseUniProtStructureMappings = parseUniProtStructureMappings;
22
17
  exports.chooseUniProtMappingForEntity = chooseUniProtMappingForEntity;
23
18
  exports.fusionPartnerPositions = fusionPartnerPositions;
24
19
  exports.makeUniProtPositionMap = makeUniProtPositionMap;
25
- const fetchUtils_ts_1 = require("./fetchUtils.js");
26
- function pdbeSiftsUrl(pdbId) {
27
- return `https://www.ebi.ac.uk/pdbe/api/mappings/uniprot/${pdbId.toLowerCase()}`;
28
- }
29
- const SIFTS_RETRY_DELAYS_MS = [1000, 3000];
30
- // bounded, since a view reports itself loading until SIFTS answers
31
- const SIFTS_TIMEOUT_MS = 20_000;
32
- /**
33
- * SIFTS for an entry, retried twice: one failed request would otherwise leave a
34
- * fusion construct mapped onto its partner for the whole session.
35
- *
36
- * A 4xx is not retried. PDBe answers 404 for an entry it has no UniProt
37
- * mapping for at all — a DNA-only or obsolete entry — and that answer cannot
38
- * change, so the retries only postponed it: measured 2026-09-16, `1hhb` and
39
- * `1bna` each took three requests and ~4.8s to say so, which a caller shows as
40
- * four and a half seconds of "resolving" for a structure that will never
41
- * resolve.
42
- */
43
- async function fetchUniProtStructureMappings(pdbId, opts) {
44
- const { signal: caller, ...rest } = opts ?? {};
45
- const signal = caller ?? undefined;
46
- const deadline = () => signal
47
- ? AbortSignal.any([signal, AbortSignal.timeout(SIFTS_TIMEOUT_MS)])
48
- : AbortSignal.timeout(SIFTS_TIMEOUT_MS);
49
- for (let attempt = 0;; attempt++) {
50
- try {
51
- return parseUniProtStructureMappings(await (0, fetchUtils_ts_1.jsonfetch)(pdbeSiftsUrl(pdbId), { ...rest, signal: deadline() }));
52
- }
53
- catch (e) {
54
- const delay = SIFTS_RETRY_DELAYS_MS[attempt];
55
- // the caller's own abort is not a failure to retry either
56
- if (delay === undefined || (0, fetchUtils_ts_1.isDefinitiveFailure)(e) || signal?.aborted) {
57
- throw e;
58
- }
59
- await (0, fetchUtils_ts_1.timeout)(delay, signal);
60
- }
61
- }
62
- }
63
- function isRecord(value) {
64
- return typeof value === 'object' && value !== null && !Array.isArray(value);
65
- }
66
- function finiteNumber(value) {
67
- return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
68
- }
69
- function residueNumber(endpoint) {
70
- return isRecord(endpoint) ? finiteNumber(endpoint.residue_number) : undefined;
71
- }
72
- function authorResidueNumber(endpoint) {
73
- return isRecord(endpoint)
74
- ? finiteNumber(endpoint.author_residue_number)
75
- : undefined;
76
- }
77
- function parseSegment(mapping) {
78
- if (!isRecord(mapping)) {
79
- return undefined;
80
- }
81
- const entityId = finiteNumber(mapping.entity_id);
82
- const unpStart = finiteNumber(mapping.unp_start);
83
- const unpEnd = finiteNumber(mapping.unp_end);
84
- const structStart = residueNumber(mapping.start);
85
- const structEnd = residueNumber(mapping.end);
86
- const authorStart = authorResidueNumber(mapping.start);
87
- const authorEnd = authorResidueNumber(mapping.end);
88
- return entityId === undefined ||
89
- unpStart === undefined ||
90
- unpEnd === undefined ||
91
- structStart === undefined ||
92
- structEnd === undefined
93
- ? undefined
94
- : {
95
- entityId: String(entityId),
96
- ...(typeof mapping.chain_id === 'string'
97
- ? { chainId: mapping.chain_id }
98
- : {}),
99
- unpStart,
100
- unpEnd,
101
- // SEQRES/label_seq_id is 1-based, structure positions are 0-based
102
- structStart: structStart - 1,
103
- structEnd: structEnd - 1,
104
- ...(authorStart === undefined ? {} : { authorStart }),
105
- ...(authorEnd === undefined ? {} : { authorEnd }),
106
- };
107
- }
108
- /**
109
- * Parses a PDBe `mappings/uniprot/{pdbId}` response into one entry per UniProt
110
- * accession. Unparseable segments are skipped rather than failing the whole
111
- * response — a chimera with one malformed segment still maps its other chains.
112
- * The response is keyed by pdb id, so the single entry is taken whatever its key.
113
- */
114
- function parseUniProtStructureMappings(json) {
115
- const entry = isRecord(json) ? Object.values(json)[0] : undefined;
116
- const uniprot = isRecord(entry) ? entry.UniProt : undefined;
117
- if (!isRecord(uniprot)) {
118
- return [];
119
- }
120
- const result = [];
121
- for (const [accession, value] of Object.entries(uniprot)) {
122
- const mappings = isRecord(value) ? value.mappings : undefined;
123
- const segments = Array.isArray(mappings)
124
- ? mappings.map(parseSegment).filter(s => s !== undefined)
125
- : [];
126
- if (segments.length > 0) {
127
- result.push({
128
- accession,
129
- name: isRecord(value) && typeof value.name === 'string'
130
- ? value.name
131
- : undefined,
132
- segments,
133
- });
134
- }
135
- }
136
- return result;
137
- }
138
20
  function coveredResidues(segments) {
139
21
  return segments.reduce((a, s) => a + (s.structEnd - s.structStart + 1), 0);
140
22
  }
141
23
  /**
142
- * The segments of one accession that describe this entity. SIFTS numbers
143
- * entities as the mmCIF does, and a PDB-format file loaded through Mol* numbers
144
- * them per chain (1H26.pdb's chain C is entity 2, which in SIFTS is cyclin A),
145
- * so a segment naming its chain is matched by chain.
24
+ * The segments of one accession that describe this entity. The mapping
25
+ * numbers entities as the mmCIF does, and a PDB-format file loaded through
26
+ * Mol* numbers them per chain (1H26.pdb's chain C is entity 2, which in the
27
+ * mmCIF is cyclin A), so a segment naming its chain is matched by chain.
146
28
  */
147
29
  function segmentsForEntity(mapping, entity) {
148
30
  return dedupeSegments(mapping.segments.filter(s => s.chainId === undefined
@@ -174,10 +56,11 @@ function chooseUniProtMappingForEntity(mappings, entity) {
174
56
  const OWN_PSEUDOCOUNT = 5;
175
57
  const MIN_OWN_IDENTITY = 0.5;
176
58
  /**
177
- * Mapped structure positions that SIFTS assigns to a protein other than the
178
- * transcript's, on a chain that fuses two. Local alignment bridges a fusion
179
- * boundary, and on every GPCR fusion construct checked it scattered receptor
180
- * residues onto the partner, 33 of them onto T4 lysozyme in 2RH1.
59
+ * Mapped structure positions the entry's UniProt alignment assigns to a
60
+ * protein other than the transcript's, on a chain that fuses two. Local
61
+ * alignment bridges a fusion boundary, and on every GPCR fusion construct
62
+ * checked it scattered receptor residues onto the partner, 33 of them onto T4
63
+ * lysozyme in 2RH1.
181
64
  *
182
65
  * `mapped` is each mapped structure position and whether its pair is
183
66
  * identical. The transcript's own accession is the one whose covered positions
@@ -186,7 +69,7 @@ const MIN_OWN_IDENTITY = 0.5;
186
69
  * fused to CDK2 covers 11 positions against 224 chance hits on the kinase, and
187
70
  * counting unmapped the peptide. Unless that accession reaches half identity
188
71
  * the transcript is taken to be neither protein, and nothing is unmapped.
189
- * Residues SIFTS assigns to no accession, such as tags, stay mapped.
72
+ * Residues assigned to no accession, such as tags, stay mapped.
190
73
  */
191
74
  function fusionPartnerPositions(mappings, entity, mapped) {
192
75
  const partners = new Set();
@@ -223,8 +106,8 @@ function fusionPartnerPositions(mappings, entity, mapped) {
223
106
  }
224
107
  return partners;
225
108
  }
226
- // SIFTS lists one mapping per *chain*, so the several chains of a homodimer
227
- // repeat the same entity-level correspondence. They collapse to one segment.
109
+ // The mapping lists one segment per *chain*, so the several chains of a
110
+ // homodimer repeat the same entity-level correspondence. They collapse to one.
228
111
  function dedupeSegments(segments) {
229
112
  const seen = new Set();
230
113
  return segments.filter(s => {
@@ -1 +1 @@
1
- {"version":3,"file":"pdbUniProtMapping.js","sourceRoot":"","sources":["../src/pdbUniProtMapping.ts"],"names":[],"mappings":";AAAA,yCAAyC;AACzC,EAAE;AACF,+EAA+E;AAC/E,iFAAiF;AACjF,+EAA+E;AAC/E,6EAA6E;AAC7E,6EAA6E;AAC7E,2EAA2E;AAC3E,+EAA+E;AAC/E,4BAA4B;AAC5B,EAAE;AACF,+EAA+E;AAC/E,+EAA+E;AAC/E,gFAAgF;AAChF,eAAe;;;AAqCf,oCAEC;AAiBD,sEAwBC;AA0DD,sEA0BC;AAwCD,sEAkBC;AAoBD,wDAyCC;AAmBD,wDAaC;AAzTD,mDAAyE;AAmCzE,SAAgB,YAAY,CAAC,KAAa;IACxC,OAAO,mDAAmD,KAAK,CAAC,WAAW,EAAE,EAAE,CAAA;AACjF,CAAC;AAED,MAAM,qBAAqB,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;AAC1C,mEAAmE;AACnE,MAAM,gBAAgB,GAAG,MAAM,CAAA;AAE/B;;;;;;;;;;GAUG;AACI,KAAK,UAAU,6BAA6B,CACjD,KAAa,EACb,IAAmB;IAEnB,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,IAAI,EAAE,CAAA;IAC9C,MAAM,MAAM,GAAG,MAAM,IAAI,SAAS,CAAA;IAClC,MAAM,QAAQ,GAAG,GAAG,EAAE,CACpB,MAAM;QACJ,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC;QAClE,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAA;IAC3C,KAAK,IAAI,OAAO,GAAG,CAAC,GAAI,O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equence-coordinates.rcsb.org/graphql";
2
3
  export interface ExperimentalStructure {
3
4
  pdbId: string;
5
+ /** RCSB's name for it: 'X-ray', 'EM', 'NMR', ... */
4
6
  method: string;
5
7
  /** Å; absent for NMR and some EM entries */
6
8
  resolution?: number;
@@ -9,20 +11,42 @@ export interface ExperimentalStructure {
9
11
  end: number;
10
12
  /** fraction of the UniProt sequence the entry covers, 0..1 */
11
13
  coverage: number;
14
+ /** author chain ids carrying the protein */
15
+ chains: string[];
12
16
  }
13
- export declare function beaconsSummaryUrl(uniprotId: string): string;
17
+ /** One polymer entity aligned to the accession. */
18
+ export interface EntityAlignment {
19
+ /** RCSB's id, "1TUP_3" */
20
+ entityId: string;
21
+ pdbId: string;
22
+ start: number;
23
+ end: number;
24
+ coverage: number;
25
+ }
26
+ export interface EntityDetails {
27
+ method: string;
28
+ resolution?: number;
29
+ chains: string[];
30
+ }
31
+ export declare function entityAlignmentsQuery(uniprotId: string): string;
32
+ export declare const ENTITY_DETAILS_QUERY = "query($ids: [String!]!) { polymer_entities(entity_ids: $ids) {\n rcsb_id\n rcsb_polymer_entity_container_identifiers { auth_asym_ids }\n entry { rcsb_entry_info { experimental_method resolution_combined } }\n} }";
33
+ /**
34
+ * PDB entities only: the same list carries RCSB's computed models
35
+ * (`AF_AFP04637F1_1`), which a residue mapping does not exist for. The range
36
+ * spans every aligned region, as 3D-Beacons reported it.
37
+ */
38
+ export declare function parseEntityAlignments(data: unknown): EntityAlignment[];
39
+ export declare function parseEntityDetails(data: unknown): Map<string, EntityDetails>;
40
+ /**
41
+ * One row per entry, best coverage first and sharpest within a tie. An entry
42
+ * with several entities of the protein (a construct crystallised beside a
43
+ * different fragment of itself) takes the best-covering entity's range and
44
+ * every entity's chains.
45
+ */
46
+ export declare function experimentalStructures(alignments: EntityAlignment[], details: ReadonlyMap<string, EntityDetails>): ExperimentalStructure[];
14
47
  /**
15
- * PDBe entries only, best-covering first and sharpest within a tie.
16
- *
17
- * Predicted entries (AlphaFold, SWISS-MODEL, AlphaFill) are left out because a
18
- * prediction comes from AlphaFold's own API, which answers per model. And
19
- * 3D-Beacons files SASBDB's small-angle-scattering fits under "experimentally
20
- * determined" too, with numeric ids and near-full coverage — dystrophin's best
21
- * "structure" by coverage was SASBDB 436 — which are not entries a residue
22
- * mapping exists for. Hence the `provider === 'PDBe'` gate rather than the
23
- * category alone.
48
+ * Every PDB entry aligned to the accession. An accession with none, or one
49
+ * RCSB does not know, is `[]`; an isoform accession is asked as its entry,
50
+ * which is what the alignment is numbered on.
24
51
  */
25
- export declare function parseExperimentalStructures(json: unknown): ExperimentalStructure[];
26
- /** Best-effort: an unreachable API reads as "no entries", which costs a
27
- * structure suggestion and nothing else. */
28
52
  export declare function fetchExperimentalStructures(uniprotId: string, opts?: FetchOptions): Promise<ExperimentalStructure[]>;