react-mutation-mapper 0.8.48 → 0.8.51
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 +38 -25
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +37 -24
- package/dist/index.js.map +1 -1
- package/dist/util/DataFetcherUtils.d.ts +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -509,7 +509,16 @@ function getIndicatorData(mutation, oncoKbData, getTumorType, getEntrezGeneId) {
|
|
|
509
509
|
if (oncoKbData.indicatorMap === null) {
|
|
510
510
|
return undefined;
|
|
511
511
|
}
|
|
512
|
-
var id =
|
|
512
|
+
var id = '';
|
|
513
|
+
// @ts-ignore
|
|
514
|
+
var sv = mutation.structuralVariant;
|
|
515
|
+
if (sv) {
|
|
516
|
+
var structuralVariantType = cbioportalUtils.deriveStructuralVariantType(sv);
|
|
517
|
+
id = cbioportalUtils.generateQueryStructuralVariantId(sv.site1EntrezGeneId, sv.site2EntrezGeneId, getTumorType(mutation), structuralVariantType);
|
|
518
|
+
}
|
|
519
|
+
else {
|
|
520
|
+
id = cbioportalUtils.generateQueryVariantId(getEntrezGeneId(mutation), getTumorType(mutation), mutation.proteinChange, mutation.mutationType);
|
|
521
|
+
}
|
|
513
522
|
return oncoKbData.indicatorMap[id];
|
|
514
523
|
}
|
|
515
524
|
function defaultOncoKbIndicatorFilter(indicator) {
|
|
@@ -834,6 +843,14 @@ var OncoKBSuggestAnnotationLinkout = /** @class */ (function (_super) {
|
|
|
834
843
|
return OncoKBSuggestAnnotationLinkout;
|
|
835
844
|
}(React__namespace.Component));
|
|
836
845
|
|
|
846
|
+
var levelTooltipContent = function (level) {
|
|
847
|
+
return (React__namespace.createElement("div", { style: { maxWidth: '200px' } }, OncoKbHelper.LEVEL_DESC[level]));
|
|
848
|
+
};
|
|
849
|
+
var LevelIcon = function (props) {
|
|
850
|
+
return (React__namespace.createElement(cbioportalFrontendCommons.DefaultTooltip, { overlay: levelTooltipContent(props.level), placement: "left", disabled: !props.showDescription, trigger: ['hover', 'focus'], destroyTooltipOnHide: true },
|
|
851
|
+
React__namespace.createElement("i", { className: levelIconClassNames(props.level) })));
|
|
852
|
+
};
|
|
853
|
+
|
|
837
854
|
var OncoKbHelper = /** @class */ (function () {
|
|
838
855
|
function OncoKbHelper() {
|
|
839
856
|
}
|
|
@@ -972,7 +989,6 @@ var OncoKbHelper = /** @class */ (function () {
|
|
|
972
989
|
configurable: true,
|
|
973
990
|
writable: true,
|
|
974
991
|
value: function (columnKey) {
|
|
975
|
-
var _this = this;
|
|
976
992
|
switch (columnKey) {
|
|
977
993
|
case 'level':
|
|
978
994
|
return {
|
|
@@ -985,8 +1001,7 @@ var OncoKbHelper = /** @class */ (function () {
|
|
|
985
1001
|
},
|
|
986
1002
|
Cell: function (props) {
|
|
987
1003
|
var normalizedLevel = normalizeLevel(props.value) || '';
|
|
988
|
-
return (React__namespace.createElement(
|
|
989
|
-
React__namespace.createElement("i", { className: levelIconClassNames(normalizedLevel), style: { margin: 'auto' } })));
|
|
1004
|
+
return (React__namespace.createElement(LevelIcon, { level: normalizedLevel, showDescription: true }));
|
|
990
1005
|
},
|
|
991
1006
|
};
|
|
992
1007
|
case 'alterations':
|
|
@@ -1002,14 +1017,6 @@ var OncoKbHelper = /** @class */ (function () {
|
|
|
1002
1017
|
}
|
|
1003
1018
|
}
|
|
1004
1019
|
});
|
|
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
1020
|
Object.defineProperty(OncoKbHelper, "getAlterationsColumnCell", {
|
|
1014
1021
|
enumerable: true,
|
|
1015
1022
|
configurable: true,
|
|
@@ -1375,6 +1382,11 @@ var ImplicationContent = function (props) {
|
|
|
1375
1382
|
|
|
1376
1383
|
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
1384
|
|
|
1385
|
+
var OncogenicIcon = function (props) {
|
|
1386
|
+
return (React__namespace.createElement(cbioportalFrontendCommons.DefaultTooltip, { overlay: React__namespace.createElement("span", null, props.oncogenicity), placement: "left", trigger: ['hover', 'focus'], destroyTooltipOnHide: true },
|
|
1387
|
+
React__namespace.createElement("i", { className: oncogenicityIconClassNames(props.oncogenicity) })));
|
|
1388
|
+
};
|
|
1389
|
+
|
|
1378
1390
|
var _a$3;
|
|
1379
1391
|
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
1392
|
var ONCOKB_DATA_ACCESS_PAGE_LINK = 'https://docs.cbioportal.org/2.4-integration-with-other-webservices/oncokb-data-access';
|
|
@@ -1396,8 +1408,9 @@ var TabContentWrapper = function (props) {
|
|
|
1396
1408
|
return React__default["default"].createElement("div", { className: mainStyles['tab-content'] }, props.children);
|
|
1397
1409
|
};
|
|
1398
1410
|
var TabTitle = function (props) {
|
|
1411
|
+
var _a;
|
|
1399
1412
|
var title = DATA_TYPE_TO_TITLE[props.type];
|
|
1400
|
-
var icon = props.displayHighestLevelInTabTitle ? (React__default["default"].createElement(
|
|
1413
|
+
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
1414
|
return icon ? (React__default["default"].createElement("span", { style: { display: 'flex' } },
|
|
1402
1415
|
icon,
|
|
1403
1416
|
" ",
|
|
@@ -2004,7 +2017,7 @@ var HotspotAnnotation = /** @class */ (function (_super) {
|
|
|
2004
2017
|
var DEFAULT_MUTATION_ALIGNER_URL_TEMPLATE = 'http://mutationaligner.org/api/domains/<%= pfamDomainId %>?metadata=true';
|
|
2005
2018
|
var DEFAULT_MUTATION_ALIGNER_PROXY_URL_TEMPLATE = 'https://www.cbioportal.org/proxy/mutationaligner.org/api/domains/<%= pfamDomainId %>?metadata=true';
|
|
2006
2019
|
var DEFAULT_MY_GENE_URL_TEMPLATE = 'https://mygene.info/v3/gene/<%= entrezGeneId %>?fields=uniprot';
|
|
2007
|
-
var DEFAULT_UNIPROT_ID_URL_TEMPLATE = 'https://
|
|
2020
|
+
var DEFAULT_UNIPROT_ID_URL_TEMPLATE = 'https://rest.uniprot.org/uniprotkb/search?query=accession:<%= swissProtAccession %>&format=tsv&fields=id';
|
|
2008
2021
|
var DEFAULT_GENOME_NEXUS_URL = 'https://www.genomenexus.org/';
|
|
2009
2022
|
// The legacy instance does not require an authentication but the data will not be update.
|
|
2010
2023
|
var DEFAULT_ONCO_KB_URL = 'https://legacy.oncokb.org/';
|
|
@@ -2128,7 +2141,7 @@ function getDefaultEntrezGeneId(mutation) {
|
|
|
2128
2141
|
return (mutation.gene && mutation.gene.entrezGeneId) || 0;
|
|
2129
2142
|
}
|
|
2130
2143
|
function getDefaultTumorType() {
|
|
2131
|
-
return '
|
|
2144
|
+
return '';
|
|
2132
2145
|
}
|
|
2133
2146
|
var memoized = new Map();
|
|
2134
2147
|
function getAnnotationData(mutation, oncoKbCancerGenes, hotspotData, myCancerGenomeData, oncoKbData, usingPublicOncoKbInstance, civicGenes, civicVariants, resolveTumorType, resolveEntrezGeneId) {
|
|
@@ -8204,9 +8217,7 @@ var OncoKbSummaryTable = /** @class */ (function (_super) {
|
|
|
8204
8217
|
overflow: 'hidden',
|
|
8205
8218
|
textOverflow: 'ellipsis',
|
|
8206
8219
|
} },
|
|
8207
|
-
React__namespace.createElement(
|
|
8208
|
-
verticalAlign: 'text-bottom',
|
|
8209
|
-
} }),
|
|
8220
|
+
React__namespace.createElement(LevelIcon, { level: level.level, showDescription: true }),
|
|
8210
8221
|
React__namespace.createElement("span", { style: {
|
|
8211
8222
|
paddingRight: 3,
|
|
8212
8223
|
} }, ":"),
|
|
@@ -8326,7 +8337,7 @@ function generateLevelData(indicatorData) {
|
|
|
8326
8337
|
var parts = treatment.level.split('_');
|
|
8327
8338
|
var level = parts.length === 2 ? parts[1] : treatment.level;
|
|
8328
8339
|
levels[level] = levels[level] || [];
|
|
8329
|
-
levels[level].push(
|
|
8340
|
+
levels[level].push(getTumorTypeName(treatment.levelAssociatedCancerType));
|
|
8330
8341
|
});
|
|
8331
8342
|
});
|
|
8332
8343
|
return ___default["default"].keys(levels)
|
|
@@ -9836,7 +9847,7 @@ var LollipopMutationPlot = /** @class */ (function (_super) {
|
|
|
9836
9847
|
writable: true,
|
|
9837
9848
|
value: function () {
|
|
9838
9849
|
return (React__namespace.createElement("div", { style: { maxWidth: 200 } },
|
|
9839
|
-
React__namespace.createElement("a", { href: "
|
|
9850
|
+
React__namespace.createElement("a", { href: "https://www.uniprot.org/uniprot/" + this.props.store.uniprotId.result, target: "_blank" }, this.props.store.uniprotId.result)));
|
|
9840
9851
|
}
|
|
9841
9852
|
});
|
|
9842
9853
|
Object.defineProperty(LollipopMutationPlot.prototype, "sequence", {
|
|
@@ -10634,7 +10645,7 @@ var DefaultMutationMapperDataFetcher = /** @class */ (function () {
|
|
|
10634
10645
|
writable: true,
|
|
10635
10646
|
value: function (mutations, fields, isoformOverrideSource, client) {
|
|
10636
10647
|
if (fields === void 0) { fields = ['annotation_summary']; }
|
|
10637
|
-
if (isoformOverrideSource === void 0) { isoformOverrideSource = '
|
|
10648
|
+
if (isoformOverrideSource === void 0) { isoformOverrideSource = 'mskcc'; }
|
|
10638
10649
|
if (client === void 0) { client = this.genomeNexusClient; }
|
|
10639
10650
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
10640
10651
|
return tslib.__generator(this, function (_a) {
|
|
@@ -10864,7 +10875,9 @@ var DefaultMutationMapperDataFetcher = /** @class */ (function () {
|
|
|
10864
10875
|
return ((_a = mutation.mutationType) === null || _a === void 0 ? void 0 : _a.toUpperCase()) ===
|
|
10865
10876
|
cbioportalUtils.StructuralVariantType.FUSION;
|
|
10866
10877
|
}), function (mutation) {
|
|
10867
|
-
return cbioportalUtils.generateAnnotateStructuralVariantQuery(
|
|
10878
|
+
return cbioportalUtils.generateAnnotateStructuralVariantQuery(
|
|
10879
|
+
/* @ts-ignore */
|
|
10880
|
+
mutation.structuralVariant, getTumorType(mutation), evidenceTypes);
|
|
10868
10881
|
}), 'id');
|
|
10869
10882
|
if (!(mutationQueryVariants.length === 0)) return [3 /*break*/, 1];
|
|
10870
10883
|
_a = [];
|
|
@@ -12058,7 +12071,7 @@ var DefaultMutationMapperStore = /** @class */ (function () {
|
|
|
12058
12071
|
value: function (mutation) {
|
|
12059
12072
|
return this.config.getTumorType
|
|
12060
12073
|
? this.config.getTumorType(mutation)
|
|
12061
|
-
: '
|
|
12074
|
+
: '';
|
|
12062
12075
|
}
|
|
12063
12076
|
});
|
|
12064
12077
|
Object.defineProperty(DefaultMutationMapperStore.prototype, "getDefaultEntrezGeneId", {
|
|
@@ -12340,7 +12353,7 @@ var GeneSummaryInfo = function (_a) {
|
|
|
12340
12353
|
DATA: ccdsId,
|
|
12341
12354
|
},
|
|
12342
12355
|
}), target: "_blank" }, ccdsId)) : ('-');
|
|
12343
|
-
var uniprot = uniprotId ? (React__namespace.createElement("a", { href: "
|
|
12356
|
+
var uniprot = uniprotId ? (React__namespace.createElement("a", { href: "https://www.uniprot.org/uniprot/" + uniprotId, target: "_blank" }, uniprotId)) : ('-');
|
|
12344
12357
|
var compactGeneSummaryInfo = (React__namespace.createElement("div", null,
|
|
12345
12358
|
React__namespace.createElement("span", { "data-test": "compactGeneSummaryRefSeq" }, refSeq), " | ",
|
|
12346
12359
|
ensembl,
|