react-mutation-mapper 0.8.29 → 0.8.34

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.
@@ -12,6 +12,7 @@ export declare type AnnotationProps = {
12
12
  oncoKbCancerGenes?: RemoteData<CancerGene[] | Error | undefined>;
13
13
  usingPublicOncoKbInstance: boolean;
14
14
  mergeOncoKbIcons?: boolean;
15
+ oncoKbContentPadding?: number;
15
16
  pubMedCache?: MobxCache;
16
17
  resolveEntrezGeneId?: (mutation: Mutation) => number;
17
18
  resolveTumorType?: (mutation: Mutation) => string;
@@ -27,6 +28,7 @@ export declare type GenericAnnotationProps = {
27
28
  enableMyCancerGenome: boolean;
28
29
  enableOncoKb: boolean;
29
30
  mergeOncoKbIcons?: boolean;
31
+ oncoKbContentPadding?: number;
30
32
  pubMedCache?: MobxCache;
31
33
  userEmailAddress?: string;
32
34
  };
@@ -1,23 +1,24 @@
1
1
  import * as React from 'react';
2
2
  import 'rc-tooltip/assets/bootstrap_white.css';
3
- import { IExtendedSignalMutation, Mutation, RemoteData } from 'cbioportal-utils';
3
+ import { IExtendedSignalMutation, Mutation, RemoteData, Pathogenicity } from 'cbioportal-utils';
4
4
  import { VariantAnnotation } from 'genome-nexus-ts-api-client';
5
5
  declare type SignalProps = {
6
6
  mutation: Mutation;
7
7
  indexedVariantAnnotations?: RemoteData<{
8
8
  [genomicLocation: string]: VariantAnnotation;
9
9
  } | undefined>;
10
+ mutationType?: Pathogenicity;
10
11
  };
11
12
  declare type SignalValueProps = SignalProps & {
12
13
  significantDigits?: number;
13
14
  };
14
15
  export declare function getSignalData(mutation: Mutation, indexedVariantAnnotations?: RemoteData<{
15
16
  [genomicLocation: string]: VariantAnnotation;
16
- } | undefined>): IExtendedSignalMutation;
17
+ } | undefined>, mutationType?: Pathogenicity): IExtendedSignalMutation[];
17
18
  export declare function signalSortMethod(a: IExtendedSignalMutation, b: IExtendedSignalMutation): number;
18
19
  export declare function getSortValue(signalData: IExtendedSignalMutation): number | null;
