p2s_mapper 1.4.0 → 2.1.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/README.md +220 -39
- package/dist/alignmentQuality.d.ts +5 -5
- package/dist/alphaFoldModels.d.ts +4 -4
- package/dist/alphaFoldModels.js +4 -4
- package/dist/chooseMappedEntity.d.ts +11 -13
- package/dist/chooseMappedEntity.js +9 -12
- package/dist/chooseMappedEntity.js.map +1 -1
- package/dist/coordinates.d.ts +19 -19
- package/dist/coordinates.js.map +1 -1
- package/dist/dbIds.d.ts +1 -2
- package/dist/extractPerResidueConfidence.d.ts +1 -2
- package/dist/extractStructureSequences.d.ts +26 -34
- package/dist/extractStructureSequences.js +2 -2
- package/dist/extractStructureSequences.js.map +1 -1
- package/dist/fetchUtils.d.ts +7 -7
- package/dist/fetchUtils.js +26 -8
- package/dist/fetchUtils.js.map +1 -1
- package/dist/index.d.ts +1 -3
- package/dist/index.js +2 -4
- package/dist/index.js.map +1 -1
- package/dist/isoformRanking.d.ts +4 -1
- package/dist/mappings.d.ts +9 -12
- package/dist/mappings.js +4 -5
- package/dist/mappings.js.map +1 -1
- package/dist/pairwiseAlignment.d.ts +5 -4
- package/dist/pairwiseAlignment.js +9 -7
- package/dist/pairwiseAlignment.js.map +1 -1
- package/dist/pdbEntry.d.ts +32 -0
- package/dist/pdbEntry.js +182 -0
- package/dist/pdbEntry.js.map +1 -0
- package/dist/pdbUniProtMapping.d.ts +14 -39
- package/dist/pdbUniProtMapping.js +22 -140
- package/dist/pdbUniProtMapping.js.map +1 -1
- package/dist/structureFormat.d.ts +11 -18
- package/dist/structureFormat.js +4 -6
- package/dist/structureFormat.js.map +1 -1
- package/dist/structureSources.d.ts +37 -13
- package/dist/structureSources.js +144 -57
- package/dist/structureSources.js.map +1 -1
- package/dist/structureUrls.d.ts +13 -16
- package/dist/structureUrls.js +25 -23
- package/dist/structureUrls.js.map +1 -1
- package/dist/types.d.ts +2 -5
- package/dist/types.js +2 -5
- package/dist/types.js.map +1 -1
- package/dist/uniProtSearch.js +3 -8
- package/dist/uniProtSearch.js.map +1 -1
- package/esm/alignmentQuality.d.ts +5 -5
- package/esm/alphaFoldModels.d.ts +4 -4
- package/esm/alphaFoldModels.js +4 -4
- package/esm/chooseMappedEntity.d.ts +11 -13
- package/esm/chooseMappedEntity.js +9 -12
- package/esm/chooseMappedEntity.js.map +1 -1
- package/esm/coordinates.d.ts +19 -19
- package/esm/coordinates.js.map +1 -1
- package/esm/dbIds.d.ts +1 -2
- package/esm/extractPerResidueConfidence.d.ts +1 -2
- package/esm/extractStructureSequences.d.ts +26 -34
- package/esm/extractStructureSequences.js +2 -2
- package/esm/extractStructureSequences.js.map +1 -1
- package/esm/fetchUtils.d.ts +7 -7
- package/esm/fetchUtils.js +26 -8
- package/esm/fetchUtils.js.map +1 -1
- package/esm/index.d.ts +1 -3
- package/esm/index.js +2 -4
- package/esm/index.js.map +1 -1
- package/esm/isoformRanking.d.ts +4 -1
- package/esm/mappings.d.ts +9 -12
- package/esm/mappings.js +4 -5
- package/esm/mappings.js.map +1 -1
- package/esm/pairwiseAlignment.d.ts +5 -4
- package/esm/pairwiseAlignment.js +7 -5
- package/esm/pairwiseAlignment.js.map +1 -1
- package/esm/pdbEntry.d.ts +32 -0
- package/esm/pdbEntry.js +174 -0
- package/esm/pdbEntry.js.map +1 -0
- package/esm/pdbUniProtMapping.d.ts +14 -39
- package/esm/pdbUniProtMapping.js +22 -137
- package/esm/pdbUniProtMapping.js.map +1 -1
- package/esm/structureFormat.d.ts +11 -18
- package/esm/structureFormat.js +4 -6
- package/esm/structureFormat.js.map +1 -1
- package/esm/structureSources.d.ts +37 -13
- package/esm/structureSources.js +139 -55
- package/esm/structureSources.js.map +1 -1
- package/esm/structureUrls.d.ts +13 -16
- package/esm/structureUrls.js +23 -23
- package/esm/structureUrls.js.map +1 -1
- package/esm/types.d.ts +2 -5
- package/esm/types.js +2 -5
- package/esm/types.js.map +1 -1
- package/esm/uniProtSearch.js +3 -8
- package/esm/uniProtSearch.js.map +1 -1
- package/package.json +3 -2
- package/src/alignmentQuality.ts +5 -5
- package/src/alphaFoldModels.ts +4 -4
- package/src/chooseMappedEntity.ts +12 -15
- package/src/coordinates.ts +14 -17
- package/src/dbIds.ts +1 -1
- package/src/extractPerResidueConfidence.ts +1 -1
- package/src/extractStructureSequences.ts +26 -33
- package/src/fetchUtils.ts +30 -8
- package/src/index.ts +2 -4
- package/src/isoformRanking.ts +4 -4
- package/src/mappings.ts +9 -12
- package/src/pairwiseAlignment.ts +12 -9
- package/src/pdbEntry.ts +240 -0
- package/src/pdbUniProtMapping.ts +25 -164
- package/src/structureFormat.ts +11 -18
- package/src/structureSources.ts +194 -70
- package/src/structureUrls.ts +25 -23
- package/src/types.ts +2 -5
- package/src/uniProtSearch.ts +3 -8
- package/dist/pdbeBestStructures.d.ts +0 -23
- package/dist/pdbeBestStructures.js +0 -79
- package/dist/pdbeBestStructures.js.map +0 -1
- package/dist/pdbeEntryMolecules.d.ts +0 -7
- package/dist/pdbeEntryMolecules.js +0 -39
- package/dist/pdbeEntryMolecules.js.map +0 -1
- package/dist/siftsNumbering.d.ts +0 -23
- package/dist/siftsNumbering.js +0 -44
- package/dist/siftsNumbering.js.map +0 -1
- package/esm/pdbeBestStructures.d.ts +0 -23
- package/esm/pdbeBestStructures.js +0 -73
- package/esm/pdbeBestStructures.js.map +0 -1
- package/esm/pdbeEntryMolecules.d.ts +0 -7
- package/esm/pdbeEntryMolecules.js +0 -35
- package/esm/pdbeEntryMolecules.js.map +0 -1
- package/esm/siftsNumbering.d.ts +0 -23
- package/esm/siftsNumbering.js +0 -40
- package/esm/siftsNumbering.js.map +0 -1
- package/src/pdbeBestStructures.ts +0 -94
- package/src/pdbeEntryMolecules.ts +0 -37
- package/src/siftsNumbering.ts +0 -61
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { FetchOptions } from './fetchUtils.ts';
|
|
2
|
+
export declare const RCSB_SEQUENCE_COORDINATES_URL = "https://sequence-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 of the protein */
|
|
15
|
+
chains: string[];
|
|
12
16
|
}
|
|
13
|
-
|
|
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
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
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[]>;
|
package/dist/structureSources.js
CHANGED
|
@@ -1,87 +1,174 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// The experimental structures
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
// crystal structure beside a prediction without a PDB search of
|
|
6
|
-
// the entry id from here and ask `
|
|
2
|
+
// The experimental structures RCSB aligns to a UniProt entry: every PDB entity
|
|
3
|
+
// carrying the accession, with the UniProt range it covers, then each entry's
|
|
4
|
+
// method, resolution and chains. Two CORS-enabled calls, which is what lets a
|
|
5
|
+
// page offer a crystal structure beside a prediction without a PDB search of
|
|
6
|
+
// its own; take the entry id from here and ask `fetchPdbEntry` for its
|
|
7
7
|
// residue mapping.
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.
|
|
10
|
-
exports.
|
|
9
|
+
exports.ENTITY_DETAILS_QUERY = exports.RCSB_SEQUENCE_COORDINATES_URL = void 0;
|
|
10
|
+
exports.entityAlignmentsQuery = entityAlignmentsQuery;
|
|
11
|
+
exports.parseEntityAlignments = parseEntityAlignments;
|
|
12
|
+
exports.parseEntityDetails = parseEntityDetails;
|
|
13
|
+
exports.experimentalStructures = experimentalStructures;
|
|
11
14
|
exports.fetchExperimentalStructures = fetchExperimentalStructures;
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
const pdbEntry_ts_1 = require("./pdbEntry.js");
|
|
16
|
+
const structureUrls_ts_1 = require("./structureUrls.js");
|
|
17
|
+
exports.RCSB_SEQUENCE_COORDINATES_URL = 'https://sequence-coordinates.rcsb.org/graphql';
|
|
18
|
+
function entityAlignmentsQuery(uniprotId) {
|
|
19
|
+
return `{ alignments(from: UNIPROT, to: PDB_ENTITY, queryId: "${uniprotId}") {
|
|
20
|
+
target_alignments {
|
|
21
|
+
target_id
|
|
22
|
+
coverage { query_coverage }
|
|
23
|
+
aligned_regions { query_begin query_end }
|
|
24
|
+
}
|
|
25
|
+
} }`;
|
|
18
26
|
}
|
|
27
|
+
exports.ENTITY_DETAILS_QUERY = `query($ids: [String!]!) { polymer_entities(entity_ids: $ids) {
|
|
28
|
+
rcsb_id
|
|
29
|
+
rcsb_polymer_entity_container_identifiers { auth_asym_ids }
|
|
30
|
+
entry { rcsb_entry_info { experimental_method resolution_combined } }
|
|
31
|
+
} }`;
|
|
32
|
+
// RCSB's cap on ids per batch request
|
|
33
|
+
const DETAILS_BATCH = 1000;
|
|
19
34
|
function isRecord(value) {
|
|
20
35
|
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
21
36
|
}
|
|
22
37
|
function finiteNumber(value) {
|
|
23
38
|
return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
|
|
24
39
|
}
|
|
40
|
+
function strings(value) {
|
|
41
|
+
return Array.isArray(value)
|
|
42
|
+
? value.filter((v) => typeof v === 'string')
|
|
43
|
+
: [];
|
|
44
|
+
}
|
|
25
45
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* prediction comes from AlphaFold's own API, which answers per model. And
|
|
30
|
-
* 3D-Beacons files SASBDB's small-angle-scattering fits under "experimentally
|
|
31
|
-
* determined" too, with numeric ids and near-full coverage — dystrophin's best
|
|
32
|
-
* "structure" by coverage was SASBDB 436 — which are not entries a residue
|
|
33
|
-
* mapping exists for. Hence the `provider === 'PDBe'` gate rather than the
|
|
34
|
-
* category alone.
|
|
46
|
+
* PDB entities only: the same list carries RCSB's computed models
|
|
47
|
+
* (`AF_AFP04637F1_1`), which a residue mapping does not exist for. The range
|
|
48
|
+
* spans every aligned region, as 3D-Beacons reported it.
|
|
35
49
|
*/
|
|
36
|
-
function
|
|
37
|
-
const
|
|
38
|
-
|
|
50
|
+
function parseEntityAlignments(data) {
|
|
51
|
+
const alignments = isRecord(data) ? data.alignments : undefined;
|
|
52
|
+
const targets = isRecord(alignments)
|
|
53
|
+
? alignments.target_alignments
|
|
54
|
+
: undefined;
|
|
55
|
+
if (!Array.isArray(targets)) {
|
|
39
56
|
return [];
|
|
40
57
|
}
|
|
41
|
-
return
|
|
42
|
-
|
|
43
|
-
const s = isRecord(entry) ? entry.summary : undefined;
|
|
44
|
-
if (!isRecord(s)) {
|
|
58
|
+
return targets.flatMap(target => {
|
|
59
|
+
if (!isRecord(target) || typeof target.target_id !== 'string') {
|
|
45
60
|
return [];
|
|
46
61
|
}
|
|
47
|
-
const
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
62
|
+
const [pdbId] = target.target_id.split('_');
|
|
63
|
+
const coverage = isRecord(target.coverage)
|
|
64
|
+
? finiteNumber(target.coverage.query_coverage)
|
|
65
|
+
: undefined;
|
|
66
|
+
const regions = Array.isArray(target.aligned_regions)
|
|
67
|
+
? target.aligned_regions.filter(isRecord)
|
|
68
|
+
: [];
|
|
69
|
+
const begins = regions.map(r => finiteNumber(r.query_begin));
|
|
70
|
+
const ends = regions.map(r => finiteNumber(r.query_end));
|
|
71
|
+
return pdbId !== undefined &&
|
|
72
|
+
(0, structureUrls_ts_1.isPdbId)(pdbId) &&
|
|
73
|
+
coverage !== undefined &&
|
|
74
|
+
begins.length > 0 &&
|
|
75
|
+
begins.every(b => b !== undefined) &&
|
|
76
|
+
ends.every(e => e !== undefined)
|
|
56
77
|
? [
|
|
57
78
|
{
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
resolution: finiteNumber(s.resolution),
|
|
63
|
-
start,
|
|
64
|
-
end,
|
|
79
|
+
entityId: target.target_id,
|
|
80
|
+
pdbId: pdbId.toLowerCase(),
|
|
81
|
+
start: Math.min(...begins),
|
|
82
|
+
end: Math.max(...ends),
|
|
65
83
|
coverage,
|
|
66
84
|
},
|
|
67
85
|
]
|
|
68
86
|
: [];
|
|
69
|
-
})
|
|
70
|
-
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
function parseEntityDetails(data) {
|
|
90
|
+
const entities = isRecord(data) ? data.polymer_entities : undefined;
|
|
91
|
+
const details = new Map();
|
|
92
|
+
for (const entity of Array.isArray(entities) ? entities : []) {
|
|
93
|
+
if (!isRecord(entity) || typeof entity.rcsb_id !== 'string') {
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
const ids = entity.rcsb_polymer_entity_container_identifiers;
|
|
97
|
+
const info = isRecord(entity.entry)
|
|
98
|
+
? entity.entry.rcsb_entry_info
|
|
99
|
+
: undefined;
|
|
100
|
+
const resolutions = isRecord(info) ? info.resolution_combined : undefined;
|
|
101
|
+
const resolution = Array.isArray(resolutions)
|
|
102
|
+
? finiteNumber(resolutions[0])
|
|
103
|
+
: undefined;
|
|
104
|
+
details.set(entity.rcsb_id, {
|
|
105
|
+
method: isRecord(info) && typeof info.experimental_method === 'string'
|
|
106
|
+
? info.experimental_method
|
|
107
|
+
: 'experimental',
|
|
108
|
+
...(resolution === undefined ? {} : { resolution }),
|
|
109
|
+
chains: strings(isRecord(ids) ? ids.auth_asym_ids : undefined),
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
return details;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* One row per entry, best coverage first and sharpest within a tie. An entry
|
|
116
|
+
* with several entities of the protein (a construct crystallised beside a
|
|
117
|
+
* different fragment of itself) takes the best-covering entity's range and
|
|
118
|
+
* every entity's chains.
|
|
119
|
+
*/
|
|
120
|
+
function experimentalStructures(alignments, details) {
|
|
121
|
+
const byEntry = new Map();
|
|
122
|
+
for (const a of alignments) {
|
|
123
|
+
const d = details.get(a.entityId);
|
|
124
|
+
if (!d) {
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
const existing = byEntry.get(a.pdbId);
|
|
128
|
+
if (!existing) {
|
|
129
|
+
byEntry.set(a.pdbId, {
|
|
130
|
+
pdbId: a.pdbId,
|
|
131
|
+
method: d.method,
|
|
132
|
+
...(d.resolution === undefined ? {} : { resolution: d.resolution }),
|
|
133
|
+
start: a.start,
|
|
134
|
+
end: a.end,
|
|
135
|
+
coverage: a.coverage,
|
|
136
|
+
chains: [...d.chains],
|
|
137
|
+
});
|
|
138
|
+
continue;
|
|
139
|
+
}
|
|
140
|
+
for (const chain of d.chains) {
|
|
141
|
+
if (!existing.chains.includes(chain)) {
|
|
142
|
+
existing.chains.push(chain);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
if (a.coverage > existing.coverage) {
|
|
146
|
+
Object.assign(existing, {
|
|
147
|
+
start: a.start,
|
|
148
|
+
end: a.end,
|
|
149
|
+
coverage: a.coverage,
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return [...byEntry.values()].sort((a, b) => b.coverage - a.coverage ||
|
|
71
154
|
(a.resolution ?? Infinity) - (b.resolution ?? Infinity));
|
|
72
155
|
}
|
|
73
|
-
|
|
74
|
-
|
|
156
|
+
const ISOFORM_SUFFIX = /-\d+$/;
|
|
157
|
+
/**
|
|
158
|
+
* Every PDB entry aligned to the accession. An accession with none, or one
|
|
159
|
+
* RCSB does not know, is `[]`; an isoform accession is asked as its entry,
|
|
160
|
+
* which is what the alignment is numbered on.
|
|
161
|
+
*/
|
|
75
162
|
async function fetchExperimentalStructures(uniprotId, opts) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
163
|
+
const alignments = parseEntityAlignments(await (0, pdbEntry_ts_1.graphqlFetch)(exports.RCSB_SEQUENCE_COORDINATES_URL, entityAlignmentsQuery(uniprotId.replace(ISOFORM_SUFFIX, '')), undefined, opts));
|
|
164
|
+
const ids = alignments.map(a => a.entityId);
|
|
165
|
+
const details = new Map();
|
|
166
|
+
for (let i = 0; i < ids.length; i += DETAILS_BATCH) {
|
|
167
|
+
const batch = parseEntityDetails(await (0, pdbEntry_ts_1.graphqlFetch)(pdbEntry_ts_1.RCSB_DATA_GRAPHQL_URL, exports.ENTITY_DETAILS_QUERY, { ids: ids.slice(i, i + DETAILS_BATCH) }, opts));
|
|
168
|
+
for (const [id, d] of batch) {
|
|
169
|
+
details.set(id, d);
|
|
83
170
|
}
|
|
84
171
|
}
|
|
85
|
-
return
|
|
172
|
+
return experimentalStructures(alignments, details);
|
|
86
173
|
}
|
|
87
174
|
//# sourceMappingURL=structureSources.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structureSources.js","sourceRoot":"","sources":["../src/structureSources.ts"],"names":[],"mappings":";A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,0BAAY,EAChB,qCAA6B,EAC7B,qBAAqB,CAAC,SAAS,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC,EAC5D,SAAS,EACT,IAAI,CACL,CACF,CAAA;IACD,MAAM,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAA;IAC3C,MAAM,OAAO,GAAG,IAAI,GAAG,EAAyB,CAAA;IAChD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,IAAI,aAAa,EAAE,CAAC;QACnD,MAAM,KAAK,GAAG,kBAAkB,CAC9B,MAAM,IAAA,0BAAY,EAChB,mCAAqB,EACrB,4BAAoB,EACpB,EAAE,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,EAAE,EACxC,IAAI,CACL,CACF,CAAA;QACD,KAAK,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC;YAC5B,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;QACpB,CAAC;IACH,CAAC;IACD,OAAO,sBAAsB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAA;AACpD,CAAC"}
|
package/dist/structureUrls.d.ts
CHANGED
|
@@ -9,21 +9,18 @@ export declare function uniprotEntryUrl(uniprotId: string): string;
|
|
|
9
9
|
*/
|
|
10
10
|
export declare function getAlphaFoldStructureUrl(uniprotId: string, version?: string): string;
|
|
11
11
|
export declare function getPdbStructureUrl(pdbId: string): string;
|
|
12
|
+
export declare function isPdbId(value: string): boolean;
|
|
13
|
+
export declare function rcsbEntryUrl(pdbId: string): string;
|
|
12
14
|
/**
|
|
13
|
-
* Resolve the `{ pdbId }` shorthand to a
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
15
|
+
* Resolve the `{ pdbId }` shorthand to a structure URL, so a hand-written config
|
|
16
|
+
* or a short launch URL needs no RCSB filename. An explicit `url` (or inline
|
|
17
|
+
* `data`) always wins, and resolving an already-resolved spec returns the same
|
|
18
|
+
* url.
|
|
17
19
|
*
|
|
18
|
-
* `uniprotId`
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* file to open.
|
|
23
|
-
*
|
|
24
|
-
* Shared by the Structure model's snapshot preprocessor and the
|
|
25
|
-
* LaunchView-ProteinView extension point, which would otherwise each carry
|
|
26
|
-
* their own copy of the same precedence rule.
|
|
20
|
+
* `uniprotId` resolves to no url and still outranks a `pdbId`. AlphaFold DB's
|
|
21
|
+
* files for an accession change (an isoform model, several fragments, a new
|
|
22
|
+
* model version), so the caller keeps the accession and asks
|
|
23
|
+
* `fetchAlphaFoldModels` which file to open.
|
|
27
24
|
*/
|
|
28
25
|
export declare function resolveStructureUrl({ url, data, uniprotId, pdbId, }: {
|
|
29
26
|
url?: string;
|
|
@@ -43,9 +40,9 @@ export declare function getUniprotIdFromAlphaFoldTarget(target: string): string
|
|
|
43
40
|
export declare function getStructureUrlFromTarget(target: string, db: string): string | undefined;
|
|
44
41
|
export declare function getConfidenceUrlFromTarget(target: string): string | undefined;
|
|
45
42
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
43
|
+
* The name to show for a structure: its PDB id, its AlphaFold accession, else
|
|
44
|
+
* the file's name. Use it wherever a structure is named, so each place shows
|
|
45
|
+
* the same name.
|
|
49
46
|
*/
|
|
50
47
|
export declare function structureDisplayLabel({ url, data, uniprotId, }: {
|
|
51
48
|
url?: string;
|
package/dist/structureUrls.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
//
|
|
3
|
-
// the launch flow and the ProteinView model (e.g. resolving a `uniprotId`/`pdbId`
|
|
4
|
-
// shorthand at hydration) can import them without pulling in heavy launch code.
|
|
2
|
+
// Structure URL builders and target parsers, with no dependencies.
|
|
5
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
4
|
exports.uniprotGffUrl = uniprotGffUrl;
|
|
7
5
|
exports.uniprotFastaUrl = uniprotFastaUrl;
|
|
8
6
|
exports.uniprotEntryUrl = uniprotEntryUrl;
|
|
9
7
|
exports.getAlphaFoldStructureUrl = getAlphaFoldStructureUrl;
|
|
10
8
|
exports.getPdbStructureUrl = getPdbStructureUrl;
|
|
9
|
+
exports.isPdbId = isPdbId;
|
|
10
|
+
exports.rcsbEntryUrl = rcsbEntryUrl;
|
|
11
11
|
exports.resolveStructureUrl = resolveStructureUrl;
|
|
12
12
|
exports.getPdbIdFromUrl = getPdbIdFromUrl;
|
|
13
13
|
exports.getUniprotIdFromAlphaFoldTarget = getUniprotIdFromAlphaFoldTarget;
|
|
@@ -15,10 +15,8 @@ exports.getStructureUrlFromTarget = getStructureUrlFromTarget;
|
|
|
15
15
|
exports.getConfidenceUrlFromTarget = getConfidenceUrlFromTarget;
|
|
16
16
|
exports.structureDisplayLabel = structureDisplayLabel;
|
|
17
17
|
const ALPHAFOLD_VERSION = 'v6';
|
|
18
|
-
// UniProt endpoints. rest.* is the machine API
|
|
19
|
-
// the
|
|
20
|
-
// assembly is built from); www.*/entry is the human-facing entry page the UI
|
|
21
|
-
// links to. Centralized so a path change is one edit rather than a grep.
|
|
18
|
+
// UniProt endpoints. rest.* is the machine API, serving the features as GFF
|
|
19
|
+
// and the sequence as FASTA; www.*/entry is the entry page for people.
|
|
22
20
|
function uniprotGffUrl(uniprotId) {
|
|
23
21
|
return `https://rest.uniprot.org/uniprotkb/${uniprotId}.gff`;
|
|
24
22
|
}
|
|
@@ -40,21 +38,25 @@ function getAlphaFoldStructureUrl(uniprotId, version = ALPHAFOLD_VERSION) {
|
|
|
40
38
|
function getPdbStructureUrl(pdbId) {
|
|
41
39
|
return `https://files.rcsb.org/download/${pdbId}.cif`;
|
|
42
40
|
}
|
|
41
|
+
// A PDB id is four characters, the first a digit: 1TUP, 6ZIO. Checked before
|
|
42
|
+
// a typed one reaches a fetch, so three characters on the way to four are not
|
|
43
|
+
// a 404 apiece.
|
|
44
|
+
function isPdbId(value) {
|
|
45
|
+
return /^[1-9][A-Za-z0-9]{3}$/.test(value);
|
|
46
|
+
}
|
|
47
|
+
function rcsbEntryUrl(pdbId) {
|
|
48
|
+
return `https://www.rcsb.org/structure/${pdbId.toUpperCase()}`;
|
|
49
|
+
}
|
|
43
50
|
/**
|
|
44
|
-
* Resolve the `{ pdbId }` shorthand to a
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
* `uniprotId` deliberately resolves to no url here, and still outranks a
|
|
50
|
-
* `pdbId`. An accession's files are whatever AlphaFold DB currently holds — an
|
|
51
|
-
* isoform model, several fragments, a new model version — so the structure
|
|
52
|
-
* keeps the accession and the structure loader asks the prediction API which
|
|
53
|
-
* file to open.
|
|
51
|
+
* Resolve the `{ pdbId }` shorthand to a structure URL, so a hand-written config
|
|
52
|
+
* or a short launch URL needs no RCSB filename. An explicit `url` (or inline
|
|
53
|
+
* `data`) always wins, and resolving an already-resolved spec returns the same
|
|
54
|
+
* url.
|
|
54
55
|
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
56
|
+
* `uniprotId` resolves to no url and still outranks a `pdbId`. AlphaFold DB's
|
|
57
|
+
* files for an accession change (an isoform model, several fragments, a new
|
|
58
|
+
* model version), so the caller keeps the accession and asks
|
|
59
|
+
* `fetchAlphaFoldModels` which file to open.
|
|
58
60
|
*/
|
|
59
61
|
function resolveStructureUrl({ url, data, uniprotId, pdbId, }) {
|
|
60
62
|
if (url !== undefined || data !== undefined) {
|
|
@@ -121,9 +123,9 @@ function getConfidenceUrlFromTarget(target) {
|
|
|
121
123
|
return undefined;
|
|
122
124
|
}
|
|
123
125
|
/**
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
126
|
+
* The name to show for a structure: its PDB id, its AlphaFold accession, else
|
|
127
|
+
* the file's name. Use it wherever a structure is named, so each place shows
|
|
128
|
+
* the same name.
|
|
127
129
|
*/
|
|
128
130
|
function structureDisplayLabel({ url, data, uniprotId, }) {
|
|
129
131
|
if (url === undefined) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structureUrls.js","sourceRoot":"","sources":["../src/structureUrls.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"structureUrls.js","sourceRoot":"","sources":["../src/structureUrls.ts"],"names":[],"mappings":";AAAA,mEAAmE;;AAMnE,sCAEC;AAED,0CAEC;AAED,0CAEC;AAQD,4DAKC;AAED,gDAEC;AAKD,0BAEC;AAED,oCAEC;AAaD,kDAiBC;AAYD,0CAiBC;AAUD,0EAGC;AAID,8DAUC;AAED,gEAOC;AAOD,sDA0BC;AA1KD,MAAM,iBAAiB,GAAG,IAAI,CAAA;AAE9B,4EAA4E;AAC5E,uEAAuE;AACvE,SAAgB,aAAa,CAAC,SAAiB;IAC7C,OAAO,sCAAsC,SAAS,MAAM,CAAA;AAC9D,CAAC;AAED,SAAgB,eAAe,CAAC,SAAiB;IAC/C,OAAO,sCAAsC,SAAS,QAAQ,CAAA;AAChE,CAAC;AAED,SAAgB,eAAe,CAAC,SAAiB;IAC/C,OAAO,qCAAqC,SAAS,QAAQ,CAAA;AAC/D,CAAC;AAED;;;;;GAKG;AACH,SAAgB,wBAAwB,CACtC,SAAiB,EACjB,OAAO,GAAG,iBAAiB;IAE3B,OAAO,wCAAwC,SAAS,aAAa,OAAO,MAAM,CAAA;AACpF,CAAC;AAED,SAAgB,kBAAkB,CAAC,KAAa;IAC9C,OAAO,mCAAmC,KAAK,MAAM,CAAA;AACvD,CAAC;AAED,6EAA6E;AAC7E,8EAA8E;AAC9E,gBAAgB;AAChB,SAAgB,OAAO,CAAC,KAAa;IACnC,OAAO,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AAC5C,CAAC;AAED,SAAg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A;AAClB,CAAC;AAED;;;;GAIG;AACH,SAAgB,qBAAqB,CAAC,EACpC,GAAG,EACH,IAAI,EACJ,SAAS,GAKV;IACC,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtB,OAAO,IAAI,KAAK,SAAS;YACvB,CAAC,CAAC,oBAAoB;YACtB,CAAC,CAAC,SAAS;gBACT,CAAC,CAAC,aAAa,SAAS,EAAE;gBAC1B,CAAC,CAAC,EAAE,CAAA;IACV,CAAC;IACD,MAAM,KAAK,GAAG,eAAe,CAAC,GAAG,CAAC,CAAA;IAClC,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,KAAK,CAAC,WAAW,EAAE,CAAA;IAC5B,CAAC;IACD,MAAM,YAAY,GAAG,+BAA+B,CAAC,GAAG,CAAC,CAAA;IACzD,IAAI,YAAY,EAAE,CAAC;QACjB,OAAO,aAAa,YAAY,EAAE,CAAA;IACpC,CAAC;IACD,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;IAChD,OAAO,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAA;AACvD,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -5,10 +5,7 @@ export declare const ALIGNMENT_ALGORITHMS: {
|
|
|
5
5
|
};
|
|
6
6
|
export declare const DEFAULT_ALIGNMENT_ALGORITHM: AlignmentAlgorithm;
|
|
7
7
|
export declare const ALIGNMENT_ALGORITHM_VALUES: AlignmentAlgorithm[];
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
* The only place a coercion is needed: the model property is an enumeration, so
|
|
11
|
-
* everything downstream of hydration is already typed.
|
|
12
|
-
*/
|
|
8
|
+
/** Parses an untrusted algorithm name, such as a URL parameter, falling back
|
|
9
|
+
* to Smith-Waterman. */
|
|
13
10
|
export declare function coerceAlignmentAlgorithm(value: string): AlignmentAlgorithm;
|
|
14
11
|
export declare const ALIGNMENT_ALGORITHM_LABELS: Record<AlignmentAlgorithm, string>;
|
package/dist/types.js
CHANGED
|
@@ -11,11 +11,8 @@ exports.ALIGNMENT_ALGORITHM_VALUES = [
|
|
|
11
11
|
'needleman_wunsch',
|
|
12
12
|
'smith_waterman',
|
|
13
13
|
];
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
* The only place a coercion is needed: the model property is an enumeration, so
|
|
17
|
-
* everything downstream of hydration is already typed.
|
|
18
|
-
*/
|
|
14
|
+
/** Parses an untrusted algorithm name, such as a URL parameter, falling back
|
|
15
|
+
* to Smith-Waterman. */
|
|
19
16
|
function coerceAlignmentAlgorithm(value) {
|
|
20
17
|
return (exports.ALIGNMENT_ALGORITHM_VALUES.find(v => v === value) ??
|
|
21
18
|
exports.DEFAULT_ALIGNMENT_ALGORITHM);
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAgBA,4DAKC;AAnBY,QAAA,oBAAoB,GAAG;IAClC,gBAAgB,EAAE,kBAAkB;IACpC,cAAc,EAAE,gBAAgB;CACxB,CAAA;AAEG,QAAA,2BAA2B,GAAuB,gBAAgB,CAAA;AAElE,QAAA,0BAA0B,GAAyB;IAC9D,kBAAkB;IAClB,gBAAgB;CACjB,CAAA;AAED;wBACwB;AACxB,SAAgB,wBAAwB,CAAC,KAAa;IACpD,OAAO,CACL,kCAA0B,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC;QACjD,mCAA2B,CAC5B,CAAA;AACH,CAAC;AAEY,QAAA,0BAA0B,GAAuC;IAC5E,gBAAgB,EAAE,kBAAkB;IACpC,cAAc,EAAE,gBAAgB;CACjC,CAAA"}
|
package/dist/uniProtSearch.js
CHANGED
|
@@ -51,7 +51,6 @@ async function searchByXref(id, opts) {
|
|
|
51
51
|
return { entries: await searchUniProt(query, 10, opts), error: undefined };
|
|
52
52
|
}
|
|
53
53
|
catch (e) {
|
|
54
|
-
console.error(`xref search failed for ${id}:`, e);
|
|
55
54
|
return { entries: [], error: e };
|
|
56
55
|
}
|
|
57
56
|
}
|
|
@@ -63,18 +62,14 @@ async function searchByGeneName(geneName, organismId, opts) {
|
|
|
63
62
|
// are 284812. The descendants are asked only on a miss, because for a
|
|
64
63
|
// species with reviewed subspecies entries (human and Neanderthal) they
|
|
65
64
|
// turn one answer into two.
|
|
66
|
-
//
|
|
67
|
-
//
|
|
65
|
+
// When the descendant search fails, the taxon's own empty result stands
|
|
66
|
+
// rather than becoming an error.
|
|
68
67
|
const entries = exact.length === 0 && organismId
|
|
69
|
-
? await searchUniProt(buildGeneNameQuery(geneName, organismId, 'taxonomy_id'), 5, opts).catch((
|
|
70
|
-
console.error(`descendant-taxon search failed for ${geneName}:`, e);
|
|
71
|
-
return exact;
|
|
72
|
-
})
|
|
68
|
+
? await searchUniProt(buildGeneNameQuery(geneName, organismId, 'taxonomy_id'), 5, opts).catch(() => exact)
|
|
73
69
|
: exact;
|
|
74
70
|
return { entries, error: undefined };
|
|
75
71
|
}
|
|
76
72
|
catch (e) {
|
|
77
|
-
console.error(`gene name search failed for ${geneName}:`, e);
|
|
78
73
|
return { entries: [], error: e };
|
|
79
74
|
}
|
|
80
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uniProtSearch.js","sourceRoot":"","sources":["../src/uniProtSearch.ts"],"names":[],"mappings":";;AAmFA,gDAYC;
|
|
1
|
+
{"version":3,"file":"uniProtSearch.js","sourceRoot":"","sources":["../src/uniProtSearch.ts"],"names":[],"mappings":";;AAmFA,gDAYC;AAwED,oDAgEC;AAvOD,mDAA2C;AAC3C,yCAImB;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,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CACtD;QACD,cAAc;QACd,WAAW;KACZ,CAAA;AACH,CAAC"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import type { PairwiseAlignment } from './mappings.ts';
|
|
2
2
|
export interface AlignmentQuality {
|
|
3
|
-
/** columns
|
|
3
|
+
/** columns with a residue in both rows, i.e. mapped positions */
|
|
4
4
|
aligned: number;
|
|
5
5
|
identical: number;
|
|
6
6
|
transcriptLength: number;
|
|
7
7
|
structureLength: number;
|
|
8
8
|
/** identical over aligned; 0 when nothing aligned */
|
|
9
9
|
identity: number;
|
|
10
|
-
/** identical over the shorter of the two sequences
|
|
11
|
-
*
|
|
10
|
+
/** identical over the shorter of the two sequences, which separates a
|
|
11
|
+
* real match from a chance local alignment (see LOW_IDENTITY_OVER_SHORTER) */
|
|
12
12
|
identityOverShorter: number;
|
|
13
13
|
/** aligned over the structure's length */
|
|
14
14
|
structureCoverage: number;
|
|
15
15
|
/** first and last transcript residue the alignment covers, 1-based
|
|
16
|
-
* inclusive; 0 when nothing aligned. A structure is usually a fragment,
|
|
17
|
-
* which part of the protein it
|
|
16
|
+
* inclusive; 0 when nothing aligned. A structure is usually a fragment, so
|
|
17
|
+
* these show which part of the protein it contains. */
|
|
18
18
|
transcriptStart: number;
|
|
19
19
|
transcriptEnd: number;
|
|
20
20
|
}
|
package/esm/alphaFoldModels.d.ts
CHANGED
|
@@ -22,11 +22,11 @@ export declare function parseAlphaFoldModels(json: unknown): AlphaFoldModel[];
|
|
|
22
22
|
export declare function fetchAlphaFoldModels(uniprotId: string, opts?: FetchOptions): Promise<AlphaFoldModel[]>;
|
|
23
23
|
/**
|
|
24
24
|
* The model to open for a gene's transcripts: one folded from exactly a
|
|
25
|
-
* transcript's translation, canonical first, so
|
|
26
|
-
*
|
|
25
|
+
* transcript's translation, canonical first, so every residue maps to itself;
|
|
26
|
+
* else the canonical model; else the longest isoform model.
|
|
27
27
|
*
|
|
28
|
-
* Takes any record of sequences, since
|
|
29
|
-
*
|
|
28
|
+
* Takes any record of sequences, since a caller may know one translation rather
|
|
29
|
+
* than a gene's isoforms.
|
|
30
30
|
*/
|
|
31
31
|
export declare function pickAlphaFoldModel(models: AlphaFoldModel[], isoformSequences: Record<string, {
|
|
32
32
|
seq: string;
|