react-mutation-mapper 0.8.49 → 0.8.52
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/dist/component/column/MutationStatus.d.ts +1 -1
- package/dist/component/oncokb/OncoKbHelper.d.ts +0 -1
- package/dist/component/oncokb/{AnnotationIcon.d.ts → icon/AnnotationIcon.d.ts} +0 -0
- package/dist/component/oncokb/{CompactAnnotationIcon.d.ts → icon/CompactAnnotationIcon.d.ts} +0 -0
- package/dist/component/oncokb/icon/LevelIcon.d.ts +6 -0
- package/dist/component/oncokb/icon/OncogenicIcon.d.ts +6 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +45 -23
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +44 -22
- package/dist/index.js.map +1 -1
- package/dist/styles.css +15 -15
- package/dist/util/OncoKbUtils.d.ts +1 -0
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -488,6 +488,15 @@ function getTumorTypeName(tumorType) {
|
|
|
488
488
|
return '';
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
|
+
function getTumorTypeNameWithExclusionInfo(tumorType, excludedTumorTypes) {
|
|
492
|
+
var name = getTumorTypeName(tumorType);
|
|
493
|
+
if (!___default["default"].isEmpty(excludedTumorTypes)) {
|
|
494
|
+
name = name + " (excluding " + excludedTumorTypes
|
|
495
|
+
.map(function (ett) { return getTumorTypeName(ett); })
|
|
496
|
+
.join(', ') + ")";
|
|
497
|
+
}
|
|
498
|
+
return name;
|
|
499
|
+
}
|
|
491
500
|
function groupOncoKbIndicatorDataByMutations(mutationsByPosition, oncoKbData, getTumorType, getEntrezGeneId, filter) {
|
|
492
501
|
var indicatorMap = {};
|
|
493
502
|
___default["default"].keys(mutationsByPosition).forEach(function (key) {
|
|
@@ -509,7 +518,16 @@ function getIndicatorData(mutation, oncoKbData, getTumorType, getEntrezGeneId) {
|
|
|
509
518
|
if (oncoKbData.indicatorMap === null) {
|
|
510
519
|
return undefined;
|
|
511
520
|
}
|
|
512
|
-
var id =
|
|
521
|
+
var id = '';
|
|
522
|
+
// @ts-ignore
|
|
523
|
+
var sv = mutation.structuralVariant;
|
|
524
|
+
if (sv) {
|
|
525
|
+
var structuralVariantType = cbioportalUtils.deriveStructuralVariantType(sv);
|
|
526
|
+
id = cbioportalUtils.generateQueryStructuralVariantId(sv.site1EntrezGeneId, sv.site2EntrezGeneId, getTumorType(mutation), structuralVariantType);
|
|
527
|
+
}
|
|
528
|
+
else {
|
|
529
|
+
id = cbioportalUtils.generateQueryVariantId(getEntrezGeneId(mutation), getTumorType(mutation), mutation.proteinChange, mutation.mutationType);
|
|
530
|
+
}
|
|
513
531
|
return oncoKbData.indicatorMap[id];
|
|
514
532
|
}
|
|
515
533
|
function defaultOncoKbIndicatorFilter(indicator) {
|
|
@@ -834,6 +852,14 @@ var OncoKBSuggestAnnotationLinkout = /** @class */ (function (_super) {
|
|
|
834
852
|
return OncoKBSuggestAnnotationLinkout;
|
|
835
853
|
}(React__namespace.Component));
|
|
836
854
|
|
|
855
|
+
var levelTooltipContent = function (level) {
|
|
856
|
+
return (React__namespace.createElement("div", { style: { maxWidth: '200px' } }, OncoKbHelper.LEVEL_DESC[level]));
|
|
857
|
+
};
|
|
858
|
+
var LevelIcon = function (props) {
|
|
859
|
+
return (React__namespace.createElement(cbioportalFrontendCommons.DefaultTooltip, { overlay: levelTooltipContent(props.level), placement: "left", disabled: !props.showDescription, trigger: ['hover', 'focus'], destroyTooltipOnHide: true },
|
|
860
|
+
React__namespace.createElement("i", { className: levelIconClassNames(props.level) })));
|
|
861
|
+
};
|
|
862
|
+
|
|
837
863
|
var OncoKbHelper = /** @class */ (function () {
|
|
838
864
|
function OncoKbHelper() {
|
|
839
865
|
}
|
|
@@ -972,7 +998,6 @@ var OncoKbHelper = /** @class */ (function () {
|
|
|
972
998
|
configurable: true,
|
|
973
999
|
writable: true,
|
|
974
1000
|
value: function (columnKey) {
|
|
975
|
-
var _this = this;
|
|
976
1001
|
switch (columnKey) {
|
|
977
1002
|
case 'level':
|
|
978
1003
|
return {
|
|
@@ -985,8 +1010,7 @@ var OncoKbHelper = /** @class */ (function () {
|
|
|
985
1010
|
},
|
|
986
1011
|
Cell: function (props) {
|
|
987
1012
|
var normalizedLevel = normalizeLevel(props.value) || '';
|
|
988
|
-
return (React__namespace.createElement(
|
|
989
|
-
React__namespace.createElement("i", { className: levelIconClassNames(normalizedLevel), style: { margin: 'auto' } })));
|
|
1013
|
+
return (React__namespace.createElement(LevelIcon, { level: normalizedLevel, showDescription: true }));
|
|
990
1014
|
},
|
|
991
1015
|
};
|
|
992
1016
|
case 'alterations':
|
|
@@ -1002,14 +1026,6 @@ var OncoKbHelper = /** @class */ (function () {
|
|
|
1002
1026
|
}
|
|
1003
1027
|
}
|
|
1004
1028
|
});
|
|
1005
|
-
Object.defineProperty(OncoKbHelper, "levelTooltipContent", {
|
|
1006
|
-
enumerable: true,
|
|
1007
|
-
configurable: true,
|
|
1008
|
-
writable: true,
|
|
1009
|
-
value: function (level) {
|
|
1010
|
-
return (React__namespace.createElement("div", { style: { maxWidth: '200px' } }, OncoKbHelper.LEVEL_DESC[level]));
|
|
1011
|
-
}
|
|
1012
|
-
});
|
|
1013
1029
|
Object.defineProperty(OncoKbHelper, "getAlterationsColumnCell", {
|
|
1014
1030
|
enumerable: true,
|
|
1015
1031
|
configurable: true,
|
|
@@ -1312,7 +1328,7 @@ var OncoKbTreatmentTable = /** @class */ (function (_super) {
|
|
|
1312
1328
|
"cancer type(s)")),
|
|
1313
1329
|
accessor: 'levelAssociatedCancerType',
|
|
1314
1330
|
minWidth: 120,
|
|
1315
|
-
Cell: function (props) { return (React__namespace.createElement("div", { style: { whiteSpace: 'normal', lineHeight: '1rem' } },
|
|
1331
|
+
Cell: function (props) { return (React__namespace.createElement("div", { style: { whiteSpace: 'normal', lineHeight: '1rem' } }, getTumorTypeNameWithExclusionInfo(props.original.levelAssociatedCancerType, props.original.levelExcludedCancerTypes))); },
|
|
1316
1332
|
},
|
|
1317
1333
|
{
|
|
1318
1334
|
id: 'referenceList',
|
|
@@ -1375,6 +1391,11 @@ var ImplicationContent = function (props) {
|
|
|
1375
1391
|
|
|
1376
1392
|
var tabsStyles = {"tabs-wrapper":"tabs-module_tabs-wrapper__XKjzo","tabs":"tabs-module_tabs__2I3mz","tab":"tabs-module_tab__3MoDA","tab-pane":"tabs-module_tab-pane__sGd85","tab-title-a":"tabs-module_tab-title-a__2WTNA","tab-title":"tabs-module_tab-title__2z9-D","tab-subtitle":"tabs-module_tab-subtitle__1P8B_"};
|
|
1377
1393
|
|
|
1394
|
+
var OncogenicIcon = function (props) {
|
|
1395
|
+
return (React__namespace.createElement(cbioportalFrontendCommons.DefaultTooltip, { overlay: React__namespace.createElement("span", null, props.oncogenicity), placement: "left", trigger: ['hover', 'focus'], destroyTooltipOnHide: true },
|
|
1396
|
+
React__namespace.createElement("i", { className: oncogenicityIconClassNames(props.oncogenicity) })));
|
|
1397
|
+
};
|
|
1398
|
+
|
|
1378
1399
|
var _a$3;
|
|
1379
1400
|
var OncoKbMedicalDisclaimer = (React__default["default"].createElement("p", { className: mainStyles.disclaimer }, "The information above is intended for research purposes only and should not be used as a substitute for professional diagnosis and treatment."));
|
|
1380
1401
|
var ONCOKB_DATA_ACCESS_PAGE_LINK = 'https://docs.cbioportal.org/2.4-integration-with-other-webservices/oncokb-data-access';
|
|
@@ -1396,8 +1417,9 @@ var TabContentWrapper = function (props) {
|
|
|
1396
1417
|
return React__default["default"].createElement("div", { className: mainStyles['tab-content'] }, props.children);
|
|
1397
1418
|
};
|
|
1398
1419
|
var TabTitle = function (props) {
|
|
1420
|
+
var _a;
|
|
1399
1421
|
var title = DATA_TYPE_TO_TITLE[props.type];
|
|
1400
|
-
var icon = props.displayHighestLevelInTabTitle ? (React__default["default"].createElement(
|
|
1422
|
+
var icon = props.displayHighestLevelInTabTitle ? (props.type === cbioportalUtils.OncoKbCardDataType.BIOLOGICAL ? (React__default["default"].createElement(OncogenicIcon, { oncogenicity: ((_a = props.indicator) === null || _a === void 0 ? void 0 : _a.oncogenic) || '', showDescription: true })) : (React__default["default"].createElement(LevelIcon, { level: normalizeLevel(calcHighestIndicatorLevel(props.type, props.indicator)) || '', showDescription: true }))) : null;
|
|
1401
1423
|
return icon ? (React__default["default"].createElement("span", { style: { display: 'flex' } },
|
|
1402
1424
|
icon,
|
|
1403
1425
|
" ",
|
|
@@ -2128,7 +2150,7 @@ function getDefaultEntrezGeneId(mutation) {
|
|
|
2128
2150
|
return (mutation.gene && mutation.gene.entrezGeneId) || 0;
|
|
2129
2151
|
}
|
|
2130
2152
|
function getDefaultTumorType() {
|
|
2131
|
-
return '
|
|
2153
|
+
return '';
|
|
2132
2154
|
}
|
|
2133
2155
|
var memoized = new Map();
|
|
2134
2156
|
function getAnnotationData(mutation, oncoKbCancerGenes, hotspotData, myCancerGenomeData, oncoKbData, usingPublicOncoKbInstance, civicGenes, civicVariants, resolveTumorType, resolveEntrezGeneId) {
|
|
@@ -8204,9 +8226,7 @@ var OncoKbSummaryTable = /** @class */ (function (_super) {
|
|
|
8204
8226
|
overflow: 'hidden',
|
|
8205
8227
|
textOverflow: 'ellipsis',
|
|
8206
8228
|
} },
|
|
8207
|
-
React__namespace.createElement(
|
|
8208
|
-
verticalAlign: 'text-bottom',
|
|
8209
|
-
} }),
|
|
8229
|
+
React__namespace.createElement(LevelIcon, { level: level.level, showDescription: true }),
|
|
8210
8230
|
React__namespace.createElement("span", { style: {
|
|
8211
8231
|
paddingRight: 3,
|
|
8212
8232
|
} }, ":"),
|
|
@@ -8326,7 +8346,7 @@ function generateLevelData(indicatorData) {
|
|
|
8326
8346
|
var parts = treatment.level.split('_');
|
|
8327
8347
|
var level = parts.length === 2 ? parts[1] : treatment.level;
|
|
8328
8348
|
levels[level] = levels[level] || [];
|
|
8329
|
-
levels[level].push(
|
|
8349
|
+
levels[level].push(getTumorTypeNameWithExclusionInfo(treatment.levelAssociatedCancerType, treatment.levelExcludedCancerTypes));
|
|
8330
8350
|
});
|
|
8331
8351
|
});
|
|
8332
8352
|
return ___default["default"].keys(levels)
|
|
@@ -10634,7 +10654,7 @@ var DefaultMutationMapperDataFetcher = /** @class */ (function () {
|
|
|
10634
10654
|
writable: true,
|
|
10635
10655
|
value: function (mutations, fields, isoformOverrideSource, client) {
|
|
10636
10656
|
if (fields === void 0) { fields = ['annotation_summary']; }
|
|
10637
|
-
if (isoformOverrideSource === void 0) { isoformOverrideSource = '
|
|
10657
|
+
if (isoformOverrideSource === void 0) { isoformOverrideSource = 'mskcc'; }
|
|
10638
10658
|
if (client === void 0) { client = this.genomeNexusClient; }
|
|
10639
10659
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
10640
10660
|
return tslib.__generator(this, function (_a) {
|
|
@@ -10864,7 +10884,9 @@ var DefaultMutationMapperDataFetcher = /** @class */ (function () {
|
|
|
10864
10884
|
return ((_a = mutation.mutationType) === null || _a === void 0 ? void 0 : _a.toUpperCase()) ===
|
|
10865
10885
|
cbioportalUtils.StructuralVariantType.FUSION;
|
|
10866
10886
|
}), function (mutation) {
|
|
10867
|
-
return cbioportalUtils.generateAnnotateStructuralVariantQuery(
|
|
10887
|
+
return cbioportalUtils.generateAnnotateStructuralVariantQuery(
|
|
10888
|
+
/* @ts-ignore */
|
|
10889
|
+
mutation.structuralVariant, getTumorType(mutation), evidenceTypes);
|
|
10868
10890
|
}), 'id');
|
|
10869
10891
|
if (!(mutationQueryVariants.length === 0)) return [3 /*break*/, 1];
|
|
10870
10892
|
_a = [];
|
|
@@ -12058,7 +12080,7 @@ var DefaultMutationMapperStore = /** @class */ (function () {
|
|
|
12058
12080
|
value: function (mutation) {
|
|
12059
12081
|
return this.config.getTumorType
|
|
12060
12082
|
? this.config.getTumorType(mutation)
|
|
12061
|
-
: '
|
|
12083
|
+
: '';
|
|
12062
12084
|
}
|
|
12063
12085
|
});
|
|
12064
12086
|
Object.defineProperty(DefaultMutationMapperStore.prototype, "getDefaultEntrezGeneId", {
|