19
- export declare function download(signalData: IExtendedSignalMutation): string;
20
- export declare function getSignalValue(mutation: Mutation, indexedVariantAnnotations?: RemoteData<{
20
+ export declare function download(signalData: IExtendedSignalMutation, mutationType?: Pathogenicity): string;
21
+ export declare function getSingleSignalValue(mutation: Mutation, mutationType: Pathogenicity, indexedVariantAnnotations?: RemoteData<{
21
22
  [genomicLocation: string]: VariantAnnotation;
22
23
  } | undefined>, significantDigits?: number): number | null;
23
24
  export declare const SignalTable: React.FunctionComponent<SignalValueProps>;
@@ -15,11 +15,12 @@ export interface IOncoKbProps {
15
15
  hugoGeneSymbol: string;
16
16
  userEmailAddress?: string;
17
17
  disableFeedback?: boolean;
18
+ contentPadding?: number;
18
19
  }
19
20
  export declare function sortValue(indicator?: IndicatorQueryResp | undefined | null): number[];
20
21
  export declare function download(indicator?: IndicatorQueryResp | undefined | null): string;
21
22
  export default class OncoKB extends React.Component<IOncoKbProps, {}> {
22
- constructor(props: any);
23
+ constructor(props: IOncoKbProps);
23
24
  showFeedback: boolean;
24
25
  tooltipDataLoadComplete: boolean;
25
26
  render(): JSX.Element;
@@ -11,6 +11,8 @@ export default class ExonTrack extends React.Component<ExonTrackProps, {}> {
11
11
  constructor(props: any);
12
12
  get transcriptId(): string | undefined;
13
13
  get transcript(): EnsemblTranscript | undefined;
14
+ get chromosome(): string;
15
+ get genomeBuild(): string;
14
16
  get exonSpecs(): TrackItemSpec[];
15
17
  get trackTitle(): JSX.Element;
16
18
  render(): JSX.Element;
package/dist/index.d.ts CHANGED
@@ -14,7 +14,7 @@ export { default as Hgvsg } from './component/column/Hgvsg';
14
14
  export * from './component/column/HgvsHelper';
15
15
  export { default as MutationStatus } from './component/column/MutationStatus';
16
16
  export { default as ProteinChange, proteinChangeSortMethod, } from './component/column/ProteinChange';
17
- export { default as Signal, getSignalData, getSortValue as signalSortValue, download as signalDownload, getSignalValue, SignalTable, } from './component/column/Signal';
17
+ export { default as Signal, getSignalData, getSortValue as signalSortValue, download as signalDownload, getSingleSignalValue, SignalTable, } from './component/column/Signal';
18
18
  export { default as DropdownSelector, DropdownSelectorProps, } from './component/filter/DropdownSelector';
19
19
  export { default as BadgeLabel } from './component/filter/BadgeLabel';
20
20
  export { default as BadgeSelector, BadgeSelectorOption, BadgeSelectorProps, } from './component/filter/BadgeSelector';
package/dist/index.es.js CHANGED
@@ -3,7 +3,7 @@ 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, 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';
6
+ import { CIVIC_NA_VALUE, generateQueryVariantId, OncoKbCardDataType, parseMyCancerGenomeLink, defaultArraySortMethod, defaultSortMethod, LEVELS, uniqueGenomicLocations, indexAnnotationsByGenomicLocation, getCivicEntry, getRemoteDataGroupStatus, getMyCancerGenomeLinks, isLinearClusterHotspot, is3dHotspot, calculateOncoKbAvailableDataType, getVariantAnnotation, getDbsnpRsId, getMyVariantInfoAnnotation, generateHgvsgByMutation, calcProteinChangeSortValue, Pathogenicity, extendMutations, formatNumberValueInSignificantDigits, generateTumorTypeDecomposition, formatPercentValue, countMutationsByProteinChange, numberOfLeadingDecimalZeros, filterLinearClusterHotspotsByMutations, filter3dHotspotsByMutations, isHotspot, defaultHotspotFilter, defaultStringArraySortMethod, extractExonInformation, formatExonLocation, formatExonLength, 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
9
  import { Tabs, Tab, Modal } from 'react-bootstrap';
@@ -15,7 +15,7 @@ import { OncoKbAPI } from 'oncokb-ts-api-client';
15
15
  import Select, { components } from 'react-select';
16
16
  import $ from 'jquery';
17
17
  import Slider from 'react-rangeslider';
18
- import request from 'superagent';
18
+ import request, { get } from 'superagent';
19
19
  import memoize from 'memoize-weak-decorator';
20
20
  import { cached } from 'mobxpromise';
21
21
 
@@ -1859,17 +1859,11 @@ var OncoKB = /** @class */ (function (_super) {
1859
1859
  ].map(function (dataType) { return (createElement(AnnotationIcon, { type: dataType, tooltipOverlay: _this.tooltipContent(dataType), indicator: _this.props.indicator, availableDataTypes: _this.props.availableDataTypes })); })));
1860
1860
  }
1861
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;
1862
+ // workaround: use content padding value to draw an empty icon when there is no indicator data.
1863
+ // this is to keep the icon alignment consistent with the rest of the column.
1864
+ // ideally we should implement grouped columns to avoid these kind of workarounds
1865
+ // (see https://github.com/cBioPortal/cbioportal/issues/8723)
1866
+ return createElement("i", { style: { paddingRight: this.props.contentPadding } });
1873
1867
  }
1874
1868
  }
1875
1869
  });
@@ -2297,9 +2291,9 @@ function sortValue$4(annotation) {
2297
2291
  ]);
2298
2292
  }
2299
2293
  function GenericAnnotation(props) {
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;
2294
+ 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, oncoKbContentPadding = props.oncoKbContentPadding;
2301
2295
  return (createElement("span", { style: { display: 'flex', minWidth: 100 } },
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 })),
2296
+ 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, contentPadding: oncoKbContentPadding })),
2303
2297
  enableCivic && (createElement(Civic, { civicEntry: annotation.civicEntry, civicStatus: annotation.civicStatus, hasCivicVariants: annotation.hasCivicVariants })),
2304
2298
  enableMyCancerGenome && (createElement(MyCancerGenome, { linksHTML: annotation.myCancerGenomeLinks })),
