react-mutation-mapper 0.8.20 → 0.8.24
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/lollipopMutationPlot/LollipopMutationPlot.d.ts +1 -0
- package/dist/component/mutationMapper/MutationMapper.d.ts +1 -0
- package/dist/component/track/TrackItem.d.ts +2 -1
- package/dist/component/track/TrackPanel.d.ts +1 -0
- package/dist/component/track/TrackSelector.d.ts +6 -1
- package/dist/component/track/UniprotTopologyTrack.d.ts +38 -0
- package/dist/index.es.js +412 -106
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +412 -105
- package/dist/index.js.map +1 -1
- package/dist/model/MutationMapperDataFetcher.d.ts +1 -1
- package/dist/model/MutationMapperStore.d.ts +2 -1
- package/dist/store/DefaultMutationMapperDataFetcher.d.ts +1 -1
- package/dist/store/DefaultMutationMapperStore.d.ts +2 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -4,7 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
6
6
|
|
|
7
|
-
var _ =
|
|
7
|
+
var _ = require('lodash');
|
|
8
|
+
var ___default = _interopDefault(_);
|
|
8
9
|
var mobx = require('mobx');
|
|
9
10
|
var mobxReact = require('mobx-react');
|
|
10
11
|
var React = require('react');
|
|
@@ -150,7 +151,7 @@ var CivicCard = /** @class */ (function (_super) {
|
|
|
150
151
|
writable: true,
|
|
151
152
|
value: function (variantMap) {
|
|
152
153
|
var list = [];
|
|
153
|
-
if (
|
|
154
|
+
if (___default.isEmpty(variantMap)) {
|
|
154
155
|
list.push(this.variantItem('_naVariant_'));
|
|
155
156
|
}
|
|
156
157
|
else {
|
|
@@ -255,10 +256,10 @@ function download(civicEntry) {
|
|
|
255
256
|
if (!civicEntry) {
|
|
256
257
|
return cbioportalUtils.CIVIC_NA_VALUE;
|
|
257
258
|
}
|
|
258
|
-
var variants =
|
|
259
|
+
var variants = ___default.values(civicEntry.variants);
|
|
259
260
|
var values = [];
|
|
260
261
|
if (variants && variants.length > 0 && variants[0].evidenceCounts) {
|
|
261
|
-
|
|
262
|
+
___default.forEach(variants[0].evidenceCounts, function (value, key) {
|
|
262
263
|
values.push(key + ": " + value);
|
|
263
264
|
});
|
|
264
265
|
}
|
|
@@ -453,12 +454,12 @@ function mergeAlterations(alterations) {
|
|
|
453
454
|
var positions = {};
|
|
454
455
|
var regular = [];
|
|
455
456
|
var regExp = new RegExp('^([A-Z])([0-9]+)([A-Z]$)');
|
|
456
|
-
if (
|
|
457
|
+
if (___default.isString(alterations)) {
|
|
457
458
|
return alterations;
|
|
458
459
|
}
|
|
459
|
-
|
|
460
|
+
___default.each(alterations, function (alteration) {
|
|
460
461
|
var result = regExp.exec(alteration);
|
|
461
|
-
if (
|
|
462
|
+
if (___default.isArray(result) && result.length === 4) {
|
|
462
463
|
if (!positions.hasOwnProperty(result[2])) {
|
|
463
464
|
positions[result[2]] = {};
|
|
464
465
|
}
|
|
@@ -472,15 +473,15 @@ function mergeAlterations(alterations) {
|
|
|
472
473
|
regular.push(alteration);
|
|
473
474
|
}
|
|
474
475
|
});
|
|
475
|
-
|
|
476
|
+
___default.each(___default.keys(positions)
|
|
476
477
|
.map(function (e) {
|
|
477
478
|
return Number(e);
|
|
478
479
|
})
|
|
479
480
|
.sort(), function (position) {
|
|
480
|
-
|
|
481
|
+
___default.each(___default.keys(positions[position]).sort(), function (aa) {
|
|
481
482
|
regular.push(aa +
|
|
482
483
|
position +
|
|
483
|
-
|
|
484
|
+
___default.keys(positions[position][aa])
|
|
484
485
|
.sort()
|
|
485
486
|
.join('/'));
|
|
486
487
|
});
|
|
@@ -499,7 +500,7 @@ function getPositionalVariant(alteration) {
|
|
|
499
500
|
// result[1]: reference alleles (there could be multiple reference alleles, we only return the first allele)
|
|
500
501
|
// result[2]: position(protein start/end)
|
|
501
502
|
// result[3]: variant alleles (empty if the alteration is positional variant already)
|
|
502
|
-
if (
|
|
503
|
+
if (___default.isArray(result) &&
|
|
503
504
|
result.length === 4 &&
|
|
504
505
|
(!result[3] || result[1].length === result[3].length)) {
|
|
505
506
|
return "" + result[1][0] + result[2];
|
|
@@ -522,7 +523,7 @@ function getTumorTypeName(tumorType) {
|
|
|
522
523
|
}
|
|
523
524
|
function groupOncoKbIndicatorDataByMutations(mutationsByPosition, oncoKbData, getTumorType, getEntrezGeneId, filter) {
|
|
524
525
|
var indicatorMap = {};
|
|
525
|
-
|
|
526
|
+
___default.keys(mutationsByPosition).forEach(function (key) {
|
|
526
527
|
var position = Number(key);
|
|
527
528
|
var indicators = mutationsByPosition[position]
|
|
528
529
|
.map(function (mutation) {
|
|
@@ -577,7 +578,7 @@ function download$1(links) {
|
|
|
577
578
|
}
|
|
578
579
|
function myCancerGenomeLinks(linksHTML) {
|
|
579
580
|
var links = [];
|
|
580
|
-
|
|
581
|
+
___default.each(linksHTML, function (link, index) {
|
|
581
582
|
// TODO this is a workaround, ideally we should fix the data itself
|
|
582
583
|
// parse the data as an HTML dom element, since it is formatted as an HTML link.
|
|
583
584
|
var myCancerGenomeLink = cbioportalUtils.parseMyCancerGenomeLink(link);
|
|
@@ -788,11 +789,11 @@ var OncoKbHelper = /** @class */ (function () {
|
|
|
788
789
|
switch (dataType) {
|
|
789
790
|
case cbioportalUtils.OncoKbCardDataType.TXS:
|
|
790
791
|
case cbioportalUtils.OncoKbCardDataType.TXR:
|
|
791
|
-
return
|
|
792
|
+
return ___default.pick(this.LEVEL_DESC, this.TX_LEVELS);
|
|
792
793
|
case cbioportalUtils.OncoKbCardDataType.DX:
|
|
793
|
-
return
|
|
794
|
+
return ___default.pick(this.LEVEL_DESC, this.DX_LEVELS);
|
|
794
795
|
case cbioportalUtils.OncoKbCardDataType.PX:
|
|
795
|
-
return
|
|
796
|
+
return ___default.pick(this.LEVEL_DESC, this.PX_LEVELS);
|
|
796
797
|
default:
|
|
797
798
|
return {};
|
|
798
799
|
}
|
|
@@ -934,7 +935,7 @@ var OncoKbHelper = /** @class */ (function () {
|
|
|
934
935
|
var content = React.createElement("span", null, mergedAlteration);
|
|
935
936
|
if (alterations.length > 5) {
|
|
936
937
|
var lowerCasedQueryVariant_1 = variant.toLowerCase();
|
|
937
|
-
var matchedAlteration =
|
|
938
|
+
var matchedAlteration = ___default.find(alterations, function (alteration) {
|
|
938
939
|
return alteration.toLocaleLowerCase() === lowerCasedQueryVariant_1;
|
|
939
940
|
});
|
|
940
941
|
if (!matchedAlteration) {
|
|
@@ -1019,7 +1020,7 @@ var ReferenceList = /** @class */ (function (_super) {
|
|
|
1019
1020
|
get: function () {
|
|
1020
1021
|
var _this = this;
|
|
1021
1022
|
if (this.props.pmidData && this.props.pmids) {
|
|
1022
|
-
var loadingItems =
|
|
1023
|
+
var loadingItems = ___default.filter(this.props.pmids, function (uid) {
|
|
1023
1024
|
var cacheData = _this.props.pmidData[uid.toString()];
|
|
1024
1025
|
// when the cacheData is undefined, the pmidData will fetch the uid info later which eventually results to an object with a status
|
|
1025
1026
|
return !cacheData || cacheData.status === 'pending';
|
|
@@ -1048,7 +1049,7 @@ var ReferenceList = /** @class */ (function (_super) {
|
|
|
1048
1049
|
var cacheData = _this.props.pmidData[uid.toString()];
|
|
1049
1050
|
var articleContent = cacheData ? cacheData.data : null;
|
|
1050
1051
|
if (articleContent) {
|
|
1051
|
-
list.push(React.createElement(PmidItem, { title: articleContent.title, author:
|
|
1052
|
+
list.push(React.createElement(PmidItem, { title: articleContent.title, author: ___default.isArray(articleContent.authors) &&
|
|
1052
1053
|
articleContent.authors.length > 0
|
|
1053
1054
|
? articleContent.authors[0].name + ' et al.'
|
|
1054
1055
|
: 'Unknown', source: articleContent.source, date: new Date(articleContent.pubdate)
|
|
@@ -1517,7 +1518,7 @@ var OncoKbTooltip = /** @class */ (function (_super) {
|
|
|
1517
1518
|
allPmids_1 = allPmids_1.concat(implication.pmids);
|
|
1518
1519
|
});
|
|
1519
1520
|
}
|
|
1520
|
-
for (var _i = 0, _a =
|
|
1521
|
+
for (var _i = 0, _a = ___default.uniq(allPmids_1).map(function (pmid) { return Number(pmid); }); _i < _a.length; _i++) {
|
|
1521
1522
|
var ref = _a[_i];
|
|
1522
1523
|
this.props.pubMedCache.get(ref);
|
|
1523
1524
|
}
|
|
@@ -1635,14 +1636,14 @@ function sortValue$2(indicator) {
|
|
|
1635
1636
|
return values;
|
|
1636
1637
|
}
|
|
1637
1638
|
function download$2(indicator) {
|
|
1639
|
+
var _a, _b;
|
|
1638
1640
|
if (!indicator) {
|
|
1639
1641
|
return 'NA';
|
|
1640
1642
|
}
|
|
1641
1643
|
var oncogenic = indicator.oncogenic ? indicator.oncogenic : 'Unknown';
|
|
1642
|
-
var
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
return oncogenic + ", " + level;
|
|
1644
|
+
var sensitivityLevel = ((_a = indicator.highestSensitiveLevel) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || 'level NA';
|
|
1645
|
+
var resistanceLevel = ((_b = indicator.highestResistanceLevel) === null || _b === void 0 ? void 0 : _b.toLowerCase()) || 'resistance NA';
|
|
1646
|
+
return oncogenic + ", " + sensitivityLevel + ", " + resistanceLevel;
|
|
1646
1647
|
}
|
|
1647
1648
|
var OncoKB = /** @class */ (function (_super) {
|
|
1648
1649
|
__extends(OncoKB, _super);
|
|
@@ -1900,7 +1901,7 @@ var ONCOKB_DEFAULT_INFO = {
|
|
|
1900
1901
|
};
|
|
1901
1902
|
var DEFAULT_GENOME_NEXUS_CLIENT = initGenomeNexusClient();
|
|
1902
1903
|
function getUrl(urlTemplate, templateVariables) {
|
|
1903
|
-
return
|
|
1904
|
+
return ___default.template(urlTemplate)(templateVariables);
|
|
1904
1905
|
}
|
|
1905
1906
|
function fetchVariantAnnotationsByMutation(mutations, fields, isoformOverrideSource, client) {
|
|
1906
1907
|
if (fields === void 0) { fields = ['annotation_summary']; }
|
|
@@ -2017,7 +2018,7 @@ function getAnnotationData(mutation, oncoKbCancerGenes, hotspotData, myCancerGen
|
|
|
2017
2018
|
var isOncoKbCancerGene = false;
|
|
2018
2019
|
if (oncoKbCancerGenes && !(oncoKbCancerGenes.result instanceof Error)) {
|
|
2019
2020
|
oncoKbGeneExist =
|
|
2020
|
-
|
|
2021
|
+
___default.find(oncoKbCancerGenes.result, function (gene) {
|
|
2021
2022
|
return (mutation.mutationType &&
|
|
2022
2023
|
mutation.mutationType.toLowerCase() ===
|
|
2023
2024
|
cbioportalFrontendCommons.CanonicalMutationType.FUSION) ||
|
|
@@ -2025,7 +2026,7 @@ function getAnnotationData(mutation, oncoKbCancerGenes, hotspotData, myCancerGen
|
|
|
2025
2026
|
gene.entrezGeneId === entrezGeneId_1);
|
|
2026
2027
|
}) !== undefined;
|
|
2027
2028
|
isOncoKbCancerGene =
|
|
2028
|
-
|
|
2029
|
+
___default.find(oncoKbCancerGenes.result, function (gene) { return gene.entrezGeneId === entrezGeneId_1; }) !== undefined;
|
|
2029
2030
|
}
|
|
2030
2031
|
value = {
|
|
2031
2032
|
hugoGeneSymbol: hugoGeneSymbol,
|
|
@@ -2079,7 +2080,7 @@ function getAnnotationData(mutation, oncoKbCancerGenes, hotspotData, myCancerGen
|
|
|
2079
2080
|
!(oncoKbData.result instanceof Error) &&
|
|
2080
2081
|
oncoKbData.status === 'complete') {
|
|
2081
2082
|
oncoKbIndicator = getIndicatorData(mutation, oncoKbData.result, resolveTumorType, resolveEntrezGeneId);
|
|
2082
|
-
oncoKbAvailableDataTypes =
|
|
2083
|
+
oncoKbAvailableDataTypes = ___default.uniq(__spreadArrays(oncoKbAvailableDataTypes, cbioportalUtils.calculateOncoKbAvailableDataType(___default.values(oncoKbData.result.indicatorMap))));
|
|
2083
2084
|
}
|
|
2084
2085
|
value = __assign(__assign({}, value), { oncoKbStatus: oncoKbData ? oncoKbData.status : 'pending', oncoKbIndicator: oncoKbIndicator,
|
|
2085
2086
|
oncoKbAvailableDataTypes: oncoKbAvailableDataTypes });
|
|
@@ -2103,7 +2104,7 @@ function annotationSortMethod(a, b) {
|
|
|
2103
2104
|
return cbioportalUtils.defaultArraySortMethod(sortValue$4(a), sortValue$4(b));
|
|
2104
2105
|
}
|
|
2105
2106
|
function sortValue$4(annotation) {
|
|
2106
|
-
return
|
|
2107
|
+
return ___default.flatten([
|
|
2107
2108
|
sortValue$2(annotation.oncoKbIndicator),
|
|
2108
2109
|
sortValue(annotation.civicEntry),
|
|
2109
2110
|
sortValue$1(annotation.myCancerGenomeLinks),
|
|
@@ -2409,7 +2410,7 @@ function getGnomadDataSortedByFrequency(myVariantInfo) {
|
|
|
2409
2410
|
}
|
|
2410
2411
|
function sortGnomadDataByFrequency(gnomadData) {
|
|
2411
2412
|
// sort by frequency
|
|
2412
|
-
var sorted =
|
|
2413
|
+
var sorted = ___default.sortBy(Object.values(gnomadData).slice(0, 8), [
|
|
2413
2414
|
'alleleFrequency',
|
|
2414
2415
|
]).reverse();
|
|
2415
2416
|
// add the total row at the bottom
|
|
@@ -3336,10 +3337,10 @@ function calculateBadgeAlignmentStyles(options, numberOfColumnsPerRow, uniformBa
|
|
|
3336
3337
|
var iterationCount = options.length;
|
|
3337
3338
|
var maxLength = Math.max.apply(Math, getOptionContentLengths(options));
|
|
3338
3339
|
var badgeWidth_1 = calculateBadgeAlignmentStyle(maxLength, maxLength, badgeCharWidth, badgeContentPadding, true);
|
|
3339
|
-
return
|
|
3340
|
+
return ___default.times(iterationCount, function () { return badgeWidth_1; });
|
|
3340
3341
|
}
|
|
3341
3342
|
else if (numberOfColumnsPerRow > 0) {
|
|
3342
|
-
var groupedByCol_1 =
|
|
3343
|
+
var groupedByCol_1 = ___default.groupBy(options, function (option) { return options.indexOf(option) % numberOfColumnsPerRow; });
|
|
3343
3344
|
return options.map(function (option, index) {
|
|
3344
3345
|
// define a max badge length for each column
|
|
3345
3346
|
var maxLengthInCol = Math.max.apply(Math, getOptionContentLengths(groupedByCol_1[index % numberOfColumnsPerRow]));
|
|
@@ -3519,7 +3520,7 @@ function getColorForProteinImpactType(mutations, colors, getMutationCount, isPut
|
|
|
3519
3520
|
};
|
|
3520
3521
|
counts[key].count += pMut.count;
|
|
3521
3522
|
}
|
|
3522
|
-
var sortedMutations =
|
|
3523
|
+
var sortedMutations = ___default.sortBy(___default.values(counts), [
|
|
3523
3524
|
function (pMut) { return (pMut.isPutativeDriver ? 0 : 1); },
|
|
3524
3525
|
function (// putative driver preferred non putative driver
|
|
3525
3526
|
pMut) { return -pMut.count; },
|
|
@@ -3924,7 +3925,7 @@ function updatePositionSelectionFilters(dataStore, position, isMultiSelect, defa
|
|
|
3924
3925
|
selectedPositions = findAllUniquePositions(dataStore.selectionFilters);
|
|
3925
3926
|
// remove current position if already selected
|
|
3926
3927
|
if (currentlySelected) {
|
|
3927
|
-
selectedPositions =
|
|
3928
|
+
selectedPositions = ___default.without(selectedPositions, position);
|
|
3928
3929
|
}
|
|
3929
3930
|
}
|
|
3930
3931
|
// add current position into list if not selected
|
|
@@ -3961,7 +3962,7 @@ function updatePositionRangeHighlightFilters(dataStore, startPosition, endPositi
|
|
|
3961
3962
|
updatePositionHighlightFilters(dataStore, positions, defaultFilters);
|
|
3962
3963
|
}
|
|
3963
3964
|
function findAllUniquePositions(filters) {
|
|
3964
|
-
return
|
|
3965
|
+
return ___default.uniq(___default.flatten(filters
|
|
3965
3966
|
// pick only position filters
|
|
3966
3967
|
.filter(function (f) { return f.type === exports.DataFilterType.POSITION; })
|
|
3967
3968
|
// we need to spread f.values, since it might be an observable mobx array
|
|
@@ -3969,7 +3970,7 @@ function findAllUniquePositions(filters) {
|
|
|
3969
3970
|
.map(function (f) { return __spreadArrays(f.values); })));
|
|
3970
3971
|
}
|
|
3971
3972
|
function indexPositions(filters) {
|
|
3972
|
-
return
|
|
3973
|
+
return ___default.keyBy(findAllUniquePositions(filters).map(function (p) { return ({ position: p }); }), 'position');
|
|
3973
3974
|
}
|
|
3974
3975
|
function includesSearchTextIgnoreCase(value, searchText) {
|
|
3975
3976
|
return (searchText &&
|
|
@@ -3982,7 +3983,7 @@ function findNonTextInputFilters(dataFilters) {
|
|
|
3982
3983
|
return dataFilters.filter(function (f) { return f.id !== TEXT_INPUT_FILTER_ID; });
|
|
3983
3984
|
}
|
|
3984
3985
|
function findOneMutationFilterValue(filter) {
|
|
3985
|
-
return filter.values.length > 0 ?
|
|
3986
|
+
return filter.values.length > 0 ? ___default.values(filter.values[0])[0] : undefined;
|
|
3986
3987
|
}
|
|
3987
3988
|
function applyDefaultPositionFilter(filter, mutation) {
|
|
3988
3989
|
// const positions: {[position: string]: {position: number}} = indexPositions([filter]);
|
|
@@ -3994,7 +3995,7 @@ function applyDefaultProteinImpactTypeFilter(filter, mutation) {
|
|
|
3994
3995
|
}
|
|
3995
3996
|
function applyDefaultMutationStatusFilter(filter, mutation) {
|
|
3996
3997
|
return (mutation.mutationStatus !== undefined &&
|
|
3997
|
-
|
|
3998
|
+
___default.some(filter.values, function (value) {
|
|
3998
3999
|
return value.toLowerCase() === mutation.mutationStatus.toLowerCase();
|
|
3999
4000
|
}));
|
|
4000
4001
|
}
|
|
@@ -4018,7 +4019,7 @@ function groupDataByGroupFilters(groupFilters, sortedFilteredData, applyFilter)
|
|
|
4018
4019
|
group: groupFilter.group,
|
|
4019
4020
|
data: sortedFilteredData.filter(
|
|
4020
4021
|
// TODO simplify array flatten if possible
|
|
4021
|
-
function (m) { return applyFilter(groupFilter.filter,
|
|
4022
|
+
function (m) { return applyFilter(groupFilter.filter, ___default.flatten([m])[0]); }),
|
|
4022
4023
|
}); });
|
|
4023
4024
|
}
|
|
4024
4025
|
function groupDataByProteinImpactType(sortedFilteredData) {
|
|
@@ -4030,7 +4031,7 @@ function groupDataByProteinImpactType(sortedFilteredData) {
|
|
|
4030
4031
|
},
|
|
4031
4032
|
}); });
|
|
4032
4033
|
var groupedData = groupDataByGroupFilters(filters, sortedFilteredData, applyDefaultProteinImpactTypeFilter);
|
|
4033
|
-
return
|
|
4034
|
+
return ___default.keyBy(groupedData, function (d) { return d.group; });
|
|
4034
4035
|
}
|
|
4035
4036
|
function onFilterOptionSelect(selectedValues, allValuesSelected, dataStore, dataFilterType, dataFilterId) {
|
|
4036
4037
|
// all other filters except the current filter with the given data filter id
|
|
@@ -4132,7 +4133,7 @@ var DataTableToolbar = /** @class */ (function (_super) {
|
|
|
4132
4133
|
React.createElement(ColumnSelector, __assign({ columnVisibility: this.props.columnVisibility, onColumnToggled: this.props.visibilityToggle }, this.props.columnSelectorProps)))),
|
|
4133
4134
|
this.props.showSearchBox && (React.createElement("div", { className: "small", style: { width: 200, marginLeft: this.searchBoxMargin } },
|
|
4134
4135
|
React.createElement(SearchBox, { placeholder: this.props.searchPlaceHolder, onChange: this.props.onSearch
|
|
4135
|
-
?
|
|
4136
|
+
? ___default.debounce(this.props.onSearch, this.props.searchDelay)
|
|
4136
4137
|
: this.props.onSearch, filterInputRef: this.props.filterInputRef })))));
|
|
4137
4138
|
}
|
|
4138
4139
|
});
|
|
@@ -4158,7 +4159,7 @@ var DataTableToolbar = /** @class */ (function (_super) {
|
|
|
4158
4159
|
})(exports.ColumnSortDirection || (exports.ColumnSortDirection = {}));
|
|
4159
4160
|
function getInitialSortDataStatus(initialSortRemoteData) {
|
|
4160
4161
|
return initialSortRemoteData
|
|
4161
|
-
? cbioportalUtils.getRemoteDataGroupStatus.apply(void 0,
|
|
4162
|
+
? cbioportalUtils.getRemoteDataGroupStatus.apply(void 0, ___default.compact(initialSortRemoteData)) : 'complete';
|
|
4162
4163
|
}
|
|
4163
4164
|
function getColumnVisibilityDef(columns, columnVisibility) {
|
|
4164
4165
|
var colVisProp = [];
|
|
@@ -4894,7 +4895,7 @@ function mergeColumns(defaultColumns, customColumns) {
|
|
|
4894
4895
|
overrides.push(colOverride);
|
|
4895
4896
|
}
|
|
4896
4897
|
});
|
|
4897
|
-
return __spreadArrays(merged,
|
|
4898
|
+
return __spreadArrays(merged, ___default.difference(customColumns, overrides));
|
|
4898
4899
|
}
|
|
4899
4900
|
|
|
4900
4901
|
var DefaultMutationTableComponent = /** @class */ (function (_super) {
|
|
@@ -4928,7 +4929,7 @@ var DefaultMutationTable = /** @class */ (function (_super) {
|
|
|
4928
4929
|
});
|
|
4929
4930
|
Object.defineProperty(DefaultMutationTable.prototype, "annotationColumnDataStatus", {
|
|
4930
4931
|
get: function () {
|
|
4931
|
-
return cbioportalUtils.getRemoteDataGroupStatus.apply(void 0,
|
|
4932
|
+
return cbioportalUtils.getRemoteDataGroupStatus.apply(void 0, ___default.compact(this.annotationColumnData));
|
|
4932
4933
|
},
|
|
4933
4934
|
enumerable: false,
|
|
4934
4935
|
configurable: true
|
|
@@ -5674,6 +5675,7 @@ function generatePfamDomainColorMap(pfamDomains) {
|
|
|
5674
5675
|
TrackName["dbPTM"] = "DB_PTM";
|
|
5675
5676
|
TrackName["UniprotPTM"] = "UNIPROT_PTM";
|
|
5676
5677
|
TrackName["Exon"] = "EXON";
|
|
5678
|
+
TrackName["UniprotTopology"] = "UNIPROT_TOPOLOGY";
|
|
5677
5679
|
})(exports.TrackName || (exports.TrackName = {}));
|
|
5678
5680
|
var TrackSelector = /** @class */ (function (_super) {
|
|
5679
5681
|
__extends(TrackSelector, _super);
|
|
@@ -5743,6 +5745,13 @@ var TrackSelector = /** @class */ (function (_super) {
|
|
|
5743
5745
|
this.isPending(exports.TrackName.Exon) && this.loaderIcon())),
|
|
5744
5746
|
value: exports.TrackName.Exon,
|
|
5745
5747
|
},
|
|
5748
|
+
_a[exports.TrackName.UniprotTopology] = {
|
|
5749
|
+
label: (React.createElement("span", null,
|
|
5750
|
+
"Uniprot Topology",
|
|
5751
|
+
this.isPending(exports.TrackName.UniprotTopology) &&
|
|
5752
|
+
this.loaderIcon())),
|
|
5753
|
+
value: exports.TrackName.UniprotTopology,
|
|
5754
|
+
},
|
|
5746
5755
|
_a;
|
|
5747
5756
|
},
|
|
5748
5757
|
enumerable: false,
|
|
@@ -5810,6 +5819,7 @@ var TrackSelector = /** @class */ (function (_super) {
|
|
|
5810
5819
|
exports.TrackName.dbPTM,
|
|
5811
5820
|
exports.TrackName.PDB,
|
|
5812
5821
|
exports.TrackName.Exon,
|
|
5822
|
+
exports.TrackName.UniprotTopology,
|
|
5813
5823
|
],
|
|
5814
5824
|
}
|
|
5815
5825
|
});
|
|
@@ -5840,6 +5850,7 @@ function initDefaultTrackVisibility() {
|
|
|
5840
5850
|
_a[exports.TrackName.UniprotPTM] = 'hidden',
|
|
5841
5851
|
_a[exports.TrackName.PDB] = 'hidden',
|
|
5842
5852
|
_a[exports.TrackName.Exon] = 'hidden',
|
|
5853
|
+
_a[exports.TrackName.UniprotTopology] = 'hidden',
|
|
5843
5854
|
_a;
|
|
5844
5855
|
}
|
|
5845
5856
|
|
|
@@ -6560,7 +6571,7 @@ var LollipopPlotNoTooltip = /** @class */ (function (_super) {
|
|
|
6560
6571
|
var _this = this;
|
|
6561
6572
|
var sequenceComponents = [];
|
|
6562
6573
|
var start = 0;
|
|
6563
|
-
var segments =
|
|
6574
|
+
var segments = ___default.map(this.props.domains, function (domain) {
|
|
6564
6575
|
var segment = {
|
|
6565
6576
|
start: start,
|
|
6566
6577
|
end: _this.codonToX(domain.startCodon),
|
|
@@ -7100,7 +7111,7 @@ var LollipopMutationPlotControls = /** @class */ (function (_super) {
|
|
|
7100
7111
|
Object.defineProperty(LollipopMutationPlotControls.prototype, "showBottomYAxisSlider", {
|
|
7101
7112
|
get: function () {
|
|
7102
7113
|
return (this.props.bottomCountRange &&
|
|
7103
|
-
|
|
7114
|
+
___default.compact(this.props.bottomCountRange).length > 0 &&
|
|
7104
7115
|
this.props.onBottomYAxisMaxSliderChange &&
|
|
7105
7116
|
this.props.onBottomYAxisMaxChange &&
|
|
7106
7117
|
this.props.bottomYMaxSlider &&
|
|
@@ -7474,7 +7485,7 @@ var TrackItem = /** @class */ (function (_super) {
|
|
|
7474
7485
|
return (React.createElement(TrackCircle, __assign({ isHovered: this.isHovered, radius: this.props.dim1, hoverRadius: this.props.hoverdim1 }, this.props)));
|
|
7475
7486
|
}
|
|
7476
7487
|
else {
|
|
7477
|
-
return (React.createElement(TrackRect, __assign({ isHovered: this.isHovered, width: this.props.dim1 }, this.props)));
|
|
7488
|
+
return (React.createElement(TrackRect, __assign({ isHovered: this.isHovered, width: this.props.dim1, height: this.props.dim2 }, this.props)));
|
|
7478
7489
|
}
|
|
7479
7490
|
}
|
|
7480
7491
|
});
|
|
@@ -7493,6 +7504,7 @@ var TrackItem = /** @class */ (function (_super) {
|
|
|
7493
7504
|
var styles$6 = {"trackTitle":"trackStyles-module_trackTitle__HOHY0"};
|
|
7494
7505
|
|
|
7495
7506
|
var DEFAULT_ID_CLASS_PREFIX = 'track-circle-';
|
|
7507
|
+
var DEFAULT_HEIGHT = 15; // height of rectangle element
|
|
7496
7508
|
var Track = /** @class */ (function (_super) {
|
|
7497
7509
|
__extends(Track, _super);
|
|
7498
7510
|
function Track(props) {
|
|
@@ -7681,7 +7693,7 @@ var Track = /** @class */ (function (_super) {
|
|
|
7681
7693
|
});
|
|
7682
7694
|
Object.defineProperty(Track.prototype, "svgHeight", {
|
|
7683
7695
|
get: function () {
|
|
7684
|
-
return 10;
|
|
7696
|
+
return 10; // height of baseline element
|
|
7685
7697
|
},
|
|
7686
7698
|
enumerable: false,
|
|
7687
7699
|
configurable: true
|
|
@@ -7700,8 +7712,8 @@ var Track = /** @class */ (function (_super) {
|
|
|
7700
7712
|
((spec.endCodon - spec.startCodon) /
|
|
7701
7713
|
_this.props.proteinLength) *
|
|
7702
7714
|
_this.props.width;
|
|
7703
|
-
dim2 =
|
|
7704
|
-
y =
|
|
7715
|
+
dim2 = spec.height || DEFAULT_HEIGHT;
|
|
7716
|
+
y = (_this.svgHeight - dim2) / 2; // y is the vertical start position of rectangle, half of baseline element height = half of element height + y
|
|
7705
7717
|
specFeats = __assign(__assign({}, spec), { endCodon: spec.endCodon, itemType: TrackItemType.RECTANGLE });
|
|
7706
7718
|
}
|
|
7707
7719
|
else {
|
|
@@ -7875,7 +7887,7 @@ function hotspotTooltip(mutations, hotspotIndex, hotspots) {
|
|
|
7875
7887
|
return cbioportalUtils.isHotspot(mutation, hotspotIndex, cbioportalUtils.defaultHotspotFilter);
|
|
7876
7888
|
}).length;
|
|
7877
7889
|
// generate custom info
|
|
7878
|
-
var residues =
|
|
7890
|
+
var residues = ___default.uniq(hotspots.map(function (hotspot) { return hotspot.residue; }));
|
|
7879
7891
|
var residuesText = React.createElement("b", null, "" + residues.join(', '));
|
|
7880
7892
|
var pluralSuffix = residues.length > 1 ? 's' : undefined;
|
|
7881
7893
|
var residueInfo = (React.createElement("span", null,
|
|
@@ -7900,8 +7912,8 @@ var HotspotTrack = /** @class */ (function (_super) {
|
|
|
7900
7912
|
var _this = this;
|
|
7901
7913
|
var filteredHotspotsByProteinPosStart = this.props.store
|
|
7902
7914
|
.hotspotsByPosition;
|
|
7903
|
-
if (!
|
|
7904
|
-
return
|
|
7915
|
+
if (!___default.isEmpty(filteredHotspotsByProteinPosStart)) {
|
|
7916
|
+
return ___default.keys(filteredHotspotsByProteinPosStart)
|
|
7905
7917
|
.filter(function (position) { return Number(position) >= 0; })
|
|
7906
7918
|
.map(function (position) { return ({
|
|
7907
7919
|
startCodon: Number(position),
|
|
@@ -8083,8 +8095,8 @@ function oncoKbTooltip(usingPublicOncoKbInstance, indicatorData) {
|
|
|
8083
8095
|
var sampleCount = indicatorData.length;
|
|
8084
8096
|
// generate info
|
|
8085
8097
|
var pluralSuffix = sampleCount > 1 ? 's' : undefined;
|
|
8086
|
-
var groupedByImplication =
|
|
8087
|
-
var oncogenicKeywords =
|
|
8098
|
+
var groupedByImplication = ___default.groupBy(indicatorData, 'oncogenic');
|
|
8099
|
+
var oncogenicKeywords = ___default.keys(groupedByImplication).map(function (keyword) { return (React.createElement("b", null, keyword)); });
|
|
8088
8100
|
var oncogenicInfo = [];
|
|
8089
8101
|
if (oncogenicKeywords.length > 1) {
|
|
8090
8102
|
// join all except the last one with ','
|
|
@@ -8104,14 +8116,14 @@ function oncoKbTooltip(usingPublicOncoKbInstance, indicatorData) {
|
|
|
8104
8116
|
// use oncogenic keywords array as is
|
|
8105
8117
|
oncogenicInfo = oncogenicKeywords;
|
|
8106
8118
|
}
|
|
8107
|
-
var groupedByProteinChange =
|
|
8108
|
-
var tableData =
|
|
8119
|
+
var groupedByProteinChange = ___default.groupBy(indicatorData, function (d) { return d.query.alteration; });
|
|
8120
|
+
var tableData = ___default.keys(groupedByProteinChange).map(function (proteinChange) { return ({
|
|
8109
8121
|
count: groupedByProteinChange[proteinChange].length,
|
|
8110
8122
|
proteinChange: proteinChange,
|
|
8111
|
-
clinicalImplication:
|
|
8123
|
+
clinicalImplication: ___default.uniq(groupedByProteinChange[proteinChange].map(function (indicator) {
|
|
8112
8124
|
return indicator.oncogenic ? indicator.oncogenic : 'Unknown';
|
|
8113
8125
|
})),
|
|
8114
|
-
biologicalEffect:
|
|
8126
|
+
biologicalEffect: ___default.uniq(groupedByProteinChange[proteinChange].map(function (indicator) {
|
|
8115
8127
|
return indicator.mutationEffect && indicator.mutationEffect.knownEffect
|
|
8116
8128
|
? indicator.mutationEffect.knownEffect
|
|
8117
8129
|
: 'Unknown';
|
|
@@ -8139,11 +8151,11 @@ function generateLevelData(indicatorData) {
|
|
|
8139
8151
|
levels[level].push(indicator.query.tumorType);
|
|
8140
8152
|
});
|
|
8141
8153
|
});
|
|
8142
|
-
return
|
|
8154
|
+
return ___default.keys(levels)
|
|
8143
8155
|
.sort(function (a, b) {
|
|
8144
8156
|
return cbioportalUtils.LEVELS.all.indexOf(a) > cbioportalUtils.LEVELS.all.indexOf(b) ? -1 : 1;
|
|
8145
8157
|
})
|
|
8146
|
-
.map(function (level) { return ({ level: level, tumorTypes:
|
|
8158
|
+
.map(function (level) { return ({ level: level, tumorTypes: ___default.uniq(levels[level]) }); });
|
|
8147
8159
|
}
|
|
8148
8160
|
var OncoKbTrackTooltip = function (props) {
|
|
8149
8161
|
return props.indicatorData
|
|
@@ -8168,8 +8180,8 @@ var OncoKbTrack = /** @class */ (function (_super) {
|
|
|
8168
8180
|
var _this = this;
|
|
8169
8181
|
var filteredOncoKbDataByProteinPosStart = this.props.store
|
|
8170
8182
|
.oncoKbDataByPosition;
|
|
8171
|
-
if (!
|
|
8172
|
-
return
|
|
8183
|
+
if (!___default.isEmpty(filteredOncoKbDataByProteinPosStart)) {
|
|
8184
|
+
return ___default.keys(filteredOncoKbDataByProteinPosStart)
|
|
8173
8185
|
.filter(function (position) { return Number(position) >= 0; })
|
|
8174
8186
|
.map(function (position) { return ({
|
|
8175
8187
|
startCodon: Number(position),
|
|
@@ -8445,14 +8457,14 @@ var PtmAnnotationTable = /** @class */ (function (_super) {
|
|
|
8445
8457
|
if (!this.props.pubMedCache) {
|
|
8446
8458
|
cellRenderFn = function () { return null; };
|
|
8447
8459
|
}
|
|
8448
|
-
else if (!
|
|
8460
|
+
else if (!___default.isEmpty(this.pmidData)) {
|
|
8449
8461
|
cellRenderFn = function (props) {
|
|
8450
|
-
return !
|
|
8462
|
+
return !___default.isEmpty(props.original.pubmedIds) ? (React.createElement(PtmReferenceList, { pmidData: _this.pmidData, pubmedIds: props.original.pubmedIds || [] })) : null;
|
|
8451
8463
|
};
|
|
8452
8464
|
}
|
|
8453
8465
|
else {
|
|
8454
8466
|
cellRenderFn = function (props) {
|
|
8455
|
-
return !
|
|
8467
|
+
return !___default.isEmpty(props.original.pubmedIds) ? (React.createElement("i", { className: "fa fa-spinner fa-pulse" })) : null;
|
|
8456
8468
|
};
|
|
8457
8469
|
}
|
|
8458
8470
|
return cellRenderFn;
|
|
@@ -8569,7 +8581,7 @@ var PtmTrack = /** @class */ (function (_super) {
|
|
|
8569
8581
|
var ptms = Number(position) >= 0
|
|
8570
8582
|
? filterPtmsBySource(ptmData, _this.props.dataSource)
|
|
8571
8583
|
: [];
|
|
8572
|
-
if (!
|
|
8584
|
+
if (!___default.isEmpty(ptms)) {
|
|
8573
8585
|
acc.push({
|
|
8574
8586
|
startCodon: Number(position),
|
|
8575
8587
|
color: cbioportalUtils.ptmColor(ptms),
|
|
@@ -8587,8 +8599,8 @@ var PtmTrack = /** @class */ (function (_super) {
|
|
|
8587
8599
|
get: function () {
|
|
8588
8600
|
var ptmDataByProteinPosStart = this.props.store
|
|
8589
8601
|
.ptmDataByProteinPosStart.result;
|
|
8590
|
-
if (ptmDataByProteinPosStart && !
|
|
8591
|
-
return
|
|
8602
|
+
if (ptmDataByProteinPosStart && !___default.isEmpty(ptmDataByProteinPosStart)) {
|
|
8603
|
+
return ___default.reduce(ptmDataByProteinPosStart, this.ptmDataToTrackItemSpecsReducer, []);
|
|
8592
8604
|
}
|
|
8593
8605
|
else {
|
|
8594
8606
|
return [];
|
|
@@ -8603,14 +8615,14 @@ var PtmTrack = /** @class */ (function (_super) {
|
|
|
8603
8615
|
var ptmDataByTypeAndProteinPosStart = this.props.store
|
|
8604
8616
|
.ptmDataByTypeAndProteinPosStart.result;
|
|
8605
8617
|
if (ptmDataByTypeAndProteinPosStart &&
|
|
8606
|
-
!
|
|
8607
|
-
return
|
|
8618
|
+
!___default.isEmpty(ptmDataByTypeAndProteinPosStart)) {
|
|
8619
|
+
return ___default.keys(ptmDataByTypeAndProteinPosStart)
|
|
8608
8620
|
.sort(cbioportalUtils.compareByPtmTypePriority)
|
|
8609
8621
|
.map(function (type) { return ({
|
|
8610
8622
|
title: type,
|
|
8611
|
-
specs:
|
|
8623
|
+
specs: ___default.reduce(ptmDataByTypeAndProteinPosStart[type], _this.ptmDataToTrackItemSpecsReducer, []),
|
|
8612
8624
|
}); })
|
|
8613
|
-
.filter(function (s) { return !
|
|
8625
|
+
.filter(function (s) { return !___default.isEmpty(s.specs); });
|
|
8614
8626
|
}
|
|
8615
8627
|
else {
|
|
8616
8628
|
return [];
|
|
@@ -8770,6 +8782,255 @@ var PtmTrack = /** @class */ (function (_super) {
|
|
|
8770
8782
|
return PtmTrack;
|
|
8771
8783
|
}(React.Component));
|
|
8772
8784
|
|
|
8785
|
+
function topologyRectangleBlockSpec(color, title, uniprotData) {
|
|
8786
|
+
return {
|
|
8787
|
+
color: color,
|
|
8788
|
+
startCodon: uniprotData.startPosition,
|
|
8789
|
+
endCodon: uniprotData.endPosition,
|
|
8790
|
+
tooltip: (React.createElement("span", null,
|
|
8791
|
+
React.createElement("h5", null, title),
|
|
8792
|
+
"Start: ",
|
|
8793
|
+
uniprotData.startPosition,
|
|
8794
|
+
React.createElement("br", null),
|
|
8795
|
+
"End: ",
|
|
8796
|
+
uniprotData.endPosition,
|
|
8797
|
+
React.createElement("br", null),
|
|
8798
|
+
"Length: ",
|
|
8799
|
+
uniprotData.endPosition - uniprotData.startPosition,
|
|
8800
|
+
React.createElement("br", null),
|
|
8801
|
+
"Description: ",
|
|
8802
|
+
uniprotData.description)),
|
|
8803
|
+
};
|
|
8804
|
+
}
|
|
8805
|
+
var UniprotTopologyTrackDescriptionTooltip = function (props) {
|
|
8806
|
+
var dataSourceDiv = props.uniprotId ? (React.createElement("div", null,
|
|
8807
|
+
"Data Source:",
|
|
8808
|
+
' ',
|
|
8809
|
+
React.createElement("a", { href: "https://www.uniprot.org/uniprot/" + props.uniprotId, target: "_blank" }, "UniProt"))) : (React.createElement("div", null,
|
|
8810
|
+
"Data Source:",
|
|
8811
|
+
' ',
|
|
8812
|
+
React.createElement("a", { href: 'https://www.uniprot.org/', target: "_blank" }, "UniProt")));
|
|
8813
|
+
return (React.createElement("div", { style: { maxWidth: 400 } },
|
|
8814
|
+
React.createElement("p", null, "Information of the subcellular location of the mature protein."),
|
|
8815
|
+
props.displayList.length > 0 && (React.createElement("p", null,
|
|
8816
|
+
"Domains and corresponding color codes are as follows:",
|
|
8817
|
+
React.createElement("ul", null, _.map(props.displayList, function (type) { return (React.createElement("li", { style: {
|
|
8818
|
+
color: cbioportalUtils.UniprotTopologyTrackToColor[type],
|
|
8819
|
+
} },
|
|
8820
|
+
React.createElement("strong", null, cbioportalUtils.UniprotTopologyTypeToTitle[type]))); })))),
|
|
8821
|
+
dataSourceDiv));
|
|
8822
|
+
};
|
|
8823
|
+
var UniprotTopologyTrack = /** @class */ (function (_super) {
|
|
8824
|
+
__extends(UniprotTopologyTrack, _super);
|
|
8825
|
+
function UniprotTopologyTrack(props) {
|
|
8826
|
+
var _this = _super.call(this, props) || this;
|
|
8827
|
+
Object.defineProperty(_this, "expanded", {
|
|
8828
|
+
enumerable: true,
|
|
8829
|
+
configurable: true,
|
|
8830
|
+
writable: true,
|
|
8831
|
+
value: !_this.props.collapsed
|
|
8832
|
+
});
|
|
8833
|
+
Object.defineProperty(_this, "uniprotDataToTrackItemSpecsReducer", {
|
|
8834
|
+
enumerable: true,
|
|
8835
|
+
configurable: true,
|
|
8836
|
+
writable: true,
|
|
8837
|
+
value: function (acc, uniprotData) {
|
|
8838
|
+
var trackColor = cbioportalUtils.UniprotTopologyTrackToColor[uniprotData.type];
|
|
8839
|
+
var trackTitle = cbioportalUtils.UniprotTopologyTypeToTitle[uniprotData.type];
|
|
8840
|
+
if (trackTitle && trackColor) {
|
|
8841
|
+
acc.push(topologyRectangleBlockSpec(trackColor, trackTitle, uniprotData));
|
|
8842
|
+
}
|
|
8843
|
+
return acc;
|
|
8844
|
+
}
|
|
8845
|
+
});
|
|
8846
|
+
mobx.makeObservable(_this);
|
|
8847
|
+
return _this;
|
|
8848
|
+
}
|
|
8849
|
+
UniprotTopologyTrack_1 = UniprotTopologyTrack;
|
|
8850
|
+
Object.defineProperty(UniprotTopologyTrack.prototype, "subTrackMargin", {
|
|
8851
|
+
get: function () {
|
|
8852
|
+
return (this.props.subTrackMargin ||
|
|
8853
|
+
UniprotTopologyTrack_1.defaultProps.subTrackMargin);
|
|
8854
|
+
},
|
|
8855
|
+
enumerable: false,
|
|
8856
|
+
configurable: true
|
|
8857
|
+
});
|
|
8858
|
+
Object.defineProperty(UniprotTopologyTrack.prototype, "subTrackTitleWidth", {
|
|
8859
|
+
get: function () {
|
|
8860
|
+
return this.props.xOffset
|
|
8861
|
+
? this.props.xOffset - this.subTrackMargin
|
|
8862
|
+
: 0;
|
|
8863
|
+
},
|
|
8864
|
+
enumerable: false,
|
|
8865
|
+
configurable: true
|
|
8866
|
+
});
|
|
8867
|
+
Object.defineProperty(UniprotTopologyTrack.prototype, "uniprotTopologySpecs", {
|
|
8868
|
+
get: function () {
|
|
8869
|
+
var uniprotData = this.props.store.uniprotTopologyData.result;
|
|
8870
|
+
if (uniprotData && !_.isEmpty(uniprotData)) {
|
|
8871
|
+
return _.reduce(uniprotData, this.uniprotDataToTrackItemSpecsReducer, []);
|
|
8872
|
+
}
|
|
8873
|
+
else {
|
|
8874
|
+
return [];
|
|
8875
|
+
}
|
|
8876
|
+
},
|
|
8877
|
+
enumerable: false,
|
|
8878
|
+
configurable: true
|
|
8879
|
+
});
|
|
8880
|
+
Object.defineProperty(UniprotTopologyTrack.prototype, "expander", {
|
|
8881
|
+
get: function () {
|
|
8882
|
+
var className = this.hasSubTracks
|
|
8883
|
+
? this.mainTrackHidden
|
|
8884
|
+
? 'fa fa-caret-down'
|
|
8885
|
+
: 'fa fa-caret-right'
|
|
8886
|
+
: null;
|
|
8887
|
+
if (className) {
|
|
8888
|
+
return (React.createElement("i", { className: className, style: { width: 10, marginLeft: 2 } }));
|
|
8889
|
+
}
|
|
8890
|
+
return null;
|
|
8891
|
+
},
|
|
8892
|
+
enumerable: false,
|
|
8893
|
+
configurable: true
|
|
8894
|
+
});
|
|
8895
|
+
Object.defineProperty(UniprotTopologyTrack.prototype, "mainTrackTitle", {
|
|
8896
|
+
get: function () {
|
|
8897
|
+
return (React.createElement("span", { style: { cursor: 'pointer' } },
|
|
8898
|
+
React.createElement("span", { onClick: this.handleToggleExpand }, this.expander),
|
|
8899
|
+
React.createElement(cbioportalFrontendCommons.DefaultTooltip, { placement: "right", overlay: React.createElement(UniprotTopologyTrackDescriptionTooltip, { displayList: this.uniprotTopologyTypes, uniprotId: this.props.store.uniprotId.result }), destroyTooltipOnHide: true },
|
|
8900
|
+
React.createElement("span", { style: { marginLeft: 4 }, onClick: this.handleToggleExpand },
|
|
8901
|
+
"Topology ",
|
|
8902
|
+
React.createElement("i", { className: "fa fa-info-circle" })))));
|
|
8903
|
+
},
|
|
8904
|
+
enumerable: false,
|
|
8905
|
+
configurable: true
|
|
8906
|
+
});
|
|
8907
|
+
Object.defineProperty(UniprotTopologyTrack.prototype, "uniprotTopologyTypes", {
|
|
8908
|
+
get: function () {
|
|
8909
|
+
var uniprotData = this.props.store.uniprotTopologyData.result;
|
|
8910
|
+
var uniprotDataByType = _.uniq(_.map(uniprotData, function (data) { return data.type; }));
|
|
8911
|
+
return uniprotDataByType || [];
|
|
8912
|
+
},
|
|
8913
|
+
enumerable: false,
|
|
8914
|
+
configurable: true
|
|
8915
|
+
});
|
|
8916
|
+
Object.defineProperty(UniprotTopologyTrack.prototype, "uniprotTopologySubSpecs", {
|
|
8917
|
+
get: function () {
|
|
8918
|
+
var _this = this;
|
|
8919
|
+
var uniprotData = this.props.store.uniprotTopologyData.result;
|
|
8920
|
+
var uniprotDataByType = _.groupBy(uniprotData, function (data) { return data.type; });
|
|
8921
|
+
return _.keys(uniprotDataByType)
|
|
8922
|
+
.map(function (type) { return ({
|
|
8923
|
+
title: cbioportalUtils.UniprotTopologyTypeToTitle[type],
|
|
8924
|
+
specs: _.reduce(uniprotDataByType[type], _this.uniprotDataToTrackItemSpecsReducer, []),
|
|
8925
|
+
}); })
|
|
8926
|
+
.filter(function (s) { return !_.isEmpty(s.specs); });
|
|
8927
|
+
},
|
|
8928
|
+
enumerable: false,
|
|
8929
|
+
configurable: true
|
|
8930
|
+
});
|
|
8931
|
+
Object.defineProperty(UniprotTopologyTrack.prototype, "mainTrackHidden", {
|
|
8932
|
+
get: function () {
|
|
8933
|
+
return this.expanded && this.hasSubTracks;
|
|
8934
|
+
},
|
|
8935
|
+
enumerable: false,
|
|
8936
|
+
configurable: true
|
|
8937
|
+
});
|
|
8938
|
+
Object.defineProperty(UniprotTopologyTrack.prototype, "hasSubTracks", {
|
|
8939
|
+
get: function () {
|
|
8940
|
+
return this.uniprotTopologySubSpecs.length > 0;
|
|
8941
|
+
},
|
|
8942
|
+
enumerable: false,
|
|
8943
|
+
configurable: true
|
|
8944
|
+
});
|
|
8945
|
+
Object.defineProperty(UniprotTopologyTrack.prototype, "subTracks", {
|
|
8946
|
+
get: function () {
|
|
8947
|
+
var _this = this;
|
|
8948
|
+
return this.hasSubTracks
|
|
8949
|
+
? this.uniprotTopologySubSpecs.map(function (item, index) { return (React.createElement(Track, { key: item.title, dataStore: _this.props.dataStore, xOffset: _this.props.xOffset, trackTitle: React.createElement("span", { style: {
|
|
8950
|
+
marginLeft: _this.subTrackMargin,
|
|
8951
|
+
width: _this.subTrackTitleWidth,
|
|
8952
|
+
display: 'flex',
|
|
8953
|
+
} },
|
|
8954
|
+
React.createElement(cbioportalFrontendCommons.EllipsisTextTooltip, { text: item.title, style: {
|
|
8955
|
+
overflow: 'hidden',
|
|
8956
|
+
whiteSpace: 'nowrap',
|
|
8957
|
+
textOverflow: 'ellipsis',
|
|
8958
|
+
} })), width: _this.props.width, proteinLength: _this.props.proteinLength, trackItems: item.specs, idClassPrefix: "uniprot-topology-" + index + "-", isSubTrack: true })); })
|
|
8959
|
+
: null;
|
|
8960
|
+
},
|
|
8961
|
+
enumerable: false,
|
|
8962
|
+
configurable: true
|
|
8963
|
+
});
|
|
8964
|
+
Object.defineProperty(UniprotTopologyTrack.prototype, "render", {
|
|
8965
|
+
enumerable: false,
|
|
8966
|
+
configurable: true,
|
|
8967
|
+
writable: true,
|
|
8968
|
+
value: function () {
|
|
8969
|
+
return (React.createElement("span", null,
|
|
8970
|
+
React.createElement(Track, { dataStore: this.props.dataStore, width: this.props.width, xOffset: this.props.xOffset, proteinLength: this.props.proteinLength, trackTitle: this.mainTrackTitle, trackItems: this.mainTrackHidden ? [] : this.uniprotTopologySpecs, hideBaseline: this.mainTrackHidden, idClassPrefix: 'uniprot-topology-track-' }),
|
|
8971
|
+
React.createElement(reactCollapse.Collapse, { isOpened: this.mainTrackHidden },
|
|
8972
|
+
React.createElement("span", null, this.subTracks))));
|
|
8973
|
+
}
|
|
8974
|
+
});
|
|
8975
|
+
Object.defineProperty(UniprotTopologyTrack.prototype, "handleToggleExpand", {
|
|
8976
|
+
enumerable: false,
|
|
8977
|
+
configurable: true,
|
|
8978
|
+
writable: true,
|
|
8979
|
+
value: function () {
|
|
8980
|
+
this.expanded = !this.expanded;
|
|
8981
|
+
}
|
|
8982
|
+
});
|
|
8983
|
+
var UniprotTopologyTrack_1;
|
|
8984
|
+
Object.defineProperty(UniprotTopologyTrack, "defaultProps", {
|
|
8985
|
+
enumerable: true,
|
|
8986
|
+
configurable: true,
|
|
8987
|
+
writable: true,
|
|
8988
|
+
value: {
|
|
8989
|
+
subTrackMargin: 25,
|
|
8990
|
+
}
|
|
8991
|
+
});
|
|
8992
|
+
__decorate([
|
|
8993
|
+
mobx.observable
|
|
8994
|
+
], UniprotTopologyTrack.prototype, "expanded", void 0);
|
|
8995
|
+
__decorate([
|
|
8996
|
+
mobx.computed
|
|
8997
|
+
], UniprotTopologyTrack.prototype, "subTrackMargin", null);
|
|
8998
|
+
__decorate([
|
|
8999
|
+
mobx.computed
|
|
9000
|
+
], UniprotTopologyTrack.prototype, "subTrackTitleWidth", null);
|
|
9001
|
+
__decorate([
|
|
9002
|
+
mobx.computed
|
|
9003
|
+
], UniprotTopologyTrack.prototype, "uniprotTopologySpecs", null);
|
|
9004
|
+
__decorate([
|
|
9005
|
+
mobx.computed
|
|
9006
|
+
], UniprotTopologyTrack.prototype, "expander", null);
|
|
9007
|
+
__decorate([
|
|
9008
|
+
mobx.computed
|
|
9009
|
+
], UniprotTopologyTrack.prototype, "mainTrackTitle", null);
|
|
9010
|
+
__decorate([
|
|
9011
|
+
mobx.computed
|
|
9012
|
+
], UniprotTopologyTrack.prototype, "uniprotTopologyTypes", null);
|
|
9013
|
+
__decorate([
|
|
9014
|
+
mobx.computed
|
|
9015
|
+
], UniprotTopologyTrack.prototype, "uniprotTopologySubSpecs", null);
|
|
9016
|
+
__decorate([
|
|
9017
|
+
mobx.computed
|
|
9018
|
+
], UniprotTopologyTrack.prototype, "mainTrackHidden", null);
|
|
9019
|
+
__decorate([
|
|
9020
|
+
mobx.computed
|
|
9021
|
+
], UniprotTopologyTrack.prototype, "hasSubTracks", null);
|
|
9022
|
+
__decorate([
|
|
9023
|
+
mobx.computed
|
|
9024
|
+
], UniprotTopologyTrack.prototype, "subTracks", null);
|
|
9025
|
+
__decorate([
|
|
9026
|
+
mobx.action.bound
|
|
9027
|
+
], UniprotTopologyTrack.prototype, "handleToggleExpand", null);
|
|
9028
|
+
UniprotTopologyTrack = UniprotTopologyTrack_1 = __decorate([
|
|
9029
|
+
mobxReact.observer
|
|
9030
|
+
], UniprotTopologyTrack);
|
|
9031
|
+
return UniprotTopologyTrack;
|
|
9032
|
+
}(React.Component));
|
|
9033
|
+
|
|
8773
9034
|
var TrackPanel = /** @class */ (function (_super) {
|
|
8774
9035
|
__extends(TrackPanel, _super);
|
|
8775
9036
|
function TrackPanel(props) {
|
|
@@ -8798,6 +9059,9 @@ var TrackPanel = /** @class */ (function (_super) {
|
|
|
8798
9059
|
_a[exports.TrackName.UniprotPTM] = this.getPtmTrack(exports.TrackName.UniprotPTM, cbioportalUtils.PtmSource.Uniprot),
|
|
8799
9060
|
_a[exports.TrackName.Exon] = !this.props.trackVisibility ||
|
|
8800
9061
|
this.props.trackVisibility[exports.TrackName.Exon] === 'visible' ? (React.createElement(ExonTrack, { store: this.props.store, dataStore: this.props.store.dataStore, width: this.props.geneWidth, xOffset: this.props.geneXOffset, proteinLength: this.proteinLength })) : null,
|
|
9062
|
+
_a[exports.TrackName.UniprotTopology] = !this.props.trackVisibility ||
|
|
9063
|
+
this.props.trackVisibility[exports.TrackName.UniprotTopology] ===
|
|
9064
|
+
'visible' ? (React.createElement(UniprotTopologyTrack, { store: this.props.store, dataStore: this.props.store.dataStore, width: this.props.geneWidth, xOffset: this.props.geneXOffset, proteinLength: this.proteinLength, collapsed: this.props.collapseUniprotTopologyTrack })) : null,
|
|
8801
9065
|
_a;
|
|
8802
9066
|
},
|
|
8803
9067
|
enumerable: false,
|
|
@@ -8857,6 +9121,7 @@ var TrackPanel = /** @class */ (function (_super) {
|
|
|
8857
9121
|
exports.TrackName.OncoKB,
|
|
8858
9122
|
exports.TrackName.dbPTM,
|
|
8859
9123
|
exports.TrackName.Exon,
|
|
9124
|
+
exports.TrackName.UniprotTopology,
|
|
8860
9125
|
],
|
|
8861
9126
|
}
|
|
8862
9127
|
});
|
|
@@ -9098,7 +9363,7 @@ var LollipopMutationPlot = /** @class */ (function (_super) {
|
|
|
9098
9363
|
: -1;
|
|
9099
9364
|
});
|
|
9100
9365
|
var specs = this.createInitialSpecs(positionMutations, countsByPosition, group, placement);
|
|
9101
|
-
var noLabelsAreShown = !
|
|
9366
|
+
var noLabelsAreShown = !___default.isEmpty(specs) && specs.every(function (spec) { return !spec.label.show; });
|
|
9102
9367
|
if (noLabelsAreShown) {
|
|
9103
9368
|
this.labelOneLollipopByDefault(this.getRemainingDomains(positionMutations), specs);
|
|
9104
9369
|
}
|
|
@@ -9309,7 +9574,7 @@ var LollipopMutationPlot = /** @class */ (function (_super) {
|
|
|
9309
9574
|
if (!this.props.store.pfamDomainData.isPending &&
|
|
9310
9575
|
this.props.store.pfamDomainData.result &&
|
|
9311
9576
|
this.props.store.pfamDomainData.result.length > 0) {
|
|
9312
|
-
return
|
|
9577
|
+
return ___default.keyBy(this.props.store.pfamDomainData.result, 'pfamAccession');
|
|
9313
9578
|
}
|
|
9314
9579
|
else {
|
|
9315
9580
|
return {};
|
|
@@ -9509,7 +9774,7 @@ var LollipopMutationPlot = /** @class */ (function (_super) {
|
|
|
9509
9774
|
React.createElement(LollipopPlot, { sequence: this.sequence, lollipops: this.lollipops, domains: this.domains, dataStore: this.props.store.dataStore, vizWidth: this.props.geneWidth, vizHeight: this.props.vizHeight, hugoGeneSymbol: this.hugoGeneSymbol, xMax: this.proteinLength, yMax: this.yMaxInput, yMaxFractionDigits: this.yMaxSliderStep < 1
|
|
9510
9775
|
? this.props.yMaxFractionDigits
|
|
9511
9776
|
: undefined, yMaxLabelPostfix: this.props.yMaxLabelPostfix, yAxisLabelPadding: this.props.yAxisLabelPadding, showYAxis: this.props.showYAxis, bottomYMax: this.bottomYMaxInput, onXAxisOffset: this.onXAxisOffset, topYAxisSymbol: this.props.topYAxisSymbol, bottomYAxisSymbol: this.props.bottomYAxisSymbol, groups: this.groups }),
|
|
9512
|
-
React.createElement(TrackPanel, { store: this.props.store, geneWidth: this.props.geneWidth, tracks: this.props.tracks, trackVisibility: this.trackVisibility, pubMedCache: this.props.pubMedCache, proteinLength: this.proteinLength, geneXOffset: this.geneXOffset, collapsePtmTrack: this.props.collapsePtmTrack })));
|
|
9777
|
+
React.createElement(TrackPanel, { store: this.props.store, geneWidth: this.props.geneWidth, tracks: this.props.tracks, trackVisibility: this.trackVisibility, pubMedCache: this.props.pubMedCache, proteinLength: this.proteinLength, geneXOffset: this.geneXOffset, collapsePtmTrack: this.props.collapsePtmTrack, collapseUniprotTopologyTrack: this.props.collapseUniprotTopologyTrack })));
|
|
9513
9778
|
}
|
|
9514
9779
|
else if (this.props.store.canonicalTranscript.isComplete &&
|
|
9515
9780
|
this.props.store.canonicalTranscript.result === undefined) {
|
|
@@ -9646,7 +9911,7 @@ var DefaultStringQueryCache = /** @class */ (function () {
|
|
|
9646
9911
|
});
|
|
9647
9912
|
Object.defineProperty(DefaultStringQueryCache.prototype, "cache", {
|
|
9648
9913
|
get: function () {
|
|
9649
|
-
return
|
|
9914
|
+
return ___default.fromPairs(this._cache.toJSON());
|
|
9650
9915
|
},
|
|
9651
9916
|
enumerable: false,
|
|
9652
9917
|
configurable: true
|
|
@@ -9793,7 +10058,7 @@ var DefaultMutationMapperDataStore = /** @class */ (function () {
|
|
|
9793
10058
|
}
|
|
9794
10059
|
Object.defineProperty(DefaultMutationMapperDataStore.prototype, "groupFiltersKeyedByGroup", {
|
|
9795
10060
|
get: function () {
|
|
9796
|
-
return
|
|
10061
|
+
return ___default.keyBy(this.groupFilters, 'group');
|
|
9797
10062
|
},
|
|
9798
10063
|
enumerable: false,
|
|
9799
10064
|
configurable: true
|
|
@@ -9810,7 +10075,7 @@ var DefaultMutationMapperDataStore = /** @class */ (function () {
|
|
|
9810
10075
|
var _this = this;
|
|
9811
10076
|
return this.dataFilters.length > 0
|
|
9812
10077
|
? // TODO simplify array flatten if possible
|
|
9813
|
-
this.data.filter(function (m) { return _this.dataMainFilter(
|
|
10078
|
+
this.data.filter(function (m) { return _this.dataMainFilter(___default.flatten([m])[0]); })
|
|
9814
10079
|
: this.data;
|
|
9815
10080
|
},
|
|
9816
10081
|
enumerable: false,
|
|
@@ -9836,7 +10101,7 @@ var DefaultMutationMapperDataStore = /** @class */ (function () {
|
|
|
9836
10101
|
return this.selectionFilters.length > 0
|
|
9837
10102
|
? // TODO simplify array flatten if possible
|
|
9838
10103
|
this.sortedFilteredData.filter(function (m) {
|
|
9839
|
-
return _this.dataSelectFilter(
|
|
10104
|
+
return _this.dataSelectFilter(___default.flatten([m])[0]);
|
|
9840
10105
|
})
|
|
9841
10106
|
: [];
|
|
9842
10107
|
},
|
|
@@ -10180,7 +10445,7 @@ var DefaultMutationMapperDataFetcher = /** @class */ (function () {
|
|
|
10180
10445
|
return __generator(this, function (_a) {
|
|
10181
10446
|
return [2 /*return*/, this.fetchCanonicalTranscript(hugoSymbol, isoformOverrideSource, client).catch(function () {
|
|
10182
10447
|
// get transcript with max protein length in given list of all transcripts
|
|
10183
|
-
var transcript =
|
|
10448
|
+
var transcript = ___default.maxBy(allTranscripts, function (t) { return t.proteinLength; });
|
|
10184
10449
|
return transcript ? transcript : undefined;
|
|
10185
10450
|
})];
|
|
10186
10451
|
});
|
|
@@ -10251,7 +10516,7 @@ var DefaultMutationMapperDataFetcher = /** @class */ (function () {
|
|
|
10251
10516
|
enumerable: false,
|
|
10252
10517
|
configurable: true,
|
|
10253
10518
|
writable: true,
|
|
10254
|
-
value: function (swissProtId, client) {
|
|
10519
|
+
value: function (swissProtId, category, client) {
|
|
10255
10520
|
if (client === void 0) { client = this.genomeNexusClient; }
|
|
10256
10521
|
return __awaiter(this, void 0, void 0, function () {
|
|
10257
10522
|
var uniprotData, featureList;
|
|
@@ -10259,7 +10524,7 @@ var DefaultMutationMapperDataFetcher = /** @class */ (function () {
|
|
|
10259
10524
|
switch (_a.label) {
|
|
10260
10525
|
case 0:
|
|
10261
10526
|
if (!swissProtId) return [3 /*break*/, 2];
|
|
10262
|
-
return [4 /*yield*/, request.get(getUrl("https://www.ebi.ac.uk/proteins/api/features/<%= uniprotAccession %>?categories=
|
|
10527
|
+
return [4 /*yield*/, request.get(getUrl("https://www.ebi.ac.uk/proteins/api/features/<%= uniprotAccession %>?categories=" + category.join(','), { uniprotAccession: swissProtId }))];
|
|
10263
10528
|
case 1:
|
|
10264
10529
|
uniprotData = _a.sent();
|
|
10265
10530
|
featureList = JSON.parse(uniprotData.text);
|
|
@@ -10335,7 +10600,7 @@ var DefaultMutationMapperDataFetcher = /** @class */ (function () {
|
|
|
10335
10600
|
else if (mutations.length === 0) {
|
|
10336
10601
|
return [2 /*return*/, ONCOKB_DEFAULT_DATA];
|
|
10337
10602
|
}
|
|
10338
|
-
mutationsToQuery =
|
|
10603
|
+
mutationsToQuery = ___default.filter(mutations, function (m) {
|
|
10339
10604
|
return (m.mutationType &&
|
|
10340
10605
|
m.mutationType.toLowerCase() ===
|
|
10341
10606
|
cbioportalFrontendCommons.CanonicalMutationType.FUSION) ||
|
|
@@ -10357,10 +10622,10 @@ var DefaultMutationMapperDataFetcher = /** @class */ (function () {
|
|
|
10357
10622
|
return __generator(this, function (_c) {
|
|
10358
10623
|
switch (_c.label) {
|
|
10359
10624
|
case 0:
|
|
10360
|
-
mutationQueryVariants =
|
|
10625
|
+
mutationQueryVariants = ___default.uniqBy(___default.map(queryVariants.filter(function (mutation) { return mutation.mutationType !== 'Fusion'; }), function (mutation) {
|
|
10361
10626
|
return cbioportalUtils.generateProteinChangeQuery(getEntrezGeneId(mutation), getTumorType(mutation), mutation.proteinChange, mutation.mutationType, mutation.proteinPosStart, mutation.proteinPosEnd, evidenceTypes);
|
|
10362
10627
|
}), 'id');
|
|
10363
|
-
structuralQueryVariants =
|
|
10628
|
+
structuralQueryVariants = ___default.uniqBy(___default.map(queryVariants.filter(function (mutation) {
|
|
10364
10629
|
var _a;
|
|
10365
10630
|
return ((_a = mutation.mutationType) === null || _a === void 0 ? void 0 : _a.toUpperCase()) ===
|
|
10366
10631
|
cbioportalUtils.StructuralVariantType.FUSION;
|
|
@@ -10391,7 +10656,7 @@ var DefaultMutationMapperDataFetcher = /** @class */ (function () {
|
|
|
10391
10656
|
structuralVariantQueryResult = _b;
|
|
10392
10657
|
return [2 /*return*/, {
|
|
10393
10658
|
// generateIdToIndicatorMap(oncokbSearch)
|
|
10394
|
-
indicatorMap:
|
|
10659
|
+
indicatorMap: ___default.keyBy(mutationQueryResult.concat(structuralVariantQueryResult), function (indicator) { return indicator.query.id; }),
|
|
10395
10660
|
}];
|
|
10396
10661
|
}
|
|
10397
10662
|
});
|
|
@@ -10676,7 +10941,7 @@ var DefaultMutationMapperStore = /** @class */ (function () {
|
|
|
10676
10941
|
return [4 /*yield*/, this.dataFetcher.fetchSwissProtAccession(this.gene.entrezGeneId)];
|
|
10677
10942
|
case 1:
|
|
10678
10943
|
accession = _a.sent();
|
|
10679
|
-
if (
|
|
10944
|
+
if (___default.isArray(accession)) {
|
|
10680
10945
|
return [2 /*return*/, accession[0]];
|
|
10681
10946
|
}
|
|
10682
10947
|
else {
|
|
@@ -10733,7 +10998,7 @@ var DefaultMutationMapperStore = /** @class */ (function () {
|
|
|
10733
10998
|
this.transcriptsWithProteinLength.result &&
|
|
10734
10999
|
this.transcriptsWithProteinLength.result.length > 0) {
|
|
10735
11000
|
// add domain ranges for all transcripts to this call
|
|
10736
|
-
domainRanges = [].concat.apply([domainRanges],
|
|
11001
|
+
domainRanges = [].concat.apply([domainRanges], ___default.compact(this.transcriptsWithProteinLength.result.map(function (transcriptId) {
|
|
10737
11002
|
return _this.transcriptsByTranscriptId[transcriptId].pfamDomains;
|
|
10738
11003
|
})));
|
|
10739
11004
|
}
|
|
@@ -10778,7 +11043,7 @@ var DefaultMutationMapperStore = /** @class */ (function () {
|
|
|
10778
11043
|
]; },
|
|
10779
11044
|
invoke: function () { return __awaiter(_this, void 0, void 0, function () {
|
|
10780
11045
|
return __generator(this, function (_a) {
|
|
10781
|
-
return [2 /*return*/,
|
|
11046
|
+
return [2 /*return*/, ___default.compact(___default.unionBy(this.transcriptsByHugoSymbol.result, [this.canonicalTranscript.result], function (t) { return t && t.transcriptId; }))];
|
|
10782
11047
|
});
|
|
10783
11048
|
}); },
|
|
10784
11049
|
onError: function () {
|
|
@@ -10818,7 +11083,7 @@ var DefaultMutationMapperStore = /** @class */ (function () {
|
|
|
10818
11083
|
this.canonicalTranscript.result) {
|
|
10819
11084
|
// ignore transcripts without protein length
|
|
10820
11085
|
// TODO: better solution is to hide lollipop plot for those transcripts
|
|
10821
|
-
return [2 /*return*/,
|
|
11086
|
+
return [2 /*return*/, ___default.compact(this.allTranscripts.result.map(function (et) {
|
|
10822
11087
|
return et.proteinLength && et.transcriptId;
|
|
10823
11088
|
}))];
|
|
10824
11089
|
}
|
|
@@ -10851,13 +11116,13 @@ var DefaultMutationMapperStore = /** @class */ (function () {
|
|
|
10851
11116
|
this.allTranscripts.result &&
|
|
10852
11117
|
this.transcriptsWithProteinLength.result &&
|
|
10853
11118
|
this.transcriptsWithProteinLength.result.length > 0) {
|
|
10854
|
-
transcripts =
|
|
11119
|
+
transcripts = ___default.uniq([].concat.apply([], cbioportalUtils.uniqueGenomicLocations(this.getMutations()).map(function (gl) {
|
|
10855
11120
|
var variantAnnotation = _this
|
|
10856
11121
|
.indexedVariantAnnotations.result
|
|
10857
11122
|
? _this.indexedVariantAnnotations.result[cbioportalUtils.genomicLocationString(gl)]
|
|
10858
11123
|
: undefined;
|
|
10859
11124
|
if (variantAnnotation &&
|
|
10860
|
-
!
|
|
11125
|
+
!___default.isEmpty(variantAnnotation.transcript_consequences)) {
|
|
10861
11126
|
return variantAnnotation.transcript_consequences
|
|
10862
11127
|
.map(function (tc) { return tc.transcript_id; })
|
|
10863
11128
|
.filter(function (transcriptId) {
|
|
@@ -10936,7 +11201,9 @@ var DefaultMutationMapperStore = /** @class */ (function () {
|
|
|
10936
11201
|
// return this.dataFetcher.fetchPtmData(
|
|
10937
11202
|
// this.activeTranscript.result
|
|
10938
11203
|
// );
|
|
10939
|
-
return [2 /*return*/, this.dataFetcher.fetchUniprotFeatures(uniprotId
|
|
11204
|
+
return [2 /*return*/, this.dataFetcher.fetchUniprotFeatures(uniprotId, [
|
|
11205
|
+
cbioportalUtils.UniprotCategory.PTM,
|
|
11206
|
+
])];
|
|
10940
11207
|
}
|
|
10941
11208
|
else {
|
|
10942
11209
|
return [2 /*return*/, []];
|
|
@@ -10948,6 +11215,46 @@ var DefaultMutationMapperStore = /** @class */ (function () {
|
|
|
10948
11215
|
},
|
|
10949
11216
|
}, [])
|
|
10950
11217
|
});
|
|
11218
|
+
Object.defineProperty(this, "uniprotTopologyData", {
|
|
11219
|
+
enumerable: true,
|
|
11220
|
+
configurable: true,
|
|
11221
|
+
writable: true,
|
|
11222
|
+
value: cbioportalFrontendCommons.remoteData({
|
|
11223
|
+
await: function () { return [
|
|
11224
|
+
_this.mutationData,
|
|
11225
|
+
_this.activeTranscript,
|
|
11226
|
+
_this.allTranscripts,
|
|
11227
|
+
]; },
|
|
11228
|
+
invoke: function () { return __awaiter(_this, void 0, void 0, function () {
|
|
11229
|
+
var uniprotId, data, transcript, uniprotFeatures;
|
|
11230
|
+
return __generator(this, function (_a) {
|
|
11231
|
+
switch (_a.label) {
|
|
11232
|
+
case 0:
|
|
11233
|
+
data = [];
|
|
11234
|
+
if (this.activeTranscript.result) {
|
|
11235
|
+
transcript = this.transcriptsByTranscriptId[this.activeTranscript.result];
|
|
11236
|
+
uniprotId = transcript === null || transcript === void 0 ? void 0 : transcript.uniprotId;
|
|
11237
|
+
}
|
|
11238
|
+
if (!uniprotId) return [3 /*break*/, 2];
|
|
11239
|
+
return [4 /*yield*/, this.dataFetcher.fetchUniprotFeatures(uniprotId, [cbioportalUtils.UniprotCategory.TOPOLOGY])];
|
|
11240
|
+
case 1:
|
|
11241
|
+
uniprotFeatures = _a.sent();
|
|
11242
|
+
uniprotFeatures.forEach(function (uniprotFeature) {
|
|
11243
|
+
var uniprotTopology = cbioportalUtils.convertUniprotFeatureToUniprotTopology(uniprotFeature);
|
|
11244
|
+
if (uniprotTopology) {
|
|
11245
|
+
data.push(uniprotTopology);
|
|
11246
|
+
}
|
|
11247
|
+
});
|
|
11248
|
+
return [2 /*return*/, data];
|
|
11249
|
+
case 2: return [2 /*return*/, []];
|
|
11250
|
+
}
|
|
11251
|
+
});
|
|
11252
|
+
}); },
|
|
11253
|
+
onError: function () {
|
|
11254
|
+
// fail silently
|
|
11255
|
+
},
|
|
11256
|
+
}, [])
|
|
11257
|
+
});
|
|
10951
11258
|
Object.defineProperty(this, "dbPtmData", {
|
|
10952
11259
|
enumerable: true,
|
|
10953
11260
|
configurable: true,
|
|
@@ -11081,7 +11388,7 @@ var DefaultMutationMapperStore = /** @class */ (function () {
|
|
|
11081
11388
|
value: cbioportalFrontendCommons.remoteData({
|
|
11082
11389
|
await: function () { return [_this.oncoKbCancerGenes]; },
|
|
11083
11390
|
invoke: function () {
|
|
11084
|
-
return Promise.resolve(
|
|
11391
|
+
return Promise.resolve(___default.reduce(_this.oncoKbCancerGenes.result, function (map, next) {
|
|
11085
11392
|
if (next.oncokbAnnotated) {
|
|
11086
11393
|
map[next.entrezGeneId] = true;
|
|
11087
11394
|
}
|
|
@@ -11155,7 +11462,7 @@ var DefaultMutationMapperStore = /** @class */ (function () {
|
|
|
11155
11462
|
return __generator(this, function (_b) {
|
|
11156
11463
|
switch (_b.label) {
|
|
11157
11464
|
case 0:
|
|
11158
|
-
if (!!
|
|
11465
|
+
if (!!___default.isEmpty(this.getMutations())) return [3 /*break*/, 2];
|
|
11159
11466
|
return [4 /*yield*/, this.dataFetcher.fetchVariantAnnotationsIndexedByGenomicLocation(this.getMutations(), this.annotationFields, this.isoformOverrideSource)];
|
|
11160
11467
|
case 1:
|
|
11161
11468
|
_a = _b.sent();
|
|
@@ -11183,7 +11490,7 @@ var DefaultMutationMapperStore = /** @class */ (function () {
|
|
|
11183
11490
|
return __generator(this, function (_b) {
|
|
11184
11491
|
switch (_b.label) {
|
|
11185
11492
|
case 0:
|
|
11186
|
-
if (!!
|
|
11493
|
+
if (!!___default.isEmpty(this.getMutations())) return [3 /*break*/, 2];
|
|
11187
11494
|
return [4 /*yield*/, this.dataFetcher.fetchMyVariantInfoAnnotationsIndexedByGenomicLocation(this.getMutations(), this.isoformOverrideSource)];
|
|
11188
11495
|
case 1:
|
|
11189
11496
|
_a = _b.sent();
|
|
@@ -11242,7 +11549,7 @@ var DefaultMutationMapperStore = /** @class */ (function () {
|
|
|
11242
11549
|
});
|
|
11243
11550
|
Object.defineProperty(DefaultMutationMapperStore.prototype, "annotationFields", {
|
|
11244
11551
|
get: function () {
|
|
11245
|
-
return
|
|
11552
|
+
return ___default.uniq(['annotation_summary', 'hotspots'].concat(this.config.annotationFields || []));
|
|
11246
11553
|
},
|
|
11247
11554
|
enumerable: false,
|
|
11248
11555
|
configurable: true
|
|
@@ -11269,7 +11576,7 @@ var DefaultMutationMapperStore = /** @class */ (function () {
|
|
|
11269
11576
|
else if (this.config.filterMutationsBySelectedTranscript &&
|
|
11270
11577
|
this.activeTranscript.result &&
|
|
11271
11578
|
this.indexedVariantAnnotations.result &&
|
|
11272
|
-
!
|
|
11579
|
+
!___default.isEmpty(this.indexedVariantAnnotations.result)) {
|
|
11273
11580
|
return this.getAnnotatedMutations(this.activeTranscript.result);
|
|
11274
11581
|
}
|
|
11275
11582
|
else {
|
|
@@ -11329,7 +11636,7 @@ var DefaultMutationMapperStore = /** @class */ (function () {
|
|
|
11329
11636
|
});
|
|
11330
11637
|
Object.defineProperty(DefaultMutationMapperStore.prototype, "mutationsByPosition", {
|
|
11331
11638
|
get: function () {
|
|
11332
|
-
return cbioportalUtils.groupMutationsByProteinStartPos(
|
|
11639
|
+
return cbioportalUtils.groupMutationsByProteinStartPos(___default.flatten(this.dataStore.sortedFilteredData));
|
|
11333
11640
|
},
|
|
11334
11641
|
enumerable: false,
|
|
11335
11642
|
configurable: true
|
|
@@ -11338,7 +11645,7 @@ var DefaultMutationMapperStore = /** @class */ (function () {
|
|
|
11338
11645
|
get: function () {
|
|
11339
11646
|
return this.dataStore.sortedFilteredGroupedData.map(function (groupedData) { return ({
|
|
11340
11647
|
group: groupedData.group,
|
|
11341
|
-
mutations: cbioportalUtils.groupMutationsByProteinStartPos(
|
|
11648
|
+
mutations: cbioportalUtils.groupMutationsByProteinStartPos(___default.flatten(groupedData.data)),
|
|
11342
11649
|
}); });
|
|
11343
11650
|
},
|
|
11344
11651
|
enumerable: false,
|
|
@@ -11391,7 +11698,7 @@ var DefaultMutationMapperStore = /** @class */ (function () {
|
|
|
11391
11698
|
});
|
|
11392
11699
|
Object.defineProperty(DefaultMutationMapperStore.prototype, "transcriptsByTranscriptId", {
|
|
11393
11700
|
get: function () {
|
|
11394
|
-
return
|
|
11701
|
+
return ___default.keyBy(this.allTranscripts.result, function (transcript) { return transcript.transcriptId; });
|
|
11395
11702
|
},
|
|
11396
11703
|
enumerable: false,
|
|
11397
11704
|
configurable: true
|
|
@@ -11476,7 +11783,7 @@ var DefaultMutationMapperStore = /** @class */ (function () {
|
|
|
11476
11783
|
if (this.indexedVariantAnnotations.result &&
|
|
11477
11784
|
this.transcriptsWithAnnotations.result &&
|
|
11478
11785
|
this.canonicalTranscript.isComplete) {
|
|
11479
|
-
return
|
|
11786
|
+
return ___default.fromPairs(this.transcriptsWithAnnotations.result.map(function (t) { return [
|
|
11480
11787
|
t,
|
|
11481
11788
|
_this.getAnnotatedMutations(t),
|
|
11482
11789
|
]; }));
|
|
@@ -11710,7 +12017,7 @@ var TranscriptDropdown = /** @class */ (function (_super) {
|
|
|
11710
12017
|
// then ones with refseq id
|
|
11711
12018
|
// then protein length
|
|
11712
12019
|
// lastly the ensembl id
|
|
11713
|
-
transcripts =
|
|
12020
|
+
transcripts = ___default.orderBy(transcripts, [
|
|
11714
12021
|
function (t) {
|
|
11715
12022
|
return canonicalTranscript.result &&
|
|
11716
12023
|
t === canonicalTranscript.result.transcriptId;
|
|
@@ -12058,7 +12365,7 @@ var MutationMapper = /** @class */ (function (_super) {
|
|
|
12058
12365
|
this.isFiltered &&
|
|
12059
12366
|
this.filterResetPanel
|
|
12060
12367
|
? this.filterResetPanel
|
|
12061
|
-
: undefined, trackDataStatus: this.trackDataStatus, showTrackSelector: this.props.showTrackSelector, onXAxisOffset: this.onXAxisOffset, onTrackVisibilityChange: this.props.onTrackVisibilityChange, getMutationCount: this.props.getMutationCount, getLollipopColor: this.props.getLollipopColor, yMaxLabelPostfix: this.plotYMaxLabelPostfix, yMaxFractionDigits: this.props.plotYMaxFractionDigits, yAxisLabelPadding: this.props.plotYAxisLabelPadding, showYAxis: this.props.showPlotYAxis, topYAxisSymbol: this.plotTopYAxisSymbol, bottomYAxisSymbol: this.plotBottomYAxisSymbol, topYAxisDefaultMax: this.plotTopYAxisDefaultMax, topYAxisDefaultMin: this.plotBottomYAxisDefaultMin, bottomYAxisDefaultMax: this.plotBottomYAxisDefaultMax, bottomYAxisDefaultMin: this.plotBottomYAxisDefaultMin, lollipopTooltipCountInfo: this.props.plotLollipopTooltipCountInfo, collapsePtmTrack: this.props.collapsePtmTrack }));
|
|
12368
|
+
: undefined, trackDataStatus: this.trackDataStatus, showTrackSelector: this.props.showTrackSelector, onXAxisOffset: this.onXAxisOffset, onTrackVisibilityChange: this.props.onTrackVisibilityChange, getMutationCount: this.props.getMutationCount, getLollipopColor: this.props.getLollipopColor, yMaxLabelPostfix: this.plotYMaxLabelPostfix, yMaxFractionDigits: this.props.plotYMaxFractionDigits, yAxisLabelPadding: this.props.plotYAxisLabelPadding, showYAxis: this.props.showPlotYAxis, topYAxisSymbol: this.plotTopYAxisSymbol, bottomYAxisSymbol: this.plotBottomYAxisSymbol, topYAxisDefaultMax: this.plotTopYAxisDefaultMax, topYAxisDefaultMin: this.plotBottomYAxisDefaultMin, bottomYAxisDefaultMax: this.plotBottomYAxisDefaultMax, bottomYAxisDefaultMin: this.plotBottomYAxisDefaultMin, lollipopTooltipCountInfo: this.props.plotLollipopTooltipCountInfo, collapsePtmTrack: this.props.collapsePtmTrack, collapseUniprotTopologyTrack: this.props.collapseUniprotTopologyTrack }));
|
|
12062
12369
|
},
|
|
12063
12370
|
enumerable: false,
|
|
12064
12371
|
configurable: true
|