|
|
@@ -144,7 +144,8 @@ const getInteractionsFromEntry = (json) => __awaiter(void 0, void 0, void 0, fun
|
|
|
const gnT = Array.isArray(json.entry.gene.name) ? json.entry.gene.name : [json.entry.gene.name];
|
|
|
const geneName = gnT.filter((e) => e.type === 'primary').map((e) => e.value)[0];
|
|
|
// Interactants
|
|
|
- const interactants = json.entry.comment
|
|
|
+ const jecT = Array.isArray(json.entry.comment) ? json.entry.comment : [json.entry.comment];
|
|
|
+ const interactants = jecT
|
|
|
.filter((e) => (e === null || e === void 0 ? void 0 : e.type) === 'interaction')
|
|
|
.flatMap((e) => ({
|
|
|
type: 'interactant',
|
|
|
@@ -156,7 +157,7 @@ const getInteractionsFromEntry = (json) => __awaiter(void 0, void 0, void 0, fun
|
|
|
const regExp = new RegExp('INTERACTION WITH |Interacts with |complex with ', 'i');
|
|
|
const geneRegExp = new RegExp(/[A-Z]{1}[A-Z|0-9]{2,}$/);
|
|
|
// uniprot_comment_text_value
|
|
|
- const commentInteractsWith = json.entry.comment
|
|
|
+ const commentInteractsWith = jecT
|
|
|
.filter((e) => { var _a; return (_a = e === null || e === void 0 ? void 0 : e.text) === null || _a === void 0 ? void 0 : _a.value; })
|
|
|
.filter((e) => regExp.test(e.text.value))
|
|
|
.map((e) => ({
|