2305
2299
  enableHotspot && (createElement(HotspotAnnotation, { isHotspot: annotation.isHotspot, is3dHotspot: annotation.is3dHotspot, status: annotation.hotspotStatus }))));
@@ -3158,8 +3152,9 @@ var ProteinChange = /** @class */ (function (_super) {
3158
3152
  return ProteinChange;
3159
3153
  }(Component));
3160
3154
 
3161
- function getSignalData(mutation, indexedVariantAnnotations) {
3162
- var signalData = {};
3155
+ function getSignalData(mutation, indexedVariantAnnotations, mutationType // mutationType could be "germline", "somatic", or "undefined" which means both
3156
+ ) {
3157
+ var signalData = [];
3163
3158
  var variantAnnotation = indexedVariantAnnotations
3164
3159
  ? getVariantAnnotation(mutation, indexedVariantAnnotations.result)
3165
3160
  : undefined;
@@ -3167,12 +3162,37 @@ function getSignalData(mutation, indexedVariantAnnotations) {
3167
3162
  variantAnnotation.signalAnnotation &&
3168
3163
  variantAnnotation.signalAnnotation.annotation &&
3169
3164
  variantAnnotation.signalAnnotation.annotation.length > 0) {
3170
- variantAnnotation.signalAnnotation.annotation.forEach(function (annotation) {
3171
- // only have one germline annotation
3172
- if (annotation.mutationStatus.includes('germline')) {
3173
- signalData = extendMutations([annotation])[0];
3165
+ // if mutation is somatic OR germline, get annotation depending on mutationType
3166
+ if (variantAnnotation.signalAnnotation.annotation.length === 1) {
3167
+ if ((mutationType === Pathogenicity.GERMLINE &&
3168
+ variantAnnotation.signalAnnotation.annotation[0].mutationStatus.includes('germline')) ||
3169
+ (mutationType === Pathogenicity.SOMATIC &&
3170
+ variantAnnotation.signalAnnotation.annotation[0].mutationStatus.includes('somatic'))) {
3171
+ signalData = extendMutations([
3172
+ variantAnnotation.signalAnnotation.annotation[0],
3173
+ ]);
3174
+ }
3175
+ }
3176
+ // if mutation is both somatic AND germline, get annotation for both or get one of them depending on mutationType
3177
+ else {
3178
+ // if mutationType is undefined, get annotation for both somatic and germline
3179
+ if (mutationType === undefined) {
3180
+ signalData = extendMutations(variantAnnotation.signalAnnotation.annotation);
3174
3181
  }
3175
- });
3182
+ // if mutationType is defined, get annotation depending on mutationType
3183
+ else {
3184
+ variantAnnotation.signalAnnotation.annotation.forEach(function (annotation) {
3185
+ if (mutationType === Pathogenicity.GERMLINE &&
3186
+ annotation.mutationStatus.includes('germline')) {
3187
+ signalData = extendMutations([annotation]);
3188
+ }
3189
+ else if (mutationType === Pathogenicity.SOMATIC &&
3190
+ annotation.mutationStatus.includes('somatic')) {
3191
+ signalData = extendMutations([annotation]);
3192
+ }
3193
+ });
3194
+ }
3195
+ }
3176
3196
  }
3177
3197
  return signalData;
3178
3198
  }
@@ -3180,25 +3200,29 @@ function signalSortMethod(a, b) {
3180
3200
  return defaultSortMethod(getSortValue(a), getSortValue(b));
3181
3201
  }
3182
3202
  function getSortValue(signalData) {
3183
- return signalData.germlineFrequency || null;
3203
+ return signalData ? signalData.germlineFrequency || null : null;
3184
3204
  }
3185
- function download$7(signalData) {
3186
- return signalData.germlineFrequency != null
3205
+ function download$7(signalData, mutationType) {
3206
+ return signalData && signalData.germlineFrequency !== null
3187
3207
  ? "" + formatNumberValueInSignificantDigits(signalData.germlineFrequency, 2)
3188
3208
  : '';
3189
3209
  }
3190
- function getSignalValue(mutation, indexedVariantAnnotations, significantDigits) {
3191
- var signalData = getSignalData(mutation, indexedVariantAnnotations);
3192
- if (signalData.tumorTypeDecomposition) {
3193
- return formatNumberValueInSignificantDigits(signalData.germlineFrequency, significantDigits || 2);
3210
+ // Get germline OR somatic frequency value
3211
+ function getSingleSignalValue(mutation, mutationType, indexedVariantAnnotations, significantDigits) {
3212
+ var signalData = getSignalData(mutation, indexedVariantAnnotations, mutationType);
3213
+ if (signalData &&
3214
+ signalData.length === 1 &&
3215
+ signalData[0].tumorTypeDecomposition) {
3216
+ return formatNumberValueInSignificantDigits(signalData[0].germlineFrequency || signalData[0].somaticFrequency, significantDigits || 2);
3194
3217
  }
3195
3218
  else {
3196
3219
  return null;
3197
3220
  }
3198
3221
  }
3199
3222
  var SignalTable = function (props) {
3200
- var signalData = getSignalData(props.mutation, props.indexedVariantAnnotations);
3201
- if (getSignalValue(props.mutation, props.indexedVariantAnnotations) !== null) {
3223
+ // signal data should be either germline or somatic, so should be only one element
3224
+ var signalData = getSignalData(props.mutation, props.indexedVariantAnnotations, props.mutationType)[0];
3225
+ if (getSingleSignalValue(props.mutation, props.mutationType || Pathogenicity.GERMLINE, props.indexedVariantAnnotations) !== null) {
3202
3226
  return (createElement(MutationTumorTypeFrequencyTable, { data: generateTumorTypeDecomposition(signalData, signalData.countsByTumorType, signalData.biallelicCountsByTumorType, signalData.qcPassCountsByTumorType, signalData.statsByTumorType), columns: [
3203
3227
  FREQUENCY_COLUMNS_DEFINITION[FrequencyTableColumnEnum.TUMOR_TYPE],
3204
3228
  FREQUENCY_COLUMNS_DEFINITION[FrequencyTableColumnEnum.MUTATION_STATUS],
@@ -3239,11 +3263,11 @@ var Signal = /** @class */ (function (_super) {
3239
3263
  }
3240
3264
  else {
3241
3265
  content = createElement("div", null);
3242
- var signalValue = getSignalValue(this.props.mutation, this.props.indexedVariantAnnotations);
3266
+ var signalValue = getSingleSignalValue(this.props.mutation, this.props.mutationType || Pathogenicity.GERMLINE, this.props.indexedVariantAnnotations);
3243
3267
  if (signalValue !== null) {
3244
3268
  content = (createElement(DefaultTooltip, { placement: "top", overlayStyle: {
3245
3269
  width: 800,
3246
- }, overlay: createElement(SignalTable, { mutation: this.props.mutation, indexedVariantAnnotations: this.props.indexedVariantAnnotations }) },
3270
+ }, overlay: createElement(SignalTable, { mutation: this.props.mutation, indexedVariantAnnotations: this.props.indexedVariantAnnotations, mutationType: this.props.mutationType }) },
3247
3271
  createElement("span", null, signalValue)));
3248
3272
  }
3249
3273
  }
@@ -5191,7 +5215,7 @@ var DefaultMutationTable = /** @class */ (function (_super) {
5191
5215
  return this.indexedVariantAnnotationDataStatus === 'pending'
5192
5216
  ? function () { return undefined; }
5193
5217
  : function (mutation) {
5194
- return getSignalData(mutation, _this.props.indexedVariantAnnotations);
5218
+ return getSignalData(mutation, _this.props.indexedVariantAnnotations, Pathogenicity.GERMLINE)[0];
5195
5219
  };
5196
5220
  },
5197
5221
  enumerable: false,
@@ -5261,7 +5285,7 @@ var DefaultMutationTable = /** @class */ (function (_super) {
5261
5285
  case MutationColumn.DBSNP:
5262
5286
  return function (column) { return (createElement(Dbsnp, { mutation: column.original, indexedMyVariantInfoAnnotations: _this.props.indexedMyVariantInfoAnnotations })); };
5263
5287
  case MutationColumn.SIGNAL:
5264
- return function (column) { return (createElement(Signal, { mutation: column.original, indexedVariantAnnotations: _this.props.indexedVariantAnnotations })); };
5288
+ return function (column) { return (createElement(Signal, { mutation: column.original, indexedVariantAnnotations: _this.props.indexedVariantAnnotations, mutationType: Pathogenicity.GERMLINE })); };
5265
5289
  default:
5266
5290
  return undefined;
5267
5291
  }
@@ -8443,8 +8467,24 @@ var ExonTrack = /** @class */ (function (_super) {
8443
8467
  enumerable: false,
8444
8468
  configurable: true
8445
8469
  });
8470
+ Object.defineProperty(ExonTrack.prototype, "chromosome", {
8471
+ get: function () {
8472
+ var _a, _b;
8473
+ return (_b = (_a = this.props.store.ensemblTranscriptLookUp.result) === null || _a === void 0 ? void 0 : _a.body) === null || _b === void 0 ? void 0 : _b.seq_region_name;
8474
+ },
8475
+ enumerable: false,
8476
+ configurable: true
8477
+ });
8478
+ Object.defineProperty(ExonTrack.prototype, "genomeBuild", {
8479
+ get: function () {
8480
+ return this.props.store.genomeBuild;
8481
+ },
8482
+ enumerable: false,
8483
+ configurable: true
8484
+ });
8446
8485
  Object.defineProperty(ExonTrack.prototype, "exonSpecs", {
8447
8486
  get: function () {
8487
+ var _this = this;
8448
8488
  if (!this.transcriptId || !this.transcript) {
8449
8489
  return [];
8450
8490
  }
@@ -8458,10 +8498,15 @@ var ExonTrack = /** @class */ (function (_super) {
8458
8498
  ? exonInfo.map(function (exon, index) {
8459
8499
  var startCodon = exon.start;
8460
8500
  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);
8501
+ var exonStartLocation = formatExonLocation(startCodon, index);
8502
+ var exonEndLocation = formatExonLocation(endCodon);
8503
+ var exonLength = formatExonLength(exon.length);
8504
+ var link = _this.chromosome
8505
+ ? "https://igv.org/app/?locus=chr" + _this.chromosome + ":" + exon.genomicLocationStart + "-" + exon.genomicLocationEnd + "&genome=" + _this.genomeBuild
8506
+ : 'https://igv.org';
8507
+ var linkText = _this.chromosome
8508
+ ? _this.genomeBuild + ":chr" + _this.chromosome + ":" + exon.genomicLocationStart + " - " + exon.genomicLocationEnd
8509
+ : exon.genomicLocationStart + " - " + exon.genomicLocationEnd;
8465
8510
  return {
8466
8511
  color: altColors[index % 2],
8467
8512
  startCodon: startCodon,
@@ -8473,14 +8518,41 @@ var ExonTrack = /** @class */ (function (_super) {
8473
8518
  " Exon ",
8474
8519
  exon.rank,
8475
8520
  " "),
8476
- "Start: ",
8477
- stringStart,
8521
+ "Start: Nucleotide",
8522
+ ' ',
8523
+ createElement("strong", null, exonStartLocation.nucleotideLocation),
8524
+ ' ',
8525
+ "of amino acid",
8526
+ ' ',
8527
+ createElement("strong", null, exonStartLocation.aminoAcidLocation),
8478
8528
  createElement("br", null),
8479
- "End: ",
8480
- stringEnd,
8529
+ "End: Nucleotide",
8530
+ ' ',
8531
+ createElement("strong", null, exonEndLocation.nucleotideLocation),
8532
+ ' ',
8533
+ "of amino acid",
8534
+ ' ',
8535
+ createElement("strong", null, exonEndLocation.aminoAcidLocation),
8536
+ createElement("br", null),
8537
+ "Length:",
8538
+ ' ',
8539
+ createElement("strong", null, exonLength.aminoAcidLength),
8540
+ ' ',
8541
+ "amino acids",
8542
+ ' ',
8543
+ exonLength.nucleotideLength && (createElement(Fragment, null,
8544
+ ' ',
8545
+ "and",
8546
+ ' ',
8547
+ createElement("strong", null, exonLength.nucleotideLength),
8548
+ ' ',
8549
+ "nucleotides")),
8481
8550
  createElement("br", null),
8482
- "Length: ",
8483
- stringLength)),
8551
+ "Genomic location:", " ",
8552
+ createElement("a", { target: "_blank", href: link, rel: "noopener noreferrer" },
8553
+ createElement(Fragment, null,
8554
+ linkText, " ",
8555
+ createElement("i", { className: "fa fa-external-link" }))))),
8484
8556
  };
8485
8557
  })
8486
8558
  : [];
@@ -8511,6 +8583,12 @@ var ExonTrack = /** @class */ (function (_super) {
8511
8583
  __decorate([
8512
8584
  computed
8513
8585
  ], ExonTrack.prototype, "transcript", null);
8586
+ __decorate([
8587
+ computed
8588
+ ], ExonTrack.prototype, "chromosome", null);
8589
+ __decorate([
8590
+ computed
8591
+ ], ExonTrack.prototype, "genomeBuild", null);
8514
8592
  __decorate([
8515
8593
  computed
8516
8594
  ], ExonTrack.prototype, "exonSpecs", null);
@@ -11700,6 +11778,28 @@ var DefaultMutationMapperStore = /** @class */ (function () {
11700
11778
  },
11701
11779
  })
11702
11780
  });
11781
+ Object.defineProperty(this, "ensemblTranscriptLookUp", {
11782
+ enumerable: true,
11783
+ configurable: true,
11784
+ writable: true,
11785
+ value: remoteData({
11786
+ await: function () { return [_this.activeTranscript]; },
11787
+ invoke: function () { return __awaiter(_this, void 0, void 0, function () {
11788
+ var ensemblTranscriptLookUpLink;
11789
+ return __generator(this, function (_a) {
11790
+ ensemblTranscriptLookUpLink = this.genomeBuild === 'hg19'
11791
+ ? "https://grch37.rest.ensembl.org/lookup/id/" + this.activeTranscript.result + "?content-type=application/json"
11792
+ : "https://rest.ensembl.org/lookup/id/" + this.activeTranscript.result + "?content-type=application/json";
11793
+ return [2 /*return*/, this.activeTranscript.result
11794
+ ? get(ensemblTranscriptLookUpLink)
11795
+ : undefined];
11796
+ });
11797
+ }); },
11798
+ onError: function () {
11799
+ // fail silently, leave the error handling responsibility to the data consumer
11800
+ },
11801
+ })
11802
+ });
11703
11803
  makeObservable(this);
11704
11804
  }
11705
11805
  Object.defineProperty(DefaultMutationMapperStore.prototype, "selectedTranscript", {
@@ -12009,6 +12109,13 @@ var DefaultMutationMapperStore = /** @class */ (function () {
12009
12109
  0);
12010
12110
  }
12011
12111
  });
12112
+ Object.defineProperty(DefaultMutationMapperStore.prototype, "genomeBuild", {
12113
+ get: function () {
12114
+ return this.config.genomeBuild || 'hg19';
12115
+ },
12116
+ enumerable: false,
12117
+ configurable: true
12118
+ });
12012
12119
  __decorate([
12013
12120
  observable
12014
12121
  ], DefaultMutationMapperStore.prototype, "_selectedTranscript", void 0);
@@ -12079,6 +12186,9 @@ var DefaultMutationMapperStore = /** @class */ (function () {
12079
12186
  __decorate([
12080
12187
  autobind
12081
12188
  ], DefaultMutationMapperStore.prototype, "getDefaultEntrezGeneId", null);
12189
+ __decorate([
12190
+ computed
12191
+ ], DefaultMutationMapperStore.prototype, "genomeBuild", null);
12082
12192
  return DefaultMutationMapperStore;
12083
12193
  }());
12084
12194
 
@@ -12785,5 +12895,5 @@ var MutationMapper = /** @class */ (function (_super) {
12785
12895
  return MutationMapper;
12786
12896
  }(Component));
12787
12897
 
12788
- export { Annotation, BadgeLabel, BadgeSelector, Civic, ClinvarInterpretation, ClinvarSummary, ColumnHeader, ColumnSelector, ColumnSortDirection, DEFAULT_ANNOTATION_DATA, DEFAULT_GENOME_NEXUS_URL, DEFAULT_MUTATION_ALIGNER_PROXY_URL_TEMPLATE, DEFAULT_MUTATION_ALIGNER_URL_TEMPLATE, DEFAULT_MUTATION_COLUMNS, DEFAULT_MY_GENE_URL_TEMPLATE, DEFAULT_ONCO_KB_URL, DEFAULT_PROTEIN_IMPACT_TYPE_COLORS, DEFAULT_UNIPROT_ID_URL_TEMPLATE, DataFilterType, DataTable, Dbsnp, DbsnpId, DefaultMutationMapperDataFetcher, DefaultMutationMapperDataStore, DefaultMutationMapperFilterApplier, DefaultMutationMapperStore, DefaultMutationTable, Domain, DropdownSelector, FilterResetPanel, GenericAnnotation, Gnomad, GnomadFrequency, GnomadFrequencyBreakdown, GnomadFrequencyTable, GnomadFrequencyValue, Hgvsc, Hgvsg, HotspotAnnotation, HotspotInfo, Lollipop, LollipopMutationPlot, LollipopPlot, LollipopPlotNoTooltip, MSI_H_NAME, MUTATION_COLUMNS_DEFINITION, MUTATION_COLUMN_HEADERS, MUTATION_STATUS_BADGE_STYLE_OVERRIDE, MUTATION_TYPE_PRIORITY, MutationColumn, MutationColumnName, MutationMapper, MutationStatus, MutationStatusBadgeSelector, MyCancerGenome, ONCOKB_DEFAULT_DATA, ONCOKB_DEFAULT_INFO, OTHER_BIOMARKER_HUGO_SYMBOL, OTHER_BIOMARKER_NAME, OncoKB, OncoKBSuggestAnnotationLinkout, OncoKbFeedback, OncoKbHelper, OncoKbTooltip, OncoKbTreatmentTable, OtherBiomarkersQueryType, ProteinChange, ProteinImpactTypeBadgeSelector, ProteinImpactTypeDropdownSelector, RefComponent, ReferenceList, LollipopPlot as Sequence, Signal, SignalTable, SummaryWithRefs, TEXT_INPUT_FILTER_ID, TMB_H_NAME, TrackName, TrackSelector, USE_DEFAULT_PUBLIC_INSTANCE_FOR_ONCOKB, sortValue$4 as annotationSortValue, applyDataFilters, applyDataFiltersOnDatum, applyDefaultMutationFilter, applyDefaultMutationStatusFilter, applyDefaultPositionFilter, applyDefaultProteinImpactTypeFilter, calculateGnomadAlleleFrequency, download as civicDownload, sortValue as civicSortValue, download$3 as clinvarDownload, sortValue$5 as clinvarSortValue, download$4 as dbsnpDownload, sortValue$6 as dbsnpSortValue, defaultOncoKbFilter, errorIcon, fetchVariantAnnotationsByMutation, fetchVariantAnnotationsIndexedByGenomicLocation, findAllUniquePositions, findNonTextInputFilters, findOneMutationFilterValue, findTextInputFilter, getAllOptionValues, getAnnotationData, getClinvarData, getColorForProteinImpactType, getGnomadData, getHgvscColumnData, getHgvsgColumnData, getProteinImpactTypeBadgeLabel, getProteinImpactTypeOptionLabel, getSelectedOptionValues, getSignalData, getSignalValue, getUrl, download$5 as gnomadDownload, sortValue$7 as gnomadSortValue, groupDataByGroupFilters, groupDataByProteinImpactType, groupOncoKbIndicatorDataByMutations, handleOptionSelect, download$6 as hgvscDownload, sortValue$8 as hgvscSortValue, sortValue$3 as hotspotAnnotationSortValue, includesSearchTextIgnoreCase, indexPositions, initDefaultMutationMapperStore, initDefaultTrackVisibility, initGenomeNexusClient, initGenomeNexusInternalClient, initOncoKbClient, levelIconClassNames, loaderIcon, mergeColumns, mutationTypeSort, download$1 as myCancerGenomeDownload, sortValue$1 as myCancerGenomeSortValue, normalizeLevel, onFilterOptionSelect, download$2 as oncoKbAnnotationDownload, sortValue$2 as oncoKbAnnotationSortValue, oncogenicityIconClassNames, proteinChangeSortMethod, rightAlignedCell, download$7 as signalDownload, getSortValue as signalSortValue, updatePositionHighlightFilters, updatePositionRangeHighlightFilters, updatePositionSelectionFilters };
12898
+ export { Annotation, BadgeLabel, BadgeSelector, Civic, ClinvarInterpretation, ClinvarSummary, ColumnHeader, ColumnSelector, ColumnSortDirection, DEFAULT_ANNOTATION_DATA, DEFAULT_GENOME_NEXUS_URL, DEFAULT_MUTATION_ALIGNER_PROXY_URL_TEMPLATE, DEFAULT_MUTATION_ALIGNER_URL_TEMPLATE, DEFAULT_MUTATION_COLUMNS, DEFAULT_MY_GENE_URL_TEMPLATE, DEFAULT_ONCO_KB_URL, DEFAULT_PROTEIN_IMPACT_TYPE_COLORS, DEFAULT_UNIPROT_ID_URL_TEMPLATE, DataFilterType, DataTable, Dbsnp, DbsnpId, DefaultMutationMapperDataFetcher, DefaultMutationMapperDataStore, DefaultMutationMapperFilterApplier, DefaultMutationMapperStore, DefaultMutationTable, Domain, DropdownSelector, FilterResetPanel, GenericAnnotation, Gnomad, GnomadFrequency, GnomadFrequencyBreakdown, GnomadFrequencyTable, GnomadFrequencyValue, Hgvsc, Hgvsg, HotspotAnnotation, HotspotInfo, Lollipop, LollipopMutationPlot, LollipopPlot, LollipopPlotNoTooltip, MSI_H_NAME, MUTATION_COLUMNS_DEFINITION, MUTATION_COLUMN_HEADERS, MUTATION_STATUS_BADGE_STYLE_OVERRIDE, MUTATION_TYPE_PRIORITY, MutationColumn, MutationColumnName, MutationMapper, MutationStatus, MutationStatusBadgeSelector, MyCancerGenome, ONCOKB_DEFAULT_DATA, ONCOKB_DEFAULT_INFO, OTHER_BIOMARKER_HUGO_SYMBOL, OTHER_BIOMARKER_NAME, OncoKB, OncoKBSuggestAnnotationLinkout, OncoKbFeedback, OncoKbHelper, OncoKbTooltip, OncoKbTreatmentTable, OtherBiomarkersQueryType, ProteinChange, ProteinImpactTypeBadgeSelector, ProteinImpactTypeDropdownSelector, RefComponent, ReferenceList, LollipopPlot as Sequence, Signal, SignalTable, SummaryWithRefs, TEXT_INPUT_FILTER_ID, TMB_H_NAME, TrackName, TrackSelector, USE_DEFAULT_PUBLIC_INSTANCE_FOR_ONCOKB, sortValue$4 as annotationSortValue, applyDataFilters, applyDataFiltersOnDatum, applyDefaultMutationFilter, applyDefaultMutationStatusFilter, applyDefaultPositionFilter, applyDefaultProteinImpactTypeFilter, calculateGnomadAlleleFrequency, download as civicDownload, sortValue as civicSortValue, download$3 as clinvarDownload, sortValue$5 as clinvarSortValue, download$4 as dbsnpDownload, sortValue$6 as dbsnpSortValue, defaultOncoKbFilter, errorIcon, fetchVariantAnnotationsByMutation, fetchVariantAnnotationsIndexedByGenomicLocation, findAllUniquePositions, findNonTextInputFilters, findOneMutationFilterValue, findTextInputFilter, getAllOptionValues, getAnnotationData, getClinvarData, getColorForProteinImpactType, getGnomadData, getHgvscColumnData, getHgvsgColumnData, getProteinImpactTypeBadgeLabel, getProteinImpactTypeOptionLabel, getSelectedOptionValues, getSignalData, getSingleSignalValue, getUrl, download$5 as gnomadDownload, sortValue$7 as gnomadSortValue, groupDataByGroupFilters, groupDataByProteinImpactType, groupOncoKbIndicatorDataByMutations, handleOptionSelect, download$6 as hgvscDownload, sortValue$8 as hgvscSortValue, sortValue$3 as hotspotAnnotationSortValue, includesSearchTextIgnoreCase, indexPositions, initDefaultMutationMapperStore, initDefaultTrackVisibility, initGenomeNexusClient, initGenomeNexusInternalClient, initOncoKbClient, levelIconClassNames, loaderIcon, mergeColumns, mutationTypeSort, download$1 as myCancerGenomeDownload, sortValue$1 as myCancerGenomeSortValue, normalizeLevel, onFilterOptionSelect, download$2 as oncoKbAnnotationDownload, sortValue$2 as oncoKbAnnotationSortValue, oncogenicityIconClassNames, proteinChangeSortMethod, rightAlignedCell, download$7 as signalDownload, getSortValue as signalSortValue, updatePositionHighlightFilters, updatePositionRangeHighlightFilters, updatePositionSelectionFilters };
12789
12899
  //# sourceMappingURL=index.es.js.map