react-mutation-mapper 0.8.24 → 0.8.28
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/Annotation.d.ts +2 -0
- package/dist/component/oncokb/AnnotationIcon.d.ts +4 -1
- package/dist/component/oncokb/CompactAnnotationIcon.d.ts +8 -0
- package/dist/component/oncokb/OncoKB.d.ts +4 -0
- package/dist/component/oncokb/OncoKbCard.d.ts +1 -0
- package/dist/component/oncokb/OncoKbCardBody.d.ts +1 -0
- package/dist/index.es.js +355 -159
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +354 -158
- package/dist/index.js.map +1 -1
- package/dist/util/OncoKbUtils.d.ts +4 -1
- package/package.json +6 -6
package/dist/index.es.js
CHANGED
|
@@ -3,13 +3,13 @@ import { makeObservable, observable, action, computed, reaction } from 'mobx';
|
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
4
|
import React__default, { createElement, Component, useState, Fragment } from 'react';
|
|
5
5
|
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, initHitZoneFromConfig, defaultHitzoneConfig, EditableSpan, DownloadControls, EllipsisTextTooltip, remoteData, WindowWrapper } from 'cbioportal-frontend-commons';
|
|
6
|
-
import { CIVIC_NA_VALUE, generateQueryVariantId,
|
|
6
|
+
import { CIVIC_NA_VALUE, generateQueryVariantId, OncoKbCardDataType, parseMyCancerGenomeLink, defaultArraySortMethod, defaultSortMethod, LEVELS, uniqueGenomicLocations, indexAnnotationsByGenomicLocation, getCivicEntry, getRemoteDataGroupStatus, getMyCancerGenomeLinks, isLinearClusterHotspot, is3dHotspot, calculateOncoKbAvailableDataType, getVariantAnnotation, getDbsnpRsId, getMyVariantInfoAnnotation, generateHgvsgByMutation, calcProteinChangeSortValue, extendMutations, formatNumberValueInSignificantDigits, generateTumorTypeDecomposition, formatPercentValue, countMutationsByProteinChange, numberOfLeadingDecimalZeros, filterLinearClusterHotspotsByMutations, filter3dHotspotsByMutations, isHotspot, defaultHotspotFilter, defaultStringArraySortMethod, extractExonInformation, formatExonLocation, compareByPtmTypePriority, ptmColor, UniprotTopologyTypeToTitle, UniprotTopologyTrackToColor, PtmSource, PTM_SOURCE_URL, getMyVariantInfoAnnotationsFromIndexedVariantAnnotations, generateProteinChangeQuery, StructuralVariantType, generateAnnotateStructuralVariantQuery, getMutationsByTranscriptId, groupMutationsByProteinStartPos, groupHotspotsByMutations, getMyCancerGenomeData, convertUniprotFeatureToPtm, convertDbPtmToPtm, indexHotspotsData, genomicLocationString, UniprotCategory, convertUniprotFeatureToUniprotTopology, groupPtmDataByPosition, groupPtmDataByTypeAndPosition, groupCancerHotspotDataByPosition, fetchCivicGenes, fetchCivicVariants } from 'cbioportal-utils';
|
|
7
7
|
import classnames from 'classnames';
|
|
8
8
|
import autobind from 'autobind-decorator';
|
|
9
|
-
import { Collapse } from 'react-collapse';
|
|
10
9
|
import { Tabs, Tab, Modal } from 'react-bootstrap';
|
|
11
|
-
import {
|
|
10
|
+
import { Collapse } from 'react-collapse';
|
|
12
11
|
import ReactTable from 'react-table';
|
|
12
|
+
import { If, Then, Else } from 'react-if';
|
|
13
13
|
import { GenomeNexusAPI, GenomeNexusAPIInternal } from 'genome-nexus-ts-api-client';
|
|
14
14
|
import { OncoKbAPI } from 'oncokb-ts-api-client';
|
|
15
15
|
import Select, { components } from 'react-select';
|
|
@@ -404,6 +404,12 @@ function normalizeLevel(level) {
|
|
|
404
404
|
return null;
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
|
+
function normalizeOncogenicity(oncogenicity) {
|
|
408
|
+
return (oncogenicity || 'unknown')
|
|
409
|
+
.trim()
|
|
410
|
+
.toLowerCase()
|
|
411
|
+
.replace(/\s/, '-');
|
|
412
|
+
}
|
|
407
413
|
function levelIconClassNames(level) {
|
|
408
414
|
if (level) {
|
|
409
415
|
return "oncokb icon level-" + level;
|
|
@@ -411,13 +417,32 @@ function levelIconClassNames(level) {
|
|
|
411
417
|
return '';
|
|
412
418
|
}
|
|
413
419
|
function oncogenicityIconClassNames(oncogenicity) {
|
|
414
|
-
|
|
415
|
-
|
|
420
|
+
return "oncokb icon " + normalizeOncogenicity(oncogenicity);
|
|
421
|
+
}
|
|
422
|
+
function annotationIconClassNames(type, highestLevel, indicator) {
|
|
423
|
+
return type === OncoKbCardDataType.BIOLOGICAL
|
|
424
|
+
? oncogenicityIconClassNames((indicator === null || indicator === void 0 ? void 0 : indicator.oncogenic) || '')
|
|
425
|
+
: levelIconClassNames(normalizeLevel(highestLevel) || '');
|
|
426
|
+
}
|
|
427
|
+
function calcHighestIndicatorLevel(type, indicator) {
|
|
428
|
+
var highestLevel = '';
|
|
429
|
+
if (indicator) {
|
|
430
|
+
switch (type) {
|
|
431
|
+
case OncoKbCardDataType.TXS:
|
|
432
|
+
highestLevel = indicator.highestSensitiveLevel;
|
|
433
|
+
break;
|
|
434
|
+
case OncoKbCardDataType.TXR:
|
|
435
|
+
highestLevel = indicator.highestResistanceLevel;
|
|
436
|
+
break;
|
|
437
|
+
case OncoKbCardDataType.DX:
|
|
438
|
+
highestLevel = indicator.highestDiagnosticImplicationLevel;
|
|
439
|
+
break;
|
|
440
|
+
case OncoKbCardDataType.PX:
|
|
441
|
+
highestLevel = indicator.highestPrognosticImplicationLevel;
|
|
442
|
+
break;
|
|
443
|
+
}
|
|
416
444
|
}
|
|
417
|
-
return
|
|
418
|
-
.trim()
|
|
419
|
-
.toLowerCase()
|
|
420
|
-
.replace(/\s/, '-');
|
|
445
|
+
return highestLevel;
|
|
421
446
|
}
|
|
422
447
|
function calcOncogenicScore(oncogenic) {
|
|
423
448
|
return ONCOGENIC_SCORE[oncogenic] || 0;
|
|
@@ -607,6 +632,125 @@ var MyCancerGenome = /** @class */ (function (_super) {
|
|
|
607
632
|
return MyCancerGenome;
|
|
608
633
|
}(Component));
|
|
609
634
|
|
|
635
|
+
function hideArrow$1(tooltipEl) {
|
|
636
|
+
var arrowEl = tooltipEl.querySelector('.rc-tooltip-arrow');
|
|
637
|
+
arrowEl.style.display = 'none';
|
|
638
|
+
}
|
|
639
|
+
var AnnotationIcon = function (props) {
|
|
640
|
+
if (props.availableDataTypes !== undefined &&
|
|
641
|
+
!props.availableDataTypes.includes(props.type)) {
|
|
642
|
+
return null;
|
|
643
|
+
}
|
|
644
|
+
var highestLevel = calcHighestIndicatorLevel(props.type, props.indicator);
|
|
645
|
+
return (React__default.createElement(AnnotationIconWithTooltip, { tooltipOverlay: props.tooltipOverlay, icon: React__default.createElement("i", { className: annotationIconClassNames(props.type, highestLevel, props.indicator), "data-test": "oncogenic-icon-image" }) }));
|
|
646
|
+
};
|
|
647
|
+
var AnnotationIconWithTooltip = function (props) {
|
|
648
|
+
if (props.icon) {
|
|
649
|
+
return (React__default.createElement(DefaultTooltip, { overlayClassName: "oncokb-tooltip", overlay: function () {
|
|
650
|
+
return props.tooltipOverlay ? props.tooltipOverlay : null;
|
|
651
|
+
}, placement: "right", trigger: ['hover', 'focus'], onPopupAlign: hideArrow$1, destroyTooltipOnHide: true },
|
|
652
|
+
React__default.createElement("span", { className: "" + annotationStyles['annotation-item'] }, props.icon)));
|
|
653
|
+
}
|
|
654
|
+
else {
|
|
655
|
+
return null;
|
|
656
|
+
}
|
|
657
|
+
};
|
|
658
|
+
|
|
659
|
+
var BIOLOGICAL_COLOR_MAP = {
|
|
660
|
+
oncogenic: '#0968C3',
|
|
661
|
+
'likely-oncogenic': '#0968C3',
|
|
662
|
+
'predicted-oncogenic': '#0968C3',
|
|
663
|
+
resistance: '#0968C3',
|
|
664
|
+
neutral: '#696969',
|
|
665
|
+
'likely-neutral': '#696969',
|
|
666
|
+
inconclusive: '#AAAAAA',
|
|
667
|
+
vus: '#696969',
|
|
668
|
+
unknown: '#CCCCCC',
|
|
669
|
+
};
|
|
670
|
+
var LEVEL_COLOR_MAP = {
|
|
671
|
+
'1': '#33A02C',
|
|
672
|
+
'2': '#1F78B4',
|
|
673
|
+
'3': '#984EA3',
|
|
674
|
+
'3A': '#984EA3',
|
|
675
|
+
'3B': '#BE98CE',
|
|
676
|
+
'4': '#424242',
|
|
677
|
+
R1: '#EE3424',
|
|
678
|
+
R2: '#F79A92',
|
|
679
|
+
R3: '#FCD6D3',
|
|
680
|
+
Dx1: '#33A02C',
|
|
681
|
+
Dx2: '#1F78B4',
|
|
682
|
+
Dx3: '#984EA3',
|
|
683
|
+
Px1: '#33A02C',
|
|
684
|
+
Px2: '#1F78B4',
|
|
685
|
+
Px3: '#984EA3',
|
|
686
|
+
};
|
|
687
|
+
function getLevelColor(highestLevel, defaultColor) {
|
|
688
|
+
if (defaultColor === void 0) { defaultColor = '#CCCCCC'; }
|
|
689
|
+
var level = normalizeLevel(highestLevel || null) || '';
|
|
690
|
+
return LEVEL_COLOR_MAP[level] || defaultColor;
|
|
691
|
+
}
|
|
692
|
+
function shouldDrawShape(type, level, availableDataTypes) {
|
|
693
|
+
return (level &&
|
|
694
|
+
availableDataTypes !== undefined &&
|
|
695
|
+
availableDataTypes.includes(type));
|
|
696
|
+
}
|
|
697
|
+
function getOncogenicShape(indicator) {
|
|
698
|
+
var oncogenicity = normalizeOncogenicity((indicator === null || indicator === void 0 ? void 0 : indicator.oncogenic) || '');
|
|
699
|
+
var color = BIOLOGICAL_COLOR_MAP[oncogenicity] || '#CCCCCC';
|
|
700
|
+
return (React__default.createElement("g", { transform: "translate(9, 9)" },
|
|
701
|
+
React__default.createElement("circle", { r: "6", fill: "none", strokeWidth: "2", stroke: color }),
|
|
702
|
+
oncogenicity !== 'vus' && oncogenicity !== 'unknown' && (React__default.createElement("g", null,
|
|
703
|
+
React__default.createElement("circle", { r: "3", fill: "none", strokeWidth: "2", stroke: color }),
|
|
704
|
+
React__default.createElement("circle", { r: "1.5", fill: color, stroke: "none" })))));
|
|
705
|
+
}
|
|
706
|
+
function getTherapeuticSensitivityShape(indicator, availableDataTypes) {
|
|
707
|
+
var highestLevel = indicator === null || indicator === void 0 ? void 0 : indicator.highestSensitiveLevel;
|
|
708
|
+
if (!shouldDrawShape(OncoKbCardDataType.TXS, highestLevel, availableDataTypes)) {
|
|
709
|
+
return null;
|
|
710
|
+
}
|
|
711
|
+
var fillColor = getLevelColor(highestLevel, '#33A02C');
|
|
712
|
+
return (React__default.createElement("g", { transform: "translate(14.5, 3.5)" },
|
|
713
|
+
React__default.createElement("circle", { r: "4", fill: fillColor, stroke: "#ffffff", strokeWidth: "1" })));
|
|
714
|
+
}
|
|
715
|
+
function getTherapeuticResistanceShape(indicator, availableDataTypes) {
|
|
716
|
+
var highestLevel = indicator === null || indicator === void 0 ? void 0 : indicator.highestResistanceLevel;
|
|
717
|
+
if (!shouldDrawShape(OncoKbCardDataType.TXR, highestLevel, availableDataTypes)) {
|
|
718
|
+
return null;
|
|
719
|
+
}
|
|
720
|
+
var fillColor = getLevelColor(highestLevel, '#EE3424');
|
|
721
|
+
return (React__default.createElement("g", { transform: "translate(14.5, 14.5)" },
|
|
722
|
+
React__default.createElement("circle", { r: "4", fill: fillColor, stroke: "#ffffff", strokeWidth: "1" })));
|
|
723
|
+
}
|
|
724
|
+
function getDiagnosticShape(indicator, availableDataTypes) {
|
|
725
|
+
var highestLevel = indicator === null || indicator === void 0 ? void 0 : indicator.highestDiagnosticImplicationLevel;
|
|
726
|
+
if (!shouldDrawShape(OncoKbCardDataType.DX, highestLevel, availableDataTypes)) {
|
|
727
|
+
return null;
|
|
728
|
+
}
|
|
729
|
+
var fillColor = getLevelColor(highestLevel, '#33A02C');
|
|
730
|
+
return (React__default.createElement("g", { transform: "translate(-0.5, -0.5)" },
|
|
731
|
+
React__default.createElement("rect", { width: "7", height: "7", fill: fillColor, stroke: "#ffffff", strokeWidth: "1" })));
|
|
732
|
+
}
|
|
733
|
+
function getPrognosticShape(indicator, availableDataTypes) {
|
|
734
|
+
var highestLevel = indicator === null || indicator === void 0 ? void 0 : indicator.highestPrognosticImplicationLevel;
|
|
735
|
+
if (!shouldDrawShape(OncoKbCardDataType.PX, highestLevel, availableDataTypes)) {
|
|
736
|
+
return null;
|
|
737
|
+
}
|
|
738
|
+
var fillColor = getLevelColor(highestLevel, '#33A02C');
|
|
739
|
+
return (React__default.createElement("g", { transform: "translate(0, 10.5)" },
|
|
740
|
+
React__default.createElement("polygon", { points: "3.5 0, 8 8, -1 8", fill: fillColor, stroke: "#ffffff", strokeWidth: "1" })));
|
|
741
|
+
}
|
|
742
|
+
var CompactAnnotationIcon = function (props) {
|
|
743
|
+
var indicatorForLevelIcons = props.usingPublicOncoKbInstance
|
|
744
|
+
? undefined
|
|
745
|
+
: props.indicator;
|
|
746
|
+
return (React__default.createElement("svg", { version: "1.1", width: "18", height: "18", "data-test": "oncogenic-icon-image" },
|
|
747
|
+
getOncogenicShape(props.indicator),
|
|
748
|
+
getTherapeuticSensitivityShape(indicatorForLevelIcons, props.availableDataTypes),
|
|
749
|
+
getTherapeuticResistanceShape(indicatorForLevelIcons, props.availableDataTypes),
|
|
750
|
+
getDiagnosticShape(indicatorForLevelIcons, props.availableDataTypes),
|
|
751
|
+
getPrognosticShape(indicatorForLevelIcons, props.availableDataTypes)));
|
|
752
|
+
};
|
|
753
|
+
|
|
610
754
|
var oncoKbLogoImgSrc = "data:image/svg+xml,%3Csvg%20width%3D%22138%22%20height%3D%2226%22%20viewBox%3D%220%200%20138%2026%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%20%20%3Cpath%20d%3D%22M13.3232%2026C21.0801%2026%2026.7182%2020.1464%2026.7182%2013V12.9282C26.7182%205.78177%2021.1519%200%2013.395%200C5.63812%200%200%205.85359%200%2013V13.0718C0%2020.2182%205.5663%2026%2013.3232%2026ZM13.395%2020.9006C8.94199%2020.9006%205.78177%2017.3094%205.78177%2013V12.9282C5.78177%208.61878%208.87016%205.09945%2013.3232%205.09945C17.7762%205.09945%2020.9365%208.69061%2020.9365%2013V13.0718C20.9365%2017.3812%2017.8481%2020.9006%2013.395%2020.9006Z%22%20fill%3D%22%230968C3%22%2F%3E%20%20%3Cpath%20d%3D%22M29.9722%2025.5691H35.4307V14.8315C35.4307%2012.2459%2036.7594%2010.9171%2038.8423%2010.9171C40.9252%2010.9171%2042.1462%2012.2459%2042.1462%2014.8315V25.5691H47.6048V13.1077C47.6048%208.69061%2045.1987%205.96133%2041.0688%205.96133C38.3036%205.96133%2036.6876%207.4337%2035.4307%209.04972V6.32044H29.9722V25.5691Z%22%20fill%3D%22%230968C3%22%2F%3E%20%20%3Cpath%20d%3D%22M60.3551%2026C64.1976%2026%2066.3523%2024.5276%2068.2197%2022.4807L65.0236%2019.2486C63.6948%2020.5055%2062.4379%2021.2956%2060.6064%2021.2956C57.6258%2021.2956%2055.7225%2018.9254%2055.7225%2015.9807V15.9088C55.7225%2013.0718%2057.6617%2010.6657%2060.391%2010.6657C62.3302%2010.6657%2063.5512%2011.4917%2064.7722%2012.7845L68.112%209.19337C66.3164%207.18232%2064.054%205.96133%2060.4269%205.96133C54.5374%205.96133%2050.3357%2010.4862%2050.3357%2015.9807V16.0525C50.3357%2021.547%2054.5733%2026%2060.3551%2026Z%22%20fill%3D%22%230968C3%22%2F%3E%20%20%3Cpath%20d%3D%22M91.3584%2025.5691H96.8888V17.884L99.7977%2014.8674L107.59%2025.5691H114.234L103.532%2011.0967L113.803%200.430938H107.016L96.8888%2011.4199V0.430938H91.3584V25.5691Z%22%20fill%3D%22%230968C3%22%2F%3E%20%20%3Cpath%20d%3D%22M116.182%2025.5691H128.14C133.814%2025.5691%20137.549%2023.2707%20137.549%2018.674V18.6022C137.549%2015.2265%20135.754%2013.5387%20132.845%2012.4254C134.64%2011.4199%20136.149%209.83978%20136.149%207.00276V6.93094C136.149%205.20718%20135.574%203.80663%20134.425%202.65746C132.989%201.22099%20130.726%200.430938%20127.853%200.430938H116.182V25.5691ZM130.654%207.93646C130.654%209.80387%20129.11%2010.5939%20126.668%2010.5939H121.569V5.27901H127.027C129.361%205.27901%20130.654%206.21271%20130.654%207.86464V7.93646ZM132.055%2017.9199V17.9917C132.055%2019.8591%20130.582%2020.721%20128.14%2020.721H121.569V15.1906H127.961C130.798%2015.1906%20132.055%2016.232%20132.055%2017.9199Z%22%20fill%3D%22%230968C3%22%2F%3E%20%20%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M78.8032%2023.5C82.9454%2023.5%2086.3032%2020.1421%2086.3032%2016C86.3032%2011.8579%2082.9454%208.5%2078.8032%208.5C74.6611%208.5%2071.3032%2011.8579%2071.3032%2016C71.3032%2020.1421%2074.6611%2023.5%2078.8032%2023.5ZM78.8032%2026C84.3261%2026%2088.8032%2021.5228%2088.8032%2016C88.8032%2010.4772%2084.3261%206%2078.8032%206C73.2804%206%2068.8032%2010.4772%2068.8032%2016C68.8032%2021.5228%2073.2804%2026%2078.8032%2026Z%22%20fill%3D%22%230968C3%22%2F%3E%20%20%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M78.8032%2019.5C80.7362%2019.5%2082.3032%2017.933%2082.3032%2016C82.3032%2014.067%2080.7362%2012.5%2078.8032%2012.5C76.8702%2012.5%2075.3032%2014.067%2075.3032%2016C75.3032%2017.933%2076.8702%2019.5%2078.8032%2019.5ZM78.8032%2022C82.1169%2022%2084.8032%2019.3137%2084.8032%2016C84.8032%2012.6863%2082.1169%2010%2078.8032%2010C75.4895%2010%2072.8032%2012.6863%2072.8032%2016C72.8032%2019.3137%2075.4895%2022%2078.8032%2022Z%22%20fill%3D%22%230968C3%22%2F%3E%20%20%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M78.8032%2018C79.9078%2018%2080.8032%2017.1046%2080.8032%2016C80.8032%2014.8954%2079.9078%2014%2078.8032%2014C77.6987%2014%2076.8032%2014.8954%2076.8032%2016C76.8032%2017.1046%2077.6987%2018%2078.8032%2018Z%22%20fill%3D%22%230968C3%22%2F%3E%3C%2Fsvg%3E";
|
|
611
755
|
|
|
612
756
|
var mainStyles = {"oncokb-card":"main-module_oncokb-card__32DzD","tab-content":"main-module_tab-content__8nUyf","tooltip-refs":"main-module_tooltip-refs__SpA4W","disclaimer":"main-module_disclaimer__3CLlM","blue-icon":"main-module_blue-icon__2Hs-v","footer":"main-module_footer__2dc-8","oncokb-logo":"main-module_oncokb-logo__3RVg7","title":"main-module_title__2kT-n","additional-info":"main-module_additional-info__1nXTm","biological-info":"main-module_biological-info__2efDC","ellipsis-text-wrapper":"main-module_ellipsis-text-wrapper__18dny"};
|
|
@@ -1171,35 +1315,6 @@ var EvidenceReferenceContent = function (props) {
|
|
|
1171
1315
|
: 'Information is not available.')))));
|
|
1172
1316
|
};
|
|
1173
1317
|
|
|
1174
|
-
var BiologicalContent = function (props) {
|
|
1175
|
-
return (React__default.createElement(EvidenceReferenceContent, { description: props.biologicalSummary, citations: props.mutationEffectCitations, pmidData: props.pmidData, noInfoDisclaimer: 'Mutation effect information is not available.' }));
|
|
1176
|
-
};
|
|
1177
|
-
|
|
1178
|
-
var ImplicationContent = function (props) {
|
|
1179
|
-
var columns = [
|
|
1180
|
-
__assign(__assign({}, OncoKbHelper.getDefaultColumnDefinition('level')), { accessor: 'levelOfEvidence', maxWidth: 100 }),
|
|
1181
|
-
__assign(__assign({}, OncoKbHelper.getDefaultColumnDefinition('alterations')), { Cell: function (cellProps) {
|
|
1182
|
-
return OncoKbHelper.getAlterationsColumnCell(cellProps.value, props.variant);
|
|
1183
|
-
} }),
|
|
1184
|
-
{
|
|
1185
|
-
id: 'referenceList',
|
|
1186
|
-
Header: createElement("span", null),
|
|
1187
|
-
sortable: false,
|
|
1188
|
-
maxWidth: 50,
|
|
1189
|
-
Cell: function (cellProps) { return (createElement(DefaultTooltip, { overlay: function () { return (createElement("div", { className: mainStyles['tooltip-refs'] },
|
|
1190
|
-
createElement(EvidenceReferenceContent, { description: cellProps.original.description, citations: {
|
|
1191
|
-
pmids: cellProps.original.pmids,
|
|
1192
|
-
abstracts: cellProps.original.abstracts,
|
|
1193
|
-
}, pmidData: props.pmidData, noInfoDisclaimer: 'Mutation effect information is not available.' }))); }, placement: "right", trigger: ['hover', 'focus'], destroyTooltipOnHide: true },
|
|
1194
|
-
createElement("i", { className: "fa fa-book" }))); },
|
|
1195
|
-
},
|
|
1196
|
-
];
|
|
1197
|
-
return (createElement("div", null,
|
|
1198
|
-
createElement("p", null, props.summary),
|
|
1199
|
-
createElement("div", null,
|
|
1200
|
-
createElement(ReactTable, { data: props.implications, columns: columns, showPagination: false, pageSize: props.implications.length, className: "-striped -highlight" }))));
|
|
1201
|
-
};
|
|
1202
|
-
|
|
1203
1318
|
var OncoKbTreatmentTable = /** @class */ (function (_super) {
|
|
1204
1319
|
__extends(OncoKbTreatmentTable, _super);
|
|
1205
1320
|
function OncoKbTreatmentTable() {
|
|
@@ -1281,8 +1396,38 @@ var OncoKbTreatmentTable = /** @class */ (function (_super) {
|
|
|
1281
1396
|
return OncoKbTreatmentTable;
|
|
1282
1397
|
}(Component));
|
|
1283
1398
|
|
|
1399
|
+
var BiologicalContent = function (props) {
|
|
1400
|
+
return (React__default.createElement(EvidenceReferenceContent, { description: props.biologicalSummary, citations: props.mutationEffectCitations, pmidData: props.pmidData, noInfoDisclaimer: 'Mutation effect information is not available.' }));
|
|
1401
|
+
};
|
|
1402
|
+
|
|
1403
|
+
var ImplicationContent = function (props) {
|
|
1404
|
+
var columns = [
|
|
1405
|
+
__assign(__assign({}, OncoKbHelper.getDefaultColumnDefinition('level')), { accessor: 'levelOfEvidence', maxWidth: 100 }),
|
|
1406
|
+
__assign(__assign({}, OncoKbHelper.getDefaultColumnDefinition('alterations')), { Cell: function (cellProps) {
|
|
1407
|
+
return OncoKbHelper.getAlterationsColumnCell(cellProps.value, props.variant);
|
|
1408
|
+
} }),
|
|
1409
|
+
{
|
|
1410
|
+
id: 'referenceList',
|
|
1411
|
+
Header: createElement("span", null),
|
|
1412
|
+
sortable: false,
|
|
1413
|
+
maxWidth: 50,
|
|
1414
|
+
Cell: function (cellProps) { return (createElement(DefaultTooltip, { overlay: function () { return (createElement("div", { className: mainStyles['tooltip-refs'] },
|
|
1415
|
+
createElement(EvidenceReferenceContent, { description: cellProps.original.description, citations: {
|
|
1416
|
+
pmids: cellProps.original.pmids,
|
|
1417
|
+
abstracts: cellProps.original.abstracts,
|
|
1418
|
+
}, pmidData: props.pmidData, noInfoDisclaimer: 'Mutation effect information is not available.' }))); }, placement: "right", trigger: ['hover', 'focus'], destroyTooltipOnHide: true },
|
|
1419
|
+
createElement("i", { className: "fa fa-book" }))); },
|
|
1420
|
+
},
|
|
1421
|
+
];
|
|
1422
|
+
return (createElement("div", null,
|
|
1423
|
+
createElement("p", null, props.summary),
|
|
1424
|
+
createElement("div", null,
|
|
1425
|
+
createElement(ReactTable, { data: props.implications, columns: columns, showPagination: false, pageSize: props.implications.length, className: "-striped -highlight" }))));
|
|
1426
|
+
};
|
|
1427
|
+
|
|
1284
1428
|
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_"};
|
|
1285
1429
|
|
|
1430
|
+
var _a$1;
|
|
1286
1431
|
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."));
|
|
1287
1432
|
var ONCOKB_DATA_ACCESS_PAGE_LINK = 'https://docs.cbioportal.org/2.4-integration-with-other-webservices/oncokb-data-access';
|
|
1288
1433
|
var publicInstanceDisclaimerOverLay = (React__default.createElement("div", null,
|
|
@@ -1292,9 +1437,24 @@ var publicInstanceDisclaimerOverLay = (React__default.createElement("div", null,
|
|
|
1292
1437
|
React__default.createElement("a", { href: ONCOKB_DATA_ACCESS_PAGE_LINK, target: '_blank' }, "these instructions"),
|
|
1293
1438
|
"."),
|
|
1294
1439
|
OncoKbMedicalDisclaimer));
|
|
1440
|
+
var DATA_TYPE_TO_TITLE = (_a$1 = {},
|
|
1441
|
+
_a$1[OncoKbCardDataType.BIOLOGICAL] = 'Biological Effect',
|
|
1442
|
+
_a$1[OncoKbCardDataType.TXS] = 'Therapeutic Implications',
|
|
1443
|
+
_a$1[OncoKbCardDataType.TXR] = 'Therapeutic Implications',
|
|
1444
|
+
_a$1[OncoKbCardDataType.DX] = 'Diagnostic Implications',
|
|
1445
|
+
_a$1[OncoKbCardDataType.PX] = 'Prognostic Implications',
|
|
1446
|
+
_a$1);
|
|
1295
1447
|
var TabContentWrapper = function (props) {
|
|
1296
1448
|
return React__default.createElement("div", { className: mainStyles['tab-content'] }, props.children);
|
|
1297
1449
|
};
|
|
1450
|
+
var TabTitle = function (props) {
|
|
1451
|
+
var title = DATA_TYPE_TO_TITLE[props.type];
|
|
1452
|
+
var icon = props.displayHighestLevelInTabTitle ? (React__default.createElement("i", { className: annotationIconClassNames(props.type, calcHighestIndicatorLevel(props.type, props.indicator), props.indicator) })) : null;
|
|
1453
|
+
return icon ? (React__default.createElement("span", { style: { display: 'flex' } },
|
|
1454
|
+
icon,
|
|
1455
|
+
" ",
|
|
1456
|
+
title)) : (React__default.createElement("span", null, title));
|
|
1457
|
+
};
|
|
1298
1458
|
var OncoKbCardBody = function (props) {
|
|
1299
1459
|
var defaultTabActiveKey;
|
|
1300
1460
|
// Do not assign a default key if the data type specified through the property does not have any content
|
|
@@ -1338,13 +1498,13 @@ var OncoKbCardBody = function (props) {
|
|
|
1338
1498
|
function getBody(type, indicator) {
|
|
1339
1499
|
var tabs = [];
|
|
1340
1500
|
if (dataTypeHasContent(OncoKbCardDataType.BIOLOGICAL)) {
|
|
1341
|
-
tabs.push(React__default.createElement(Tab, { eventKey: OncoKbCardDataType.BIOLOGICAL, title:
|
|
1501
|
+
tabs.push(React__default.createElement(Tab, { eventKey: OncoKbCardDataType.BIOLOGICAL, title: React__default.createElement(TabTitle, { type: OncoKbCardDataType.BIOLOGICAL, indicator: props.indicator, displayHighestLevelInTabTitle: props.displayHighestLevelInTabTitle }) },
|
|
1342
1502
|
React__default.createElement(TabContentWrapper, null,
|
|
1343
1503
|
React__default.createElement(BiologicalContent, { mutationEffectCitations: indicator.mutationEffect.citations, biologicalSummary: indicator.mutationEffect.description, pmidData: props.pmidData }))));
|
|
1344
1504
|
}
|
|
1345
1505
|
if (!props.usingPublicOncoKbInstance &&
|
|
1346
1506
|
dataTypeHasContent(OncoKbCardDataType.TXS)) {
|
|
1347
|
-
tabs.push(React__default.createElement(Tab, { eventKey: OncoKbCardDataType.TXS, title:
|
|
1507
|
+
tabs.push(React__default.createElement(Tab, { eventKey: OncoKbCardDataType.TXS, title: React__default.createElement(TabTitle, { type: OncoKbCardDataType.TXS, indicator: props.indicator, displayHighestLevelInTabTitle: props.displayHighestLevelInTabTitle }) },
|
|
1348
1508
|
React__default.createElement(TabContentWrapper, null,
|
|
1349
1509
|
React__default.createElement("div", { style: {
|
|
1350
1510
|
marginTop: 10,
|
|
@@ -1353,13 +1513,13 @@ var OncoKbCardBody = function (props) {
|
|
|
1353
1513
|
}
|
|
1354
1514
|
if (!props.usingPublicOncoKbInstance &&
|
|
1355
1515
|
dataTypeHasContent(OncoKbCardDataType.DX)) {
|
|
1356
|
-
tabs.push(React__default.createElement(Tab, { eventKey: OncoKbCardDataType.DX, title:
|
|
1516
|
+
tabs.push(React__default.createElement(Tab, { eventKey: OncoKbCardDataType.DX, title: React__default.createElement(TabTitle, { type: OncoKbCardDataType.DX, indicator: props.indicator, displayHighestLevelInTabTitle: props.displayHighestLevelInTabTitle }) },
|
|
1357
1517
|
React__default.createElement(TabContentWrapper, null,
|
|
1358
1518
|
React__default.createElement(ImplicationContent, { variant: indicator.query.alteration, summary: indicator.diagnosticSummary, implications: indicator.diagnosticImplications, pmidData: props.pmidData }))));
|
|
1359
1519
|
}
|
|
1360
1520
|
if (!props.usingPublicOncoKbInstance &&
|
|
1361
1521
|
dataTypeHasContent(OncoKbCardDataType.PX)) {
|
|
1362
|
-
tabs.push(React__default.createElement(Tab, { eventKey: OncoKbCardDataType.PX, title:
|
|
1522
|
+
tabs.push(React__default.createElement(Tab, { eventKey: OncoKbCardDataType.PX, title: React__default.createElement(TabTitle, { type: OncoKbCardDataType.PX, indicator: props.indicator, displayHighestLevelInTabTitle: props.displayHighestLevelInTabTitle }) },
|
|
1363
1523
|
React__default.createElement(TabContentWrapper, null,
|
|
1364
1524
|
React__default.createElement(ImplicationContent, { variant: indicator.query.alteration, summary: indicator.prognosticSummary, implications: indicator.prognosticImplications, pmidData: props.pmidData }))));
|
|
1365
1525
|
}
|
|
@@ -1456,7 +1616,6 @@ var OncoKbCard = /** @class */ (function (_super) {
|
|
|
1456
1616
|
enumerable: false,
|
|
1457
1617
|
configurable: true
|
|
1458
1618
|
});
|
|
1459
|
-
// TODO we should replace the tabs with an actual ReactBootstrap Tab,
|
|
1460
1619
|
Object.defineProperty(OncoKbCard.prototype, "render", {
|
|
1461
1620
|
enumerable: false,
|
|
1462
1621
|
configurable: true,
|
|
@@ -1468,7 +1627,7 @@ var OncoKbCard = /** @class */ (function (_super) {
|
|
|
1468
1627
|
!this.props.geneNotExist && this.props.indicator && (createElement(OncoKbCardTitle, { hugoSymbol: this.props.indicator.query.hugoSymbol, variant: this.props.indicator.query.alteration, tumorType: this.props.indicator
|
|
1469
1628
|
? this.props.indicator.query.tumorType
|
|
1470
1629
|
: '' })),
|
|
1471
|
-
createElement(OncoKbCardBody, { type: this.props.type, indicator: this.props.indicator, geneNotExist: this.props.geneNotExist, isCancerGene: this.props.isCancerGene, hugoSymbol: this.props.hugoSymbol, pmidData: this.props.pmidData, usingPublicOncoKbInstance: this.props.usingPublicOncoKbInstance }),
|
|
1630
|
+
createElement(OncoKbCardBody, { type: this.props.type, indicator: this.props.indicator, geneNotExist: this.props.geneNotExist, isCancerGene: this.props.isCancerGene, hugoSymbol: this.props.hugoSymbol, pmidData: this.props.pmidData, usingPublicOncoKbInstance: this.props.usingPublicOncoKbInstance, displayHighestLevelInTabTitle: this.props.displayHighestLevelInTabTitle }),
|
|
1472
1631
|
createElement("div", { className: mainStyles.footer },
|
|
1473
1632
|
this.oncokbLinkOut === undefined ? ({ oncokbLogo: oncokbLogo }) : (createElement("a", { href: "" + this.oncokbLinkOut, target: "_blank", className: mainStyles['oncokb-logo'] }, oncokbLogo)),
|
|
1474
1633
|
this.props.handleFeedbackOpen && (createElement("span", null,
|
|
@@ -1527,14 +1686,14 @@ var OncoKbTooltip = /** @class */ (function (_super) {
|
|
|
1527
1686
|
value: function () {
|
|
1528
1687
|
var tooltipContent = createElement("span", null);
|
|
1529
1688
|
if (this.props.geneNotExist) {
|
|
1530
|
-
tooltipContent = (createElement(OncoKbCard, { type: this.props.type, usingPublicOncoKbInstance: this.props.usingPublicOncoKbInstance, hugoSymbol: this.props.hugoSymbol, geneNotExist: this.props.geneNotExist, isCancerGene: this.props.isCancerGene, pmidData: {}, handleFeedbackOpen: this.props.handleFeedbackOpen }));
|
|
1689
|
+
tooltipContent = (createElement(OncoKbCard, { type: this.props.type, usingPublicOncoKbInstance: this.props.usingPublicOncoKbInstance, hugoSymbol: this.props.hugoSymbol, geneNotExist: this.props.geneNotExist, isCancerGene: this.props.isCancerGene, pmidData: {}, handleFeedbackOpen: this.props.handleFeedbackOpen, displayHighestLevelInTabTitle: true }));
|
|
1531
1690
|
}
|
|
1532
1691
|
if (!this.props.indicator) {
|
|
1533
1692
|
return tooltipContent;
|
|
1534
1693
|
}
|
|
1535
1694
|
if (!this.props.geneNotExist) {
|
|
1536
1695
|
var pmidData = this.pmidData;
|
|
1537
|
-
tooltipContent = (createElement(OncoKbCard, { type: this.props.type, usingPublicOncoKbInstance: this.props.usingPublicOncoKbInstance, geneNotExist: this.props.geneNotExist, isCancerGene: this.props.isCancerGene, hugoSymbol: this.props.hugoSymbol, indicator: this.props.indicator, pmidData: pmidData, handleFeedbackOpen: this.props.handleFeedbackOpen }));
|
|
1696
|
+
tooltipContent = (createElement(OncoKbCard, { type: this.props.type, usingPublicOncoKbInstance: this.props.usingPublicOncoKbInstance, geneNotExist: this.props.geneNotExist, isCancerGene: this.props.isCancerGene, hugoSymbol: this.props.hugoSymbol, indicator: this.props.indicator, pmidData: pmidData, handleFeedbackOpen: this.props.handleFeedbackOpen, displayHighestLevelInTabTitle: true }));
|
|
1538
1697
|
}
|
|
1539
1698
|
return tooltipContent;
|
|
1540
1699
|
}
|
|
@@ -1578,44 +1737,6 @@ var OncoKbFeedback = /** @class */ (function (_super) {
|
|
|
1578
1737
|
return OncoKbFeedback;
|
|
1579
1738
|
}(Component));
|
|
1580
1739
|
|
|
1581
|
-
function hideArrow$1(tooltipEl) {
|
|
1582
|
-
var arrowEl = tooltipEl.querySelector('.rc-tooltip-arrow');
|
|
1583
|
-
arrowEl.style.display = 'none';
|
|
1584
|
-
}
|
|
1585
|
-
var AnnotationIcon = function (props) {
|
|
1586
|
-
var _a;
|
|
1587
|
-
if (props.availableDataTypes !== undefined &&
|
|
1588
|
-
!props.availableDataTypes.includes(props.type)) {
|
|
1589
|
-
return null;
|
|
1590
|
-
}
|
|
1591
|
-
var highestLevel = '';
|
|
1592
|
-
if (props.indicator) {
|
|
1593
|
-
switch (props.type) {
|
|
1594
|
-
case OncoKbCardDataType.TXS:
|
|
1595
|
-
highestLevel = props.indicator.highestSensitiveLevel;
|
|
1596
|
-
break;
|
|
1597
|
-
case OncoKbCardDataType.TXR:
|
|
1598
|
-
highestLevel = props.indicator.highestResistanceLevel;
|
|
1599
|
-
break;
|
|
1600
|
-
case OncoKbCardDataType.DX:
|
|
1601
|
-
highestLevel =
|
|
1602
|
-
props.indicator.highestDiagnosticImplicationLevel;
|
|
1603
|
-
break;
|
|
1604
|
-
case OncoKbCardDataType.PX:
|
|
1605
|
-
highestLevel =
|
|
1606
|
-
props.indicator.highestPrognosticImplicationLevel;
|
|
1607
|
-
break;
|
|
1608
|
-
}
|
|
1609
|
-
}
|
|
1610
|
-
return (React__default.createElement("span", { className: "" + annotationStyles['annotation-item'] },
|
|
1611
|
-
React__default.createElement(DefaultTooltip, { overlayClassName: "oncokb-tooltip", overlay: function () {
|
|
1612
|
-
return props.tooltipOverlay ? props.tooltipOverlay : null;
|
|
1613
|
-
}, placement: "right", trigger: ['hover', 'focus'], onPopupAlign: hideArrow$1, destroyTooltipOnHide: true },
|
|
1614
|
-
React__default.createElement("i", { className: props.type === OncoKbCardDataType.BIOLOGICAL
|
|
1615
|
-
? oncogenicityIconClassNames(((_a = props.indicator) === null || _a === void 0 ? void 0 : _a.oncogenic) || '')
|
|
1616
|
-
: levelIconClassNames(normalizeLevel(highestLevel) || ''), "data-test": "oncogenic-icon-image" }))));
|
|
1617
|
-
};
|
|
1618
|
-
|
|
1619
1740
|
function sortValue$2(indicator) {
|
|
1620
1741
|
var values = [0, 0, 0];
|
|
1621
1742
|
if (indicator) {
|
|
@@ -1637,6 +1758,33 @@ function download$2(indicator) {
|
|
|
1637
1758
|
var resistanceLevel = ((_b = indicator.highestResistanceLevel) === null || _b === void 0 ? void 0 : _b.toLowerCase()) || 'resistance NA';
|
|
1638
1759
|
return oncogenic + ", " + sensitivityLevel + ", " + resistanceLevel;
|
|
1639
1760
|
}
|
|
1761
|
+
function findDefaultDataTypeForTooltip(usingPublicOncoKbInstance, indicator, availableDataTypes) {
|
|
1762
|
+
if (usingPublicOncoKbInstance || !indicator) {
|
|
1763
|
+
return OncoKbCardDataType.BIOLOGICAL;
|
|
1764
|
+
}
|
|
1765
|
+
// priority is in this order: Tx > Dx > Px > Biological
|
|
1766
|
+
if (indicator.highestSensitiveLevel &&
|
|
1767
|
+
availableDataTypes &&
|
|
1768
|
+
availableDataTypes.includes(OncoKbCardDataType.TXS)) {
|
|
1769
|
+
return OncoKbCardDataType.TXS;
|
|
1770
|
+
}
|
|
1771
|
+
else if (indicator.highestResistanceLevel &&
|
|
1772
|
+
availableDataTypes &&
|
|
1773
|
+
availableDataTypes.includes(OncoKbCardDataType.TXR)) {
|
|
1774
|
+
return OncoKbCardDataType.TXR;
|
|
1775
|
+
}
|
|
1776
|
+
else if (indicator.highestDiagnosticImplicationLevel &&
|
|
1777
|
+
availableDataTypes &&
|
|
1778
|
+
availableDataTypes.includes(OncoKbCardDataType.DX)) {
|
|
1779
|
+
return OncoKbCardDataType.DX;
|
|
1780
|
+
}
|
|
1781
|
+
else if (indicator.highestPrognosticImplicationLevel &&
|
|
1782
|
+
availableDataTypes &&
|
|
1783
|
+
availableDataTypes.includes(OncoKbCardDataType.PX)) {
|
|
1784
|
+
return OncoKbCardDataType.PX;
|
|
1785
|
+
}
|
|
1786
|
+
return OncoKbCardDataType.BIOLOGICAL;
|
|
1787
|
+
}
|
|
1640
1788
|
var OncoKB = /** @class */ (function (_super) {
|
|
1641
1789
|
__extends(OncoKB, _super);
|
|
1642
1790
|
function OncoKB(props) {
|
|
@@ -1661,8 +1809,7 @@ var OncoKB = /** @class */ (function (_super) {
|
|
|
1661
1809
|
configurable: true,
|
|
1662
1810
|
writable: true,
|
|
1663
1811
|
value: function () {
|
|
1664
|
-
var
|
|
1665
|
-
var oncoKbContent = (createElement("span", { className: "" + annotationStyles['annotation-item'] }));
|
|
1812
|
+
var oncoKbContent;
|
|
1666
1813
|
if (this.props.status === 'error') {
|
|
1667
1814
|
oncoKbContent = errorIcon('Error fetching OncoKB data');
|
|
1668
1815
|
}
|
|
@@ -1670,15 +1817,9 @@ var OncoKB = /** @class */ (function (_super) {
|
|
|
1670
1817
|
oncoKbContent = loaderIcon('pull-left');
|
|
1671
1818
|
}
|
|
1672
1819
|
else {
|
|
1673
|
-
oncoKbContent =
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
this.props.indicator && (createElement(Fragment, null, [
|
|
1677
|
-
OncoKbCardDataType.TXS,
|
|
1678
|
-
OncoKbCardDataType.TXR,
|
|
1679
|
-
OncoKbCardDataType.DX,
|
|
1680
|
-
OncoKbCardDataType.PX,
|
|
1681
|
-
].map(function (dataType) { return (createElement(AnnotationIcon, { type: dataType, tooltipOverlay: _this.tooltipContent(dataType), indicator: _this.props.indicator, availableDataTypes: _this.props.availableDataTypes })); })))));
|
|
1820
|
+
oncoKbContent = this.props.mergeAnnotationIcons
|
|
1821
|
+
? this.singleAnnotationIcon()
|
|
1822
|
+
: this.multiAnnotationIcon();
|
|
1682
1823
|
if (!this.props.disableFeedback && this.showFeedback) {
|
|
1683
1824
|
oncoKbContent = (createElement("span", null,
|
|
1684
1825
|
oncoKbContent,
|
|
@@ -1690,6 +1831,57 @@ var OncoKB = /** @class */ (function (_super) {
|
|
|
1690
1831
|
return oncoKbContent;
|
|
1691
1832
|
}
|
|
1692
1833
|
});
|
|
1834
|
+
Object.defineProperty(OncoKB.prototype, "multiAnnotationIcon", {
|
|
1835
|
+
enumerable: false,
|
|
1836
|
+
configurable: true,
|
|
1837
|
+
writable: true,
|
|
1838
|
+
value: function () {
|
|
1839
|
+
return (createElement("span", { className: "oncokb-content", style: { display: 'inline-flex' } },
|
|
1840
|
+
createElement(AnnotationIcon, { type: OncoKbCardDataType.BIOLOGICAL, tooltipOverlay: this.tooltipContent(OncoKbCardDataType.BIOLOGICAL), indicator: this.props.indicator, availableDataTypes: this.props.availableDataTypes }),
|
|
1841
|
+
this.levelIcons()));
|
|
1842
|
+
}
|
|
1843
|
+
});
|
|
1844
|
+
Object.defineProperty(OncoKB.prototype, "levelIcons", {
|
|
1845
|
+
enumerable: false,
|
|
1846
|
+
configurable: true,
|
|
1847
|
+
writable: true,
|
|
1848
|
+
value: function () {
|
|
1849
|
+
var _this = this;
|
|
1850
|
+
if (this.props.usingPublicOncoKbInstance) {
|
|
1851
|
+
return null;
|
|
1852
|
+
}
|
|
1853
|
+
if (this.props.indicator) {
|
|
1854
|
+
return (createElement(Fragment, null, [
|
|
1855
|
+
OncoKbCardDataType.TXS,
|
|
1856
|
+
OncoKbCardDataType.TXR,
|
|
1857
|
+
OncoKbCardDataType.DX,
|
|
1858
|
+
OncoKbCardDataType.PX,
|
|
1859
|
+
].map(function (dataType) { return (createElement(AnnotationIcon, { type: dataType, tooltipOverlay: _this.tooltipContent(dataType), indicator: _this.props.indicator, availableDataTypes: _this.props.availableDataTypes })); })));
|
|
1860
|
+
}
|
|
1861
|
+
else {
|
|
1862
|
+
// TODO This doesn't always work, in some cases it adds unnecessary empty icons, we need a better solution.
|
|
1863
|
+
// we still need to draw empty icons even if there is no indicator data.
|
|
1864
|
+
// this is to keep the icon alignment consistent with the rest of the column
|
|
1865
|
+
// return (
|
|
1866
|
+
// <>
|
|
1867
|
+
// {this.props.availableDataTypes?.map(() => (
|
|
1868
|
+
// <AnnotationIconWithTooltip icon={<i />} />
|
|
1869
|
+
// ))}
|
|
1870
|
+
// </>
|
|
1871
|
+
// );
|
|
1872
|
+
return null;
|
|
1873
|
+
}
|
|
1874
|
+
}
|
|
1875
|
+
});
|
|
1876
|
+
Object.defineProperty(OncoKB.prototype, "singleAnnotationIcon", {
|
|
1877
|
+
enumerable: false,
|
|
1878
|
+
configurable: true,
|
|
1879
|
+
writable: true,
|
|
1880
|
+
value: function () {
|
|
1881
|
+
return (createElement("span", { className: "oncokb-content", style: { display: 'inline-flex' } },
|
|
1882
|
+
createElement(AnnotationIconWithTooltip, { tooltipOverlay: this.tooltipContent(findDefaultDataTypeForTooltip(this.props.usingPublicOncoKbInstance, this.props.indicator, this.props.availableDataTypes)), icon: createElement(CompactAnnotationIcon, { indicator: this.props.indicator, availableDataTypes: this.props.availableDataTypes, usingPublicOncoKbInstance: this.props.usingPublicOncoKbInstance }) })));
|
|
1883
|
+
}
|
|
1884
|
+
});
|
|
1693
1885
|
Object.defineProperty(OncoKB.prototype, "tooltipContent", {
|
|
1694
1886
|
enumerable: false,
|
|
1695
1887
|
configurable: true,
|
|
@@ -2105,9 +2297,9 @@ function sortValue$4(annotation) {
|
|
|
2105
2297
|
]);
|
|
2106
2298
|
}
|
|
2107
2299
|
function GenericAnnotation(props) {
|
|
2108
|
-
var annotation = props.annotation, enableCivic = props.enableCivic, enableHotspot = props.enableHotspot, enableMyCancerGenome = props.enableMyCancerGenome, enableOncoKb = props.enableOncoKb, pubMedCache = props.pubMedCache, userEmailAddress = props.userEmailAddress;
|
|
2300
|
+
var annotation = props.annotation, enableCivic = props.enableCivic, enableHotspot = props.enableHotspot, enableMyCancerGenome = props.enableMyCancerGenome, enableOncoKb = props.enableOncoKb, pubMedCache = props.pubMedCache, userEmailAddress = props.userEmailAddress, mergeOncoKbIcons = props.mergeOncoKbIcons;
|
|
2109
2301
|
return (createElement("span", { style: { display: 'flex', minWidth: 100 } },
|
|
2110
|
-
enableOncoKb && (createElement(OncoKB, { usingPublicOncoKbInstance: annotation.usingPublicOncoKbInstance, hugoGeneSymbol: annotation.hugoGeneSymbol, geneNotExist: !annotation.oncoKbGeneExist, isCancerGene: annotation.isOncoKbCancerGene, status: annotation.oncoKbStatus, indicator: annotation.oncoKbIndicator, availableDataTypes: annotation.oncoKbAvailableDataTypes, pubMedCache: pubMedCache, userEmailAddress: userEmailAddress })),
|
|
2302
|
+
enableOncoKb && (createElement(OncoKB, { usingPublicOncoKbInstance: annotation.usingPublicOncoKbInstance, hugoGeneSymbol: annotation.hugoGeneSymbol, geneNotExist: !annotation.oncoKbGeneExist, isCancerGene: annotation.isOncoKbCancerGene, status: annotation.oncoKbStatus, indicator: annotation.oncoKbIndicator, availableDataTypes: annotation.oncoKbAvailableDataTypes, mergeAnnotationIcons: mergeOncoKbIcons, pubMedCache: pubMedCache, userEmailAddress: userEmailAddress })),
|
|
2111
2303
|
enableCivic && (createElement(Civic, { civicEntry: annotation.civicEntry, civicStatus: annotation.civicStatus, hasCivicVariants: annotation.hasCivicVariants })),
|
|
2112
2304
|
enableMyCancerGenome && (createElement(MyCancerGenome, { linksHTML: annotation.myCancerGenomeLinks })),
|
|
2113
2305
|
enableHotspot && (createElement(HotspotAnnotation, { isHotspot: annotation.isHotspot, is3dHotspot: annotation.is3dHotspot, status: annotation.hotspotStatus }))));
|
|
@@ -2489,7 +2681,7 @@ function generateGnomadUrl(chromosome, position, reference, variant) {
|
|
|
2489
2681
|
}
|
|
2490
2682
|
}
|
|
2491
2683
|
|
|
2492
|
-
var _a$
|
|
2684
|
+
var _a$2;
|
|
2493
2685
|
function frequencyOutput(frequency) {
|
|
2494
2686
|
if (frequency === 0) {
|
|
2495
2687
|
return createElement("span", null, "0");
|
|
@@ -2503,13 +2695,13 @@ function frequencyOutput(frequency) {
|
|
|
2503
2695
|
}
|
|
2504
2696
|
}
|
|
2505
2697
|
var headerClassName = 'text-wrap font-weight-bold';
|
|
2506
|
-
var HEADERS = (_a$
|
|
2507
|
-
_a$
|
|
2508
|
-
_a$
|
|
2509
|
-
_a$
|
|
2510
|
-
_a$
|
|
2511
|
-
_a$
|
|
2512
|
-
_a$
|
|
2698
|
+
var HEADERS = (_a$2 = {},
|
|
2699
|
+
_a$2[GnomadTableColumnName.population] = (createElement(ColumnHeader, { className: headerClassName, headerContent: createElement("span", null, "Population") })),
|
|
2700
|
+
_a$2[GnomadTableColumnName.alleleCount] = (createElement(ColumnHeader, { className: headerClassName, headerContent: createElement("span", null, "Allele Count"), overlay: createElement("span", null, "Number of individuals with this allele") })),
|
|
2701
|
+
_a$2[GnomadTableColumnName.alleleNumber] = (createElement(ColumnHeader, { className: headerClassName, headerContent: createElement("span", null, "Allele Number"), overlay: createElement("span", null, "Number of times any allele has been observed at this position in the population") })),
|
|
2702
|
+
_a$2[GnomadTableColumnName.homozygotes] = (createElement(ColumnHeader, { className: headerClassName, headerContent: createElement("span", null, "Number of Homozygotes"), overlay: createElement("span", null, "Number of individuals carrying this allele in both copies") })),
|
|
2703
|
+
_a$2[GnomadTableColumnName.alleleFrequency] = (createElement(ColumnHeader, { className: headerClassName, headerContent: createElement("span", null, "Allele Frequency"), overlay: createElement("span", null, "Proportion of the population with this allele") })),
|
|
2704
|
+
_a$2);
|
|
2513
2705
|
function renderNumericalValue(column) {
|
|
2514
2706
|
return createElement("span", { className: "pull-right mr-1" }, column.value);
|
|
2515
2707
|
}
|
|
@@ -4663,7 +4855,7 @@ var MutationType = /** @class */ (function (_super) {
|
|
|
4663
4855
|
return MutationType;
|
|
4664
4856
|
}(Component));
|
|
4665
4857
|
|
|
4666
|
-
var _a$
|
|
4858
|
+
var _a$3, _b;
|
|
4667
4859
|
var MutationColumn;
|
|
4668
4860
|
(function (MutationColumn) {
|
|
4669
4861
|
MutationColumn["PROTEIN_CHANGE"] = "proteinChange";
|
|
@@ -4703,33 +4895,33 @@ var MutationColumnName;
|
|
|
4703
4895
|
function rightAlignedCell(cellProps) {
|
|
4704
4896
|
return createElement("span", { className: "pull-right mr-3" }, cellProps.value);
|
|
4705
4897
|
}
|
|
4706
|
-
var MUTATION_COLUMN_HEADERS = (_a$
|
|
4707
|
-
_a$
|
|
4708
|
-
_a$
|
|
4709
|
-
_a$
|
|
4710
|
-
_a$
|
|
4711
|
-
_a$
|
|
4712
|
-
_a$
|
|
4713
|
-
_a$
|
|
4714
|
-
_a$
|
|
4715
|
-
_a$
|
|
4716
|
-
_a$
|
|
4717
|
-
_a$
|
|
4718
|
-
_a$
|
|
4898
|
+
var MUTATION_COLUMN_HEADERS = (_a$3 = {},
|
|
4899
|
+
_a$3[MutationColumn.PROTEIN_CHANGE] = (createElement(ColumnHeader, { headerContent: createElement("span", { className: "pull-left" }, MutationColumnName.PROTEIN_CHANGE) })),
|
|
4900
|
+
_a$3[MutationColumn.ANNOTATION] = (createElement(ColumnHeader, { headerContent: createElement("span", { className: "pull-left" }, MutationColumnName.ANNOTATION) })),
|
|
4901
|
+
_a$3[MutationColumn.MUTATION_STATUS] = (createElement(ColumnHeader, { headerContent: createElement("span", { className: "pull-left" }, MutationColumnName.MUTATION_STATUS) })),
|
|
4902
|
+
_a$3[MutationColumn.MUTATION_TYPE] = (createElement(ColumnHeader, { headerContent: createElement("span", { className: "pull-left" }, MutationColumnName.MUTATION_TYPE) })),
|
|
4903
|
+
_a$3[MutationColumn.CHROMOSOME] = (createElement(ColumnHeader, { headerContent: createElement("span", { className: "pull-right mr-3" }, MutationColumnName.CHROMOSOME) })),
|
|
4904
|
+
_a$3[MutationColumn.START_POSITION] = (createElement(ColumnHeader, { headerContent: createElement("span", { className: "pull-right mr-3" }, MutationColumnName.START_POSITION) })),
|
|
4905
|
+
_a$3[MutationColumn.END_POSITION] = (createElement(ColumnHeader, { headerContent: createElement("span", { className: "pull-right mr-3" }, MutationColumnName.END_POSITION) })),
|
|
4906
|
+
_a$3[MutationColumn.REFERENCE_ALLELE] = (createElement(ColumnHeader, { headerContent: createElement("span", { className: "pull-left" }, MutationColumnName.REFERENCE_ALLELE), overlay: createElement("span", null, "Reference Allele") })),
|
|
4907
|
+
_a$3[MutationColumn.VARIANT_ALLELE] = (createElement(ColumnHeader, { headerContent: createElement("span", { className: "pull-left" }, MutationColumnName.VARIANT_ALLELE), overlay: createElement("span", null, "Variant Allele") })),
|
|
4908
|
+
_a$3[MutationColumn.HGVSG] = (createElement(ColumnHeader, { headerContent: createElement("span", { className: "pull-left" }, MutationColumnName.HGVSG) })),
|
|
4909
|
+
_a$3[MutationColumn.HGVSC] = (createElement(ColumnHeader, { headerContent: createElement("span", { className: "pull-left" }, MutationColumnName.HGVSC) })),
|
|
4910
|
+
_a$3[MutationColumn.GNOMAD] = (createElement(ColumnHeader, { headerContent: createElement("span", { className: "pull-right mr-3" },
|
|
4719
4911
|
MutationColumnName.GNOMAD,
|
|
4720
4912
|
' ',
|
|
4721
4913
|
createElement("i", { className: "fa fa-info-circle" })), overlay: createElement("span", null,
|
|
4722
4914
|
createElement("a", { href: "https://gnomad.broadinstitute.org/", target: "_blank" }, "gnomAD"),
|
|
4723
4915
|
' ',
|
|
4724
4916
|
"population allele frequencies. Overall population allele frequency is shown. Hover over a frequency to see the frequency for each specific population.") })),
|
|
4725
|
-
_a$
|
|
4917
|
+
_a$3[MutationColumn.CLINVAR] = (createElement(ColumnHeader, { headerContent: createElement("span", { className: "pull-left" },
|
|
4726
4918
|
MutationColumnName.CLINVAR,
|
|
4727
4919
|
' ',
|
|
4728
4920
|
createElement("i", { className: "fa fa-info-circle" })), overlay: createElement("span", null,
|
|
4729
4921
|
createElement("a", { href: "https://www.ncbi.nlm.nih.gov/clinvar/", target: "_blank" }, "ClinVar"),
|
|
4730
4922
|
' ',
|
|
4731
4923
|
"aggregates information about genomic variation and its relationship to human health.") })),
|
|
4732
|
-
_a$
|
|
4924
|
+
_a$3[MutationColumn.DBSNP] = (createElement(ColumnHeader, { headerContent: createElement("span", { className: "pull-right mr-3" },
|
|
4733
4925
|
MutationColumnName.DBSNP,
|
|
4734
4926
|
' ',
|
|
4735
4927
|
createElement("i", { className: "fa fa-info-circle" })), overlay: createElement("span", null,
|
|
@@ -4738,14 +4930,14 @@ var MUTATION_COLUMN_HEADERS = (_a$2 = {},
|
|
|
4738
4930
|
") is a free public archive for genetic variation within and across different species.",
|
|
4739
4931
|
createElement("br", null),
|
|
4740
4932
|
"NOTE: Currently only SNPs, single base deletions and insertions are supported.") })),
|
|
4741
|
-
_a$
|
|
4933
|
+
_a$3[MutationColumn.SIGNAL] = (createElement(ColumnHeader, { headerContent: createElement("span", { className: "pull-right mr-3" },
|
|
4742
4934
|
MutationColumnName.SIGNAL,
|
|
4743
4935
|
' ',
|
|
4744
4936
|
createElement("i", { className: "fa fa-info-circle" })), overlay: createElement("span", null,
|
|
4745
4937
|
"Prevalence of germline mutations in cancer patients from",
|
|
4746
4938
|
' ',
|
|
4747
4939
|
createElement("a", { href: "https://www.signaldb.org/", target: "_blank" }, "SIGNAL")) })),
|
|
4748
|
-
_a$
|
|
4940
|
+
_a$3);
|
|
4749
4941
|
/**
|
|
4750
4942
|
* These default columns only include static props.
|
|
4751
4943
|
* So, for some columns, like Annotation, no default accessor or Cell (render) properties included.
|
|
@@ -8258,36 +8450,40 @@ var ExonTrack = /** @class */ (function (_super) {
|
|
|
8258
8450
|
}
|
|
8259
8451
|
var exons = this.transcript.exons;
|
|
8260
8452
|
var utrs = this.transcript.utrs || [];
|
|
8261
|
-
var exonInfo =
|
|
8453
|
+
var exonInfo = exons
|
|
8454
|
+
? extractExonInformation(exons, utrs, this.props.proteinLength)
|
|
8455
|
+
: undefined;
|
|
8262
8456
|
var altColors = ['#007FFF', '#35BAF6'];
|
|
8263
|
-
return exonInfo
|
|
8264
|
-
|
|
8265
|
-
|
|
8266
|
-
|
|
8267
|
-
|
|
8268
|
-
|
|
8269
|
-
|
|
8270
|
-
|
|
8271
|
-
|
|
8272
|
-
|
|
8273
|
-
|
|
8274
|
-
|
|
8275
|
-
|
|
8276
|
-
|
|
8277
|
-
createElement("
|
|
8278
|
-
"
|
|
8279
|
-
|
|
8280
|
-
|
|
8281
|
-
|
|
8282
|
-
|
|
8283
|
-
|
|
8284
|
-
|
|
8285
|
-
|
|
8286
|
-
|
|
8287
|
-
|
|
8288
|
-
|
|
8289
|
-
|
|
8290
|
-
|
|
8457
|
+
return exonInfo
|
|
8458
|
+
? exonInfo.map(function (exon, index) {
|
|
8459
|
+
var startCodon = exon.start;
|
|
8460
|
+
var endCodon = exon.start + exon.length;
|
|
8461
|
+
var exonLength = exon.length;
|
|
8462
|
+
var stringStart = formatExonLocation(startCodon);
|
|
8463
|
+
var stringEnd = formatExonLocation(endCodon);
|
|
8464
|
+
var stringLength = formatExonLocation(exonLength);
|
|
8465
|
+
return {
|
|
8466
|
+
color: altColors[index % 2],
|
|
8467
|
+
startCodon: startCodon,
|
|
8468
|
+
endCodon: endCodon,
|
|
8469
|
+
label: exon.rank.toString(),
|
|
8470
|
+
labelColor: '#FFFFFF',
|
|
8471
|
+
tooltip: (createElement("span", null,
|
|
8472
|
+
createElement("h5", null,
|
|
8473
|
+
" Exon ",
|
|
8474
|
+
exon.rank,
|
|
8475
|
+
" "),
|
|
8476
|
+
"Start: ",
|
|
8477
|
+
stringStart,
|
|
8478
|
+
createElement("br", null),
|
|
8479
|
+
"End: ",
|
|
8480
|
+
stringEnd,
|
|
8481
|
+
createElement("br", null),
|
|
8482
|
+
"Length: ",
|
|
8483
|
+
stringLength)),
|
|
8484
|
+
};
|
|
8485
|
+
})
|
|
8486
|
+
: [];
|
|
8291
8487
|
},
|
|
8292
8488
|
enumerable: false,
|
|
8293
8489
|
configurable: true
|
|
@@ -8364,7 +8560,7 @@ var PtmReferenceList = /** @class */ (function (_super) {
|
|
|
8364
8560
|
return PtmReferenceList;
|
|
8365
8561
|
}(Component));
|
|
8366
8562
|
|
|
8367
|
-
var _a$
|
|
8563
|
+
var _a$4;
|
|
8368
8564
|
var PtmAnnotationTableColumnId;
|
|
8369
8565
|
(function (PtmAnnotationTableColumnId) {
|
|
8370
8566
|
PtmAnnotationTableColumnId["POSITION"] = "position";
|
|
@@ -8372,33 +8568,33 @@ var PtmAnnotationTableColumnId;
|
|
|
8372
8568
|
PtmAnnotationTableColumnId["DESCRIPTION"] = "description";
|
|
8373
8569
|
PtmAnnotationTableColumnId["PUBMED_IDS"] = "pubmedIds";
|
|
8374
8570
|
})(PtmAnnotationTableColumnId || (PtmAnnotationTableColumnId = {}));
|
|
8375
|
-
var PTM_ANNOTATION_DEFAULT_COLUMNS = (_a$
|
|
8376
|
-
_a$
|
|
8571
|
+
var PTM_ANNOTATION_DEFAULT_COLUMNS = (_a$4 = {},
|
|
8572
|
+
_a$4[PtmAnnotationTableColumnId.POSITION] = {
|
|
8377
8573
|
id: PtmAnnotationTableColumnId.POSITION,
|
|
8378
8574
|
accessor: function (ptm) { return ptm.residue.start; },
|
|
8379
8575
|
Header: 'Residue',
|
|
8380
8576
|
Cell: function (props) { return (createElement("div", { style: { textAlign: 'right' } }, getResidue(props.original))); },
|
|
8381
8577
|
maxWidth: 64,
|
|
8382
8578
|
},
|
|
8383
|
-
_a$
|
|
8579
|
+
_a$4[PtmAnnotationTableColumnId.TYPE] = {
|
|
8384
8580
|
id: PtmAnnotationTableColumnId.TYPE,
|
|
8385
8581
|
accessor: function (ptm) { return ptm.type; },
|
|
8386
8582
|
Header: 'Type',
|
|
8387
8583
|
minWidth: 100,
|
|
8388
8584
|
},
|
|
8389
|
-
_a$
|
|
8585
|
+
_a$4[PtmAnnotationTableColumnId.DESCRIPTION] = {
|
|
8390
8586
|
id: PtmAnnotationTableColumnId.DESCRIPTION,
|
|
8391
8587
|
accessor: function (ptm) { return ptm.description; },
|
|
8392
8588
|
Header: 'Description',
|
|
8393
8589
|
minWidth: 180,
|
|
8394
8590
|
},
|
|
8395
|
-
_a$
|
|
8591
|
+
_a$4[PtmAnnotationTableColumnId.PUBMED_IDS] = {
|
|
8396
8592
|
id: PtmAnnotationTableColumnId.PUBMED_IDS,
|
|
8397
8593
|
Header: '',
|
|
8398
8594
|
sortable: false,
|
|
8399
8595
|
maxWidth: 32,
|
|
8400
8596
|
},
|
|
8401
|
-
_a$
|
|
8597
|
+
_a$4);
|
|
8402
8598
|
function getResidue(ptm) {
|
|
8403
8599
|
if (ptm.residue.end && ptm.residue.end > ptm.residue.start) {
|
|
8404
8600
|
return ptm.residue.start + "-" + ptm.residue.end;
|