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
|
@@ -11,7 +11,7 @@ declare type MutationStatusProps = {
|
|
|
11
11
|
[mutationStatus: string]: React.CSSProperties;
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export declare class MutationStatus extends React.Component<MutationStatusProps, {}> {
|
|
15
15
|
static defaultProps: Partial<MutationStatusProps>;
|
|
16
16
|
render(): JSX.Element;
|
|
17
17
|
}
|
|
@@ -11,7 +11,6 @@ export default class OncoKbHelper {
|
|
|
11
11
|
static get LEVEL_DESC(): {
|
|
12
12
|
[level: string]: JSX.Element;
|
|
13
13
|
};
|
|
14
|
-
static levelTooltipContent: (level: string) => JSX.Element;
|
|
15
14
|
static getDefaultColumnDefinition(columnKey: 'level' | 'alterations'): {
|
|
16
15
|
id: string;
|
|
17
16
|
Header: JSX.Element;
|
|
File without changes
|
package/dist/component/oncokb/{CompactAnnotationIcon.d.ts → icon/CompactAnnotationIcon.d.ts}
RENAMED
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export { default as MyCancerGenome, download as myCancerGenomeDownload, sortValu
|
|
|
12
12
|
export { default as Hgvsc, download as hgvscDownload, sortValue as hgvscSortValue, } from './component/column/Hgvsc';
|
|
13
13
|
export { default as Hgvsg } from './component/column/Hgvsg';
|
|
14
14
|
export * from './component/column/HgvsHelper';
|
|
15
|
-
export {
|
|
15
|
+
export { MutationStatus } from './component/column/MutationStatus';
|
|
16
16
|
export { default as ProteinChange, proteinChangeSortMethod, } from './component/column/ProteinChange';
|
|
17
17
|
export { default as Signal, getSignalData, getSortValue as signalSortValue, download as signalDownload, getSingleSignalValue, SignalTable, } from './component/column/Signal';
|
|
18
18
|
export { default as DropdownSelector, DropdownSelectorProps, } from './component/filter/DropdownSelector';
|
package/dist/index.es.js
CHANGED
|
@@ -6,7 +6,7 @@ import { observer } from 'mobx-react';
|
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import React__default, { useState } from 'react';
|
|
8
8
|
import { DefaultTooltip, TruncatedText, getNCBIlink, trimOffHtmlTagEntities, cachePostMethodsOnClient, CanonicalMutationType, MutationTumorTypeFrequencyTable, FREQUENCY_COLUMNS_DEFINITION, FrequencyTableColumnEnum, CheckedSelect, getSelectedValuesMap, Checklist, MUT_COLOR_MISSENSE, MUT_COLOR_MISSENSE_PASSENGER, MUT_COLOR_INFRAME, MUT_COLOR_INFRAME_PASSENGER, MUT_COLOR_TRUNC, MUT_COLOR_TRUNC_PASSENGER, MUT_COLOR_SPLICE, MUT_COLOR_SPLICE_PASSENGER, STRUCTURAL_VARIANT_COLOR, STRUCTURAL_VARIANT_PASSENGER_COLOR, MUT_COLOR_OTHER, getCanonicalMutationType, getProteinImpactTypeFromCanonical, ProteinImpactType, getProteinImpactType, resolveColumnVisibility, resolveColumnVisibilityByColumnDefinition, longestCommonStartingSubstring, getTextWidth, unhoverAllComponents, SVGAxis, getComponentIndex, defaultHitzoneConfig, initHitZoneFromConfig, EditableSpan, DownloadControls, EllipsisTextTooltip, remoteData, WindowWrapper } from 'cbioportal-frontend-commons';
|
|
9
|
-
import { CIVIC_NA_VALUE, generateQueryVariantId, OncoKbCardDataType, parseMyCancerGenomeLink, defaultArraySortMethod, defaultSortMethod, LEVELS, uniqueGenomicLocations, indexAnnotationsByGenomicLocation, getCivicEntry, getRemoteDataGroupStatus, getMyCancerGenomeLinks, isLinearClusterHotspot, is3dHotspot, calculateOncoKbAvailableDataType, getVariantAnnotation, getDbsnpRsId, getMyVariantInfoAnnotation, generateHgvsgByMutation, calcProteinChangeSortValue, Pathogenicity, extendMutations, formatNumberValueInSignificantDigits, generateTumorTypeDecomposition, formatPercentValue, countMutationsByProteinChange, numberOfLeadingDecimalZeros, filterLinearClusterHotspotsByMutations, filter3dHotspotsByMutations, isHotspot, defaultHotspotFilter, defaultStringArraySortMethod, extractExonInformation, formatExonLocation, formatExonLength, ptmColor, compareByPtmTypePriority, UniprotTopologyTrackToColor, UniprotTopologyTypeToTitle, PtmSource, PTM_SOURCE_URL, getMyVariantInfoAnnotationsFromIndexedVariantAnnotations, generateProteinChangeQuery, StructuralVariantType, generateAnnotateStructuralVariantQuery, getMyCancerGenomeData, genomicLocationString, convertUniprotFeatureToPtm, convertDbPtmToPtm, UniprotCategory, convertUniprotFeatureToUniprotTopology, groupPtmDataByPosition, groupPtmDataByTypeAndPosition, groupCancerHotspotDataByPosition, indexHotspotsData, fetchCivicGenes, fetchCivicVariants, getMutationsByTranscriptId, groupMutationsByProteinStartPos, groupHotspotsByMutations } from 'cbioportal-utils';
|
|
9
|
+
import { CIVIC_NA_VALUE, deriveStructuralVariantType, generateQueryStructuralVariantId, generateQueryVariantId, OncoKbCardDataType, parseMyCancerGenomeLink, defaultArraySortMethod, defaultSortMethod, LEVELS, uniqueGenomicLocations, indexAnnotationsByGenomicLocation, getCivicEntry, getRemoteDataGroupStatus, getMyCancerGenomeLinks, isLinearClusterHotspot, is3dHotspot, calculateOncoKbAvailableDataType, getVariantAnnotation, getDbsnpRsId, getMyVariantInfoAnnotation, generateHgvsgByMutation, calcProteinChangeSortValue, Pathogenicity, extendMutations, formatNumberValueInSignificantDigits, generateTumorTypeDecomposition, formatPercentValue, countMutationsByProteinChange, numberOfLeadingDecimalZeros, filterLinearClusterHotspotsByMutations, filter3dHotspotsByMutations, isHotspot, defaultHotspotFilter, defaultStringArraySortMethod, extractExonInformation, formatExonLocation, formatExonLength, ptmColor, compareByPtmTypePriority, UniprotTopologyTrackToColor, UniprotTopologyTypeToTitle, PtmSource, PTM_SOURCE_URL, getMyVariantInfoAnnotationsFromIndexedVariantAnnotations, generateProteinChangeQuery, StructuralVariantType, generateAnnotateStructuralVariantQuery, getMyCancerGenomeData, genomicLocationString, convertUniprotFeatureToPtm, convertDbPtmToPtm, UniprotCategory, convertUniprotFeatureToUniprotTopology, groupPtmDataByPosition, groupPtmDataByTypeAndPosition, groupCancerHotspotDataByPosition, indexHotspotsData, fetchCivicGenes, fetchCivicVariants, getMutationsByTranscriptId, groupMutationsByProteinStartPos, groupHotspotsByMutations } from 'cbioportal-utils';
|
|
10
10
|
import classnames from 'classnames';
|
|
11
11
|
import autobind from 'autobind-decorator';
|
|
12
12
|
import oncoKbLogoImgSrc from 'oncokb-styles/dist/images/logo/oncokb.svg';
|
|
@@ -451,6 +451,15 @@ function getTumorTypeName(tumorType) {
|
|
|
451
451
|
return '';
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
|
+
function getTumorTypeNameWithExclusionInfo(tumorType, excludedTumorTypes) {
|
|
455
|
+
var name = getTumorTypeName(tumorType);
|
|
456
|
+
if (!___default.isEmpty(excludedTumorTypes)) {
|
|
457
|
+
name = name + " (excluding " + excludedTumorTypes
|
|
458
|
+
.map(function (ett) { return getTumorTypeName(ett); })
|
|
459
|
+
.join(', ') + ")";
|
|
460
|
+
}
|
|
461
|
+
return name;
|
|
462
|
+
}
|
|
454
463
|
function groupOncoKbIndicatorDataByMutations(mutationsByPosition, oncoKbData, getTumorType, getEntrezGeneId, filter) {
|
|
455
464
|
var indicatorMap = {};
|
|
456
465
|
___default.keys(mutationsByPosition).forEach(function (key) {
|
|
@@ -472,7 +481,16 @@ function getIndicatorData(mutation, oncoKbData, getTumorType, getEntrezGeneId) {
|
|
|
472
481
|
if (oncoKbData.indicatorMap === null) {
|
|
473
482
|
return undefined;
|
|
474
483
|
}
|
|
475
|
-
var id =
|
|
484
|
+
var id = '';
|
|
485
|
+
// @ts-ignore
|
|
486
|
+
var sv = mutation.structuralVariant;
|
|
487
|
+
if (sv) {
|
|
488
|
+
var structuralVariantType = deriveStructuralVariantType(sv);
|
|
489
|
+
id = generateQueryStructuralVariantId(sv.site1EntrezGeneId, sv.site2EntrezGeneId, getTumorType(mutation), structuralVariantType);
|
|
490
|
+
}
|
|
491
|
+
else {
|
|
492
|
+
id = generateQueryVariantId(getEntrezGeneId(mutation), getTumorType(mutation), mutation.proteinChange, mutation.mutationType);
|
|
493
|
+
}
|
|
476
494
|
return oncoKbData.indicatorMap[id];
|
|
477
495
|
}
|
|
478
496
|
function defaultOncoKbIndicatorFilter(indicator) {
|
|
@@ -797,6 +815,14 @@ var OncoKBSuggestAnnotationLinkout = /** @class */ (function (_super) {
|
|
|
797
815
|
return OncoKBSuggestAnnotationLinkout;
|
|
798
816
|
}(React.Component));
|
|
799
817
|
|
|
818
|
+
var levelTooltipContent = function (level) {
|
|
819
|
+
return (React.createElement("div", { style: { maxWidth: '200px' } }, OncoKbHelper.LEVEL_DESC[level]));
|
|
820
|
+
};
|
|
821
|
+
var LevelIcon = function (props) {
|
|
822
|
+
return (React.createElement(DefaultTooltip, { overlay: levelTooltipContent(props.level), placement: "left", disabled: !props.showDescription, trigger: ['hover', 'focus'], destroyTooltipOnHide: true },
|
|
823
|
+
React.createElement("i", { className: levelIconClassNames(props.level) })));
|
|
824
|
+
};
|
|
825
|
+
|
|
800
826
|
var OncoKbHelper = /** @class */ (function () {
|
|
801
827
|
function OncoKbHelper() {
|
|
802
828
|
}
|
|
@@ -935,7 +961,6 @@ var OncoKbHelper = /** @class */ (function () {
|
|
|
935
961
|
configurable: true,
|
|
936
962
|
writable: true,
|
|
937
963
|
value: function (columnKey) {
|
|
938
|
-
var _this = this;
|
|
939
964
|
switch (columnKey) {
|
|
940
965
|
case 'level':
|
|
941
966
|
return {
|
|
@@ -948,8 +973,7 @@ var OncoKbHelper = /** @class */ (function () {
|
|
|
948
973
|
},
|
|
949
974
|
Cell: function (props) {
|
|
950
975
|
var normalizedLevel = normalizeLevel(props.value) || '';
|
|
951
|
-
return (React.createElement(
|
|
952
|
-
React.createElement("i", { className: levelIconClassNames(normalizedLevel), style: { margin: 'auto' } })));
|
|
976
|
+
return (React.createElement(LevelIcon, { level: normalizedLevel, showDescription: true }));
|
|
953
977
|
},
|
|
954
978
|
};
|
|
955
979
|
case 'alterations':
|
|
@@ -965,14 +989,6 @@ var OncoKbHelper = /** @class */ (function () {
|
|
|
965
989
|
}
|
|
966
990
|
}
|
|
967
991
|
});
|
|
968
|
-
Object.defineProperty(OncoKbHelper, "levelTooltipContent", {
|
|
969
|
-
enumerable: true,
|
|
970
|
-
configurable: true,
|
|
971
|
-
writable: true,
|
|
972
|
-
value: function (level) {
|
|
973
|
-
return (React.createElement("div", { style: { maxWidth: '200px' } }, OncoKbHelper.LEVEL_DESC[level]));
|
|
974
|
-
}
|
|
975
|
-
});
|
|
976
992
|
Object.defineProperty(OncoKbHelper, "getAlterationsColumnCell", {
|
|
977
993
|
enumerable: true,
|
|
978
994
|
configurable: true,
|
|
@@ -1275,7 +1291,7 @@ var OncoKbTreatmentTable = /** @class */ (function (_super) {
|
|
|
1275
1291
|
"cancer type(s)")),
|
|
1276
1292
|
accessor: 'levelAssociatedCancerType',
|
|
1277
1293
|
minWidth: 120,
|
|
1278
|
-
Cell: function (props) { return (React.createElement("div", { style: { whiteSpace: 'normal', lineHeight: '1rem' } },
|
|
1294
|
+
Cell: function (props) { return (React.createElement("div", { style: { whiteSpace: 'normal', lineHeight: '1rem' } }, getTumorTypeNameWithExclusionInfo(props.original.levelAssociatedCancerType, props.original.levelExcludedCancerTypes))); },
|
|
1279
1295
|
},
|
|
1280
1296
|
{
|
|
1281
1297
|
id: 'referenceList',
|
|
@@ -1338,6 +1354,11 @@ var ImplicationContent = function (props) {
|
|
|
1338
1354
|
|
|
1339
1355
|
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_"};
|
|
1340
1356
|
|
|
1357
|
+
var OncogenicIcon = function (props) {
|
|
1358
|
+
return (React.createElement(DefaultTooltip, { overlay: React.createElement("span", null, props.oncogenicity), placement: "left", trigger: ['hover', 'focus'], destroyTooltipOnHide: true },
|
|
1359
|
+
React.createElement("i", { className: oncogenicityIconClassNames(props.oncogenicity) })));
|
|
1360
|
+
};
|
|
1361
|
+
|
|
1341
1362
|
var _a$3;
|
|
1342
1363
|
var OncoKbMedicalDisclaimer = (React__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."));
|
|
1343
1364
|
var ONCOKB_DATA_ACCESS_PAGE_LINK = 'https://docs.cbioportal.org/2.4-integration-with-other-webservices/oncokb-data-access';
|
|
@@ -1359,8 +1380,9 @@ var TabContentWrapper = function (props) {
|
|
|
1359
1380
|
return React__default.createElement("div", { className: mainStyles['tab-content'] }, props.children);
|
|
1360
1381
|
};
|
|
1361
1382
|
var TabTitle = function (props) {
|
|
1383
|
+
var _a;
|
|
1362
1384
|
var title = DATA_TYPE_TO_TITLE[props.type];
|
|
1363
|
-
var icon = props.displayHighestLevelInTabTitle ? (React__default.createElement(
|
|
1385
|
+
var icon = props.displayHighestLevelInTabTitle ? (props.type === OncoKbCardDataType.BIOLOGICAL ? (React__default.createElement(OncogenicIcon, { oncogenicity: ((_a = props.indicator) === null || _a === void 0 ? void 0 : _a.oncogenic) || '', showDescription: true })) : (React__default.createElement(LevelIcon, { level: normalizeLevel(calcHighestIndicatorLevel(props.type, props.indicator)) || '', showDescription: true }))) : null;
|
|
1364
1386
|
return icon ? (React__default.createElement("span", { style: { display: 'flex' } },
|
|
1365
1387
|
icon,
|
|
1366
1388
|
" ",
|
|
@@ -2091,7 +2113,7 @@ function getDefaultEntrezGeneId(mutation) {
|
|
|
2091
2113
|
return (mutation.gene && mutation.gene.entrezGeneId) || 0;
|
|
2092
2114
|
}
|
|
2093
2115
|
function getDefaultTumorType() {
|
|
2094
|
-
return '
|
|
2116
|
+
return '';
|
|
2095
2117
|
}
|
|
2096
2118
|
var memoized = new Map();
|
|
2097
2119
|
function getAnnotationData(mutation, oncoKbCancerGenes, hotspotData, myCancerGenomeData, oncoKbData, usingPublicOncoKbInstance, civicGenes, civicVariants, resolveTumorType, resolveEntrezGeneId) {
|
|
@@ -8167,9 +8189,7 @@ var OncoKbSummaryTable = /** @class */ (function (_super) {
|
|
|
8167
8189
|
overflow: 'hidden',
|
|
8168
8190
|
textOverflow: 'ellipsis',
|
|
8169
8191
|
} },
|
|
8170
|
-
React.createElement(
|
|
8171
|
-
verticalAlign: 'text-bottom',
|
|
8172
|
-
} }),
|
|
8192
|
+
React.createElement(LevelIcon, { level: level.level, showDescription: true }),
|
|
8173
8193
|
React.createElement("span", { style: {
|
|
8174
8194
|
paddingRight: 3,
|
|
8175
8195
|
} }, ":"),
|
|
@@ -8289,7 +8309,7 @@ function generateLevelData(indicatorData) {
|
|
|
8289
8309
|
var parts = treatment.level.split('_');
|
|
8290
8310
|
var level = parts.length === 2 ? parts[1] : treatment.level;
|
|
8291
8311
|
levels[level] = levels[level] || [];
|
|
8292
|
-
levels[level].push(
|
|
8312
|
+
levels[level].push(getTumorTypeNameWithExclusionInfo(treatment.levelAssociatedCancerType, treatment.levelExcludedCancerTypes));
|
|
8293
8313
|
});
|
|
8294
8314
|
});
|
|
8295
8315
|
return ___default.keys(levels)
|
|
@@ -10597,7 +10617,7 @@ var DefaultMutationMapperDataFetcher = /** @class */ (function () {
|
|
|
10597
10617
|
writable: true,
|
|
10598
10618
|
value: function (mutations, fields, isoformOverrideSource, client) {
|
|
10599
10619
|
if (fields === void 0) { fields = ['annotation_summary']; }
|
|
10600
|
-
if (isoformOverrideSource === void 0) { isoformOverrideSource = '
|
|
10620
|
+
if (isoformOverrideSource === void 0) { isoformOverrideSource = 'mskcc'; }
|
|
10601
10621
|
if (client === void 0) { client = this.genomeNexusClient; }
|
|
10602
10622
|
return __awaiter(this, void 0, void 0, function () {
|
|
10603
10623
|
return __generator(this, function (_a) {
|
|
@@ -10827,7 +10847,9 @@ var DefaultMutationMapperDataFetcher = /** @class */ (function () {
|
|
|
10827
10847
|
return ((_a = mutation.mutationType) === null || _a === void 0 ? void 0 : _a.toUpperCase()) ===
|
|
10828
10848
|
StructuralVariantType.FUSION;
|
|
10829
10849
|
}), function (mutation) {
|
|
10830
|
-
return generateAnnotateStructuralVariantQuery(
|
|
10850
|
+
return generateAnnotateStructuralVariantQuery(
|
|
10851
|
+
/* @ts-ignore */
|
|
10852
|
+
mutation.structuralVariant, getTumorType(mutation), evidenceTypes);
|
|
10831
10853
|
}), 'id');
|
|
10832
10854
|
if (!(mutationQueryVariants.length === 0)) return [3 /*break*/, 1];
|
|
10833
10855
|
_a = [];
|
|
@@ -12021,7 +12043,7 @@ var DefaultMutationMapperStore = /** @class */ (function () {
|
|
|
12021
12043
|
value: function (mutation) {
|
|
12022
12044
|
return this.config.getTumorType
|
|
12023
12045
|
? this.config.getTumorType(mutation)
|
|
12024
|
-
: '
|
|
12046
|
+
: '';
|
|
12025
12047
|
}
|
|
12026
12048
|
});
|
|
12027
12049
|
Object.defineProperty(DefaultMutationMapperStore.prototype, "getDefaultEntrezGeneId", {
|