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
|
@@ -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';
|
|
@@ -472,7 +472,16 @@ function getIndicatorData(mutation, oncoKbData, getTumorType, getEntrezGeneId) {
|
|
|
472
472
|
if (oncoKbData.indicatorMap === null) {
|
|
473
473
|
return undefined;
|
|
474
474
|
}
|
|
475
|
-
var id =
|
|
475
|
+
var id = '';
|
|
476
|
+
// @ts-ignore
|
|
477
|
+
var sv = mutation.structuralVariant;
|
|
478
|
+
if (sv) {
|
|
479
|
+
var structuralVariantType = deriveStructuralVariantType(sv);
|
|
480
|
+
id = generateQueryStructuralVariantId(sv.site1EntrezGeneId, sv.site2EntrezGeneId, getTumorType(mutation), structuralVariantType);
|
|
481
|
+
}
|
|
482
|
+
else {
|
|
483
|
+
id = generateQueryVariantId(getEntrezGeneId(mutation), getTumorType(mutation), mutation.proteinChange, mutation.mutationType);
|
|
484
|
+
}
|
|
476
485
|
return oncoKbData.indicatorMap[id];
|
|
477
486
|
}
|
|
478
487
|
function defaultOncoKbIndicatorFilter(indicator) {
|
|
@@ -797,6 +806,14 @@ var OncoKBSuggestAnnotationLinkout = /** @class */ (function (_super) {
|
|
|
797
806
|
return OncoKBSuggestAnnotationLinkout;
|
|
798
807
|
}(React.Component));
|
|
799
808
|
|
|
809
|
+
var levelTooltipContent = function (level) {
|
|
810
|
+
return (React.createElement("div", { style: { maxWidth: '200px' } }, OncoKbHelper.LEVEL_DESC[level]));
|
|
811
|
+
};
|
|
812
|
+
var LevelIcon = function (props) {
|
|
813
|
+
return (React.createElement(DefaultTooltip, { overlay: levelTooltipContent(props.level), placement: "left", disabled: !props.showDescription, trigger: ['hover', 'focus'], destroyTooltipOnHide: true },
|
|
814
|
+
React.createElement("i", { className: levelIconClassNames(props.level) })));
|
|
815
|
+
};
|
|
816
|
+
|
|
800
817
|
var OncoKbHelper = /** @class */ (function () {
|
|
801
818
|
function OncoKbHelper() {
|
|
802
819
|
}
|
|
@@ -935,7 +952,6 @@ var OncoKbHelper = /** @class */ (function () {
|
|
|
935
952
|
configurable: true,
|
|
936
953
|
writable: true,
|
|
937
954
|
value: function (columnKey) {
|
|
938
|
-
var _this = this;
|
|
939
955
|
switch (columnKey) {
|
|
940
956
|
case 'level':
|
|
941
957
|
return {
|
|
@@ -948,8 +964,7 @@ var OncoKbHelper = /** @class */ (function () {
|
|
|
948
964
|
},
|
|
949
965
|
Cell: function (props) {
|
|
950
966
|
var normalizedLevel = normalizeLevel(props.value) || '';
|
|
951
|
-
return (React.createElement(
|
|
952
|
-
React.createElement("i", { className: levelIconClassNames(normalizedLevel), style: { margin: 'auto' } })));
|
|
967
|
+
return (React.createElement(LevelIcon, { level: normalizedLevel, showDescription: true }));
|
|
953
968
|
},
|
|
954
969
|
};
|
|
955
970
|
case 'alterations':
|
|
@@ -965,14 +980,6 @@ var OncoKbHelper = /** @class */ (function () {
|
|
|
965
980
|
}
|
|
966
981
|
}
|
|
967
982
|
});
|
|
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
983
|
Object.defineProperty(OncoKbHelper, "getAlterationsColumnCell", {
|
|
977
984
|
enumerable: true,
|
|
978
985
|
configurable: true,
|
|
@@ -1338,6 +1345,11 @@ var ImplicationContent = function (props) {
|
|
|
1338
1345
|
|
|
1339
1346
|
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
1347
|
|
|
1348
|
+
var OncogenicIcon = function (props) {
|
|
1349
|
+
return (React.createElement(DefaultTooltip, { overlay: React.createElement("span", null, props.oncogenicity), placement: "left", trigger: ['hover', 'focus'], destroyTooltipOnHide: true },
|
|
1350
|
+
React.createElement("i", { className: oncogenicityIconClassNames(props.oncogenicity) })));
|
|
1351
|
+
};
|
|
1352
|
+
|
|
1341
1353
|
var _a$3;
|
|
1342
1354
|
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
1355
|
var ONCOKB_DATA_ACCESS_PAGE_LINK = 'https://docs.cbioportal.org/2.4-integration-with-other-webservices/oncokb-data-access';
|
|
@@ -1359,8 +1371,9 @@ var TabContentWrapper = function (props) {
|
|
|
1359
1371
|
return React__default.createElement("div", { className: mainStyles['tab-content'] }, props.children);
|
|
1360
1372
|
};
|
|
1361
1373
|
var TabTitle = function (props) {
|
|
1374
|
+
var _a;
|
|
1362
1375
|
var title = DATA_TYPE_TO_TITLE[props.type];
|
|
1363
|
-
var icon = props.displayHighestLevelInTabTitle ? (React__default.createElement(
|
|
1376
|
+
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
1377
|
return icon ? (React__default.createElement("span", { style: { display: 'flex' } },
|
|
1365
1378
|
icon,
|
|
1366
1379
|
" ",
|
|
@@ -1967,7 +1980,7 @@ var HotspotAnnotation = /** @class */ (function (_super) {
|
|
|
1967
1980
|
var DEFAULT_MUTATION_ALIGNER_URL_TEMPLATE = 'http://mutationaligner.org/api/domains/<%= pfamDomainId %>?metadata=true';
|
|
1968
1981
|
var DEFAULT_MUTATION_ALIGNER_PROXY_URL_TEMPLATE = 'https://www.cbioportal.org/proxy/mutationaligner.org/api/domains/<%= pfamDomainId %>?metadata=true';
|
|
1969
1982
|
var DEFAULT_MY_GENE_URL_TEMPLATE = 'https://mygene.info/v3/gene/<%= entrezGeneId %>?fields=uniprot';
|
|
1970
|
-
var DEFAULT_UNIPROT_ID_URL_TEMPLATE = 'https://
|
|
1983
|
+
var DEFAULT_UNIPROT_ID_URL_TEMPLATE = 'https://rest.uniprot.org/uniprotkb/search?query=accession:<%= swissProtAccession %>&format=tsv&fields=id';
|
|
1971
1984
|
var DEFAULT_GENOME_NEXUS_URL = 'https://www.genomenexus.org/';
|
|
1972
1985
|
// The legacy instance does not require an authentication but the data will not be update.
|
|
1973
1986
|
var DEFAULT_ONCO_KB_URL = 'https://legacy.oncokb.org/';
|
|
@@ -2091,7 +2104,7 @@ function getDefaultEntrezGeneId(mutation) {
|
|
|
2091
2104
|
return (mutation.gene && mutation.gene.entrezGeneId) || 0;
|
|
2092
2105
|
}
|
|
2093
2106
|
function getDefaultTumorType() {
|
|
2094
|
-
return '
|
|
2107
|
+
return '';
|
|
2095
2108
|
}
|
|
2096
2109
|
var memoized = new Map();
|
|
2097
2110
|
function getAnnotationData(mutation, oncoKbCancerGenes, hotspotData, myCancerGenomeData, oncoKbData, usingPublicOncoKbInstance, civicGenes, civicVariants, resolveTumorType, resolveEntrezGeneId) {
|
|
@@ -8167,9 +8180,7 @@ var OncoKbSummaryTable = /** @class */ (function (_super) {
|
|
|
8167
8180
|
overflow: 'hidden',
|
|
8168
8181
|
textOverflow: 'ellipsis',
|
|
8169
8182
|
} },
|
|
8170
|
-
React.createElement(
|
|
8171
|
-
verticalAlign: 'text-bottom',
|
|
8172
|
-
} }),
|
|
8183
|
+
React.createElement(LevelIcon, { level: level.level, showDescription: true }),
|
|
8173
8184
|
React.createElement("span", { style: {
|
|
8174
8185
|
paddingRight: 3,
|
|
8175
8186
|
} }, ":"),
|
|
@@ -8289,7 +8300,7 @@ function generateLevelData(indicatorData) {
|
|
|
8289
8300
|
var parts = treatment.level.split('_');
|
|
8290
8301
|
var level = parts.length === 2 ? parts[1] : treatment.level;
|
|
8291
8302
|
levels[level] = levels[level] || [];
|
|
8292
|
-
levels[level].push(
|
|
8303
|
+
levels[level].push(getTumorTypeName(treatment.levelAssociatedCancerType));
|
|
8293
8304
|
});
|
|
8294
8305
|
});
|
|
8295
8306
|
return ___default.keys(levels)
|
|
@@ -9799,7 +9810,7 @@ var LollipopMutationPlot = /** @class */ (function (_super) {
|
|
|
9799
9810
|
writable: true,
|
|
9800
9811
|
value: function () {
|
|
9801
9812
|
return (React.createElement("div", { style: { maxWidth: 200 } },
|
|
9802
|
-
React.createElement("a", { href: "
|
|
9813
|
+
React.createElement("a", { href: "https://www.uniprot.org/uniprot/" + this.props.store.uniprotId.result, target: "_blank" }, this.props.store.uniprotId.result)));
|
|
9803
9814
|
}
|
|
9804
9815
|
});
|
|
9805
9816
|
Object.defineProperty(LollipopMutationPlot.prototype, "sequence", {
|
|
@@ -10597,7 +10608,7 @@ var DefaultMutationMapperDataFetcher = /** @class */ (function () {
|
|
|
10597
10608
|
writable: true,
|
|
10598
10609
|
value: function (mutations, fields, isoformOverrideSource, client) {
|
|
10599
10610
|
if (fields === void 0) { fields = ['annotation_summary']; }
|
|
10600
|
-
if (isoformOverrideSource === void 0) { isoformOverrideSource = '
|
|
10611
|
+
if (isoformOverrideSource === void 0) { isoformOverrideSource = 'mskcc'; }
|
|
10601
10612
|
if (client === void 0) { client = this.genomeNexusClient; }
|
|
10602
10613
|
return __awaiter(this, void 0, void 0, function () {
|
|
10603
10614
|
return __generator(this, function (_a) {
|
|
@@ -10827,7 +10838,9 @@ var DefaultMutationMapperDataFetcher = /** @class */ (function () {
|
|
|
10827
10838
|
return ((_a = mutation.mutationType) === null || _a === void 0 ? void 0 : _a.toUpperCase()) ===
|
|
10828
10839
|
StructuralVariantType.FUSION;
|
|
10829
10840
|
}), function (mutation) {
|
|
10830
|
-
return generateAnnotateStructuralVariantQuery(
|
|
10841
|
+
return generateAnnotateStructuralVariantQuery(
|
|
10842
|
+
/* @ts-ignore */
|
|
10843
|
+
mutation.structuralVariant, getTumorType(mutation), evidenceTypes);
|
|
10831
10844
|
}), 'id');
|
|
10832
10845
|
if (!(mutationQueryVariants.length === 0)) return [3 /*break*/, 1];
|
|
10833
10846
|
_a = [];
|
|
@@ -12021,7 +12034,7 @@ var DefaultMutationMapperStore = /** @class */ (function () {
|
|
|
12021
12034
|
value: function (mutation) {
|
|
12022
12035
|
return this.config.getTumorType
|
|
12023
12036
|
? this.config.getTumorType(mutation)
|
|
12024
|
-
: '
|
|
12037
|
+
: '';
|
|
12025
12038
|
}
|
|
12026
12039
|
});
|
|
12027
12040
|
Object.defineProperty(DefaultMutationMapperStore.prototype, "getDefaultEntrezGeneId", {
|
|
@@ -12303,7 +12316,7 @@ var GeneSummaryInfo = function (_a) {
|
|
|
12303
12316
|
DATA: ccdsId,
|
|
12304
12317
|
},
|
|
12305
12318
|
}), target: "_blank" }, ccdsId)) : ('-');
|
|
12306
|
-
var uniprot = uniprotId ? (React.createElement("a", { href: "
|
|
12319
|
+
var uniprot = uniprotId ? (React.createElement("a", { href: "https://www.uniprot.org/uniprot/" + uniprotId, target: "_blank" }, uniprotId)) : ('-');
|
|
12307
12320
|
var compactGeneSummaryInfo = (React.createElement("div", null,
|
|
12308
12321
|
React.createElement("span", { "data-test": "compactGeneSummaryRefSeq" }, refSeq), " | ",
|
|
12309
12322
|
ensembl,
|