react-mutation-mapper 0.8.47 → 0.8.50

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.
@@ -11,7 +11,7 @@ declare type MutationStatusProps = {
11
11
  [mutationStatus: string]: React.CSSProperties;
12
12
  };
13
13
  };
14
- export default class MutationStatus extends React.Component<MutationStatusProps, {}> {
14
+ export declare class MutationStatus extends React.Component<MutationStatusProps, {}> {
15
15
  static defaultProps: Partial<MutationStatusProps>;
16
16
  render(): JSX.Element;
17
17
  }
package/dist/index.d.ts CHANGED
@@ -12,7 +12,7 @@ export { default as MyCancerGenome, download as myCancerGenomeDownload, sortValu
12
12
  export { default as Hgvsc, download as hgvscDownload, sortValue as hgvscSortValue, } from './component/column/Hgvsc';
13
13
  export { default as Hgvsg } from './component/column/Hgvsg';
14
14
  export * from './component/column/HgvsHelper';
15
- export { default as MutationStatus } from './component/column/MutationStatus';
15
+ export { MutationStatus } from './component/column/MutationStatus';
16
16
  export { default as ProteinChange, proteinChangeSortMethod, } from './component/column/ProteinChange';
17
17
  export { default as Signal, getSignalData, getSortValue as signalSortValue, download as signalDownload, getSingleSignalValue, SignalTable, } from './component/column/Signal';
18
18
  export { default as DropdownSelector, DropdownSelectorProps, } from './component/filter/DropdownSelector';
package/dist/index.es.js CHANGED
@@ -6,7 +6,7 @@ import { observer } from 'mobx-react';
6
6
  import * as React from 'react';
7
7
  import React__default, { useState } from 'react';
8
8
  import { DefaultTooltip, TruncatedText, getNCBIlink, trimOffHtmlTagEntities, cachePostMethodsOnClient, CanonicalMutationType, MutationTumorTypeFrequencyTable, FREQUENCY_COLUMNS_DEFINITION, FrequencyTableColumnEnum, CheckedSelect, getSelectedValuesMap, Checklist, MUT_COLOR_MISSENSE, MUT_COLOR_MISSENSE_PASSENGER, MUT_COLOR_INFRAME, MUT_COLOR_INFRAME_PASSENGER, MUT_COLOR_TRUNC, MUT_COLOR_TRUNC_PASSENGER, MUT_COLOR_SPLICE, MUT_COLOR_SPLICE_PASSENGER, STRUCTURAL_VARIANT_COLOR, STRUCTURAL_VARIANT_PASSENGER_COLOR, MUT_COLOR_OTHER, getCanonicalMutationType, getProteinImpactTypeFromCanonical, ProteinImpactType, getProteinImpactType, resolveColumnVisibility, resolveColumnVisibilityByColumnDefinition, longestCommonStartingSubstring, getTextWidth, unhoverAllComponents, SVGAxis, getComponentIndex, defaultHitzoneConfig, initHitZoneFromConfig, EditableSpan, DownloadControls, EllipsisTextTooltip, remoteData, WindowWrapper } from 'cbioportal-frontend-commons';
9
- import { CIVIC_NA_VALUE, generateQueryVariantId, OncoKbCardDataType, parseMyCancerGenomeLink, defaultArraySortMethod, defaultSortMethod, LEVELS, uniqueGenomicLocations, indexAnnotationsByGenomicLocation, getCivicEntry, getRemoteDataGroupStatus, getMyCancerGenomeLinks, isLinearClusterHotspot, is3dHotspot, calculateOncoKbAvailableDataType, getVariantAnnotation, getDbsnpRsId, getMyVariantInfoAnnotation, generateHgvsgByMutation, calcProteinChangeSortValue, Pathogenicity, extendMutations, formatNumberValueInSignificantDigits, generateTumorTypeDecomposition, formatPercentValue, countMutationsByProteinChange, numberOfLeadingDecimalZeros, filterLinearClusterHotspotsByMutations, filter3dHotspotsByMutations, isHotspot, defaultHotspotFilter, defaultStringArraySortMethod, extractExonInformation, formatExonLocation, formatExonLength, ptmColor, compareByPtmTypePriority, UniprotTopologyTrackToColor, UniprotTopologyTypeToTitle, PtmSource, PTM_SOURCE_URL, getMyVariantInfoAnnotationsFromIndexedVariantAnnotations, generateProteinChangeQuery, StructuralVariantType, generateAnnotateStructuralVariantQuery, getMyCancerGenomeData, genomicLocationString, convertUniprotFeatureToPtm, convertDbPtmToPtm, UniprotCategory, convertUniprotFeatureToUniprotTopology, groupPtmDataByPosition, groupPtmDataByTypeAndPosition, groupCancerHotspotDataByPosition, indexHotspotsData, fetchCivicGenes, fetchCivicVariants, getMutationsByTranscriptId, groupMutationsByProteinStartPos, groupHotspotsByMutations } from 'cbioportal-utils';
9
+ import { CIVIC_NA_VALUE, deriveStructuralVariantType, generateQueryStructuralVariantId, generateQueryVariantId, OncoKbCardDataType, parseMyCancerGenomeLink, defaultArraySortMethod, defaultSortMethod, LEVELS, uniqueGenomicLocations, indexAnnotationsByGenomicLocation, getCivicEntry, getRemoteDataGroupStatus, getMyCancerGenomeLinks, isLinearClusterHotspot, is3dHotspot, calculateOncoKbAvailableDataType, getVariantAnnotation, getDbsnpRsId, getMyVariantInfoAnnotation, generateHgvsgByMutation, calcProteinChangeSortValue, Pathogenicity, extendMutations, formatNumberValueInSignificantDigits, generateTumorTypeDecomposition, formatPercentValue, countMutationsByProteinChange, numberOfLeadingDecimalZeros, filterLinearClusterHotspotsByMutations, filter3dHotspotsByMutations, isHotspot, defaultHotspotFilter, defaultStringArraySortMethod, extractExonInformation, formatExonLocation, formatExonLength, ptmColor, compareByPtmTypePriority, UniprotTopologyTrackToColor, UniprotTopologyTypeToTitle, PtmSource, PTM_SOURCE_URL, getMyVariantInfoAnnotationsFromIndexedVariantAnnotations, generateProteinChangeQuery, StructuralVariantType, generateAnnotateStructuralVariantQuery, getMyCancerGenomeData, genomicLocationString, convertUniprotFeatureToPtm, convertDbPtmToPtm, UniprotCategory, convertUniprotFeatureToUniprotTopology, groupPtmDataByPosition, groupPtmDataByTypeAndPosition, groupCancerHotspotDataByPosition, indexHotspotsData, fetchCivicGenes, fetchCivicVariants, getMutationsByTranscriptId, groupMutationsByProteinStartPos, groupHotspotsByMutations } from 'cbioportal-utils';
10
10
  import classnames from 'classnames';
11
11
  import autobind from 'autobind-decorator';
12
12
  import oncoKbLogoImgSrc from 'oncokb-styles/dist/images/logo/oncokb.svg';
@@ -472,7 +472,16 @@ function getIndicatorData(mutation, oncoKbData, getTumorType, getEntrezGeneId) {
472
472
  if (oncoKbData.indicatorMap === null) {
473
473
  return undefined;
474
474
  }
475
- var id = generateQueryVariantId(getEntrezGeneId(mutation), getTumorType(mutation), mutation.proteinChange, mutation.mutationType);
475
+ var id = '';
476
+ // @ts-ignore
477
+ var sv = mutation.structuralVariant;
478
+ if (sv) {
479
+ var structuralVariantType = deriveStructuralVariantType(sv);
480
+ id = generateQueryStructuralVariantId(sv.site1EntrezGeneId, sv.site2EntrezGeneId, getTumorType(mutation), structuralVariantType);
481
+ }
482
+ else {
483
+ id = generateQueryVariantId(getEntrezGeneId(mutation), getTumorType(mutation), mutation.proteinChange, mutation.mutationType);
484
+ }
476
485
  return oncoKbData.indicatorMap[id];
477
486
  }
478
487
  function defaultOncoKbIndicatorFilter(indicator) {
@@ -1910,7 +1919,7 @@ var HotspotInfo = function (props) {
1910
1919
 
1911
1920
  var img$1 = "data:image/svg+xml,%3c%3fxml version='1.0' encoding='utf-8'%3f%3e%3c!-- Generated by IcoMoon.io --%3e%3c!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='1024' height='1024' viewBox='0 0 1024 1024'%3e %3cg id='icomoon-ignore'%3e %3c/g%3e %3cpath fill='%23ff9900' d='M321.008 1045.333c-68.245-142.008-31.901-223.379 20.551-300.044 57.44-83.956 72.244-167.065 72.244-167.065s45.153 58.7 27.092 150.508c79.772-88.8 94.824-230.28 82.783-284.464 180.315 126.012 257.376 398.856 153.523 601.065 552.372-312.532 137.399-780.172 65.155-832.851 24.081 52.676 28.648 141.851-20 185.127-82.352-312.276-285.972-376.276-285.972-376.276 24.083 161.044-87.296 337.144-194.696 468.731-3.775-64.216-7.783-108.528-41.549-169.98-7.58 116.656-96.732 211.748-120.873 328.628-32.701 158.287 24.496 274.18 241.748 396.623z'%3e%3c/path%3e%3c/svg%3e";
1912
1921
 
1913
- var img = "data:image/svg+xml,%3c%3fxml version='1.0' encoding='utf-8'%3f%3e%3c!-- Generator: Adobe Illustrator 16.0.4%2c SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3e%3c!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='24.263px' height='36.366px' viewBox='0 0 24.263 36.366' enable-background='new 0 0 24.263 36.366' xml:space='preserve'%3e%3cg%3e %3cpath fill='%23FF9900' d='M6.828%2c27.947c-1.859-3.872-0.869-6.094%2c0.564-8.184c1.565-2.296%2c1.968-4.558%2c1.968-4.558 s1.231%2c1.6%2c0.742%2c4.104c2.181-2.423%2c2.591-6.286%2c2.256-7.764c4.921%2c3.436%2c7.027%2c10.889%2c4.19%2c16.401 C31.627%2c19.419%2c20.3%2c6.66%2c18.326%2c5.221c0.656%2c1.439%2c0.783%2c3.873-0.546%2c5.053C15.536%2c1.75%2c9.98%2c0%2c9.98%2c0 c0.657%2c4.397-2.388%2c9.208-5.316%2c12.8C4.56%2c11.046%2c4.451%2c9.831%2c3.53%2c8.155c-0.201%2c3.183-2.636%2c5.785-3.298%2c8.974 C-0.659%2c21.445%2c0.9%2c24.61%2c6.828%2c27.947L6.828%2c27.947z'/%3e %3ctext transform='matrix(0.583 0 0 0.583 3.7324 36.1963)' fill='black' font-family=''Arial-BoldItalicMT'' font-size='20.6802'%3e3D%3c/text%3e%3c/g%3e%3c/svg%3e";
1922
+ var img = "data:image/svg+xml,%3c%3fxml version='1.0' encoding='utf-8'%3f%3e%3c!-- Generator: Adobe Illustrator 16.0.4%2c SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3e%3c!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='24.263px' height='36.366px' viewBox='0 0 24.263 36.366' enable-background='new 0 0 24.263 36.366' xml:space='preserve'%3e%3cg%3e %3cpath fill='%23FF9900' d='M6.828%2c27.947c-1.859-3.872-0.869-6.094%2c0.564-8.184c1.565-2.296%2c1.968-4.558%2c1.968-4.558 s1.231%2c1.6%2c0.742%2c4.104c2.181-2.423%2c2.591-6.286%2c2.256-7.764c4.921%2c3.436%2c7.027%2c10.889%2c4.19%2c16.401 C31.627%2c19.419%2c20.3%2c6.66%2c18.326%2c5.221c0.656%2c1.439%2c0.783%2c3.873-0.546%2c5.053C15.536%2c1.75%2c9.98%2c0%2c9.98%2c0 c0.657%2c4.397-2.388%2c9.208-5.316%2c12.8C4.56%2c11.046%2c4.451%2c9.831%2c3.53%2c8.155c-0.201%2c3.183-2.636%2c5.785-3.298%2c8.974 C-0.659%2c21.445%2c0.9%2c24.61%2c6.828%2c27.947L6.828%2c27.947z'/%3e %3ctext transform='matrix(0.583 0 0 0.583 3.7324 36.1963)' fill='black' font-family='Arial-BoldItalicMT' font-size='20.6802'%3e3D%3c/text%3e%3c/g%3e%3c/svg%3e";
1914
1923
 
1915
1924
  function sortValue$5(isHotspot, is3dHotspot) {
1916
1925
  var score = 0;
@@ -1967,7 +1976,7 @@ var HotspotAnnotation = /** @class */ (function (_super) {
1967
1976
  var DEFAULT_MUTATION_ALIGNER_URL_TEMPLATE = 'http://mutationaligner.org/api/domains/<%= pfamDomainId %>?metadata=true';
1968
1977
  var DEFAULT_MUTATION_ALIGNER_PROXY_URL_TEMPLATE = 'https://www.cbioportal.org/proxy/mutationaligner.org/api/domains/<%= pfamDomainId %>?metadata=true';
1969
1978
  var DEFAULT_MY_GENE_URL_TEMPLATE = 'https://mygene.info/v3/gene/<%= entrezGeneId %>?fields=uniprot';
1970
- var DEFAULT_UNIPROT_ID_URL_TEMPLATE = 'https://www.uniprot.org/uniprot/?query=accession:<%= swissProtAccession %>&format=tab&columns=entry+name';
1979
+ var DEFAULT_UNIPROT_ID_URL_TEMPLATE = 'https://rest.uniprot.org/uniprotkb/search?query=accession:<%= swissProtAccession %>&format=tsv&fields=id';
1971
1980
  var DEFAULT_GENOME_NEXUS_URL = 'https://www.genomenexus.org/';
1972
1981
  // The legacy instance does not require an authentication but the data will not be update.
1973
1982
  var DEFAULT_ONCO_KB_URL = 'https://legacy.oncokb.org/';
@@ -9799,7 +9808,7 @@ var LollipopMutationPlot = /** @class */ (function (_super) {
9799
9808
  writable: true,
9800
9809
  value: function () {
9801
9810
  return (React.createElement("div", { style: { maxWidth: 200 } },
9802
- React.createElement("a", { href: "http://www.uniprot.org/uniprot/" + this.props.store.uniprotId.result, target: "_blank" }, this.props.store.uniprotId.result)));
9811
+ React.createElement("a", { href: "https://www.uniprot.org/uniprot/" + this.props.store.uniprotId.result, target: "_blank" }, this.props.store.uniprotId.result)));
9803
9812
  }
9804
9813
  });
9805
9814
  Object.defineProperty(LollipopMutationPlot.prototype, "sequence", {
@@ -10827,7 +10836,9 @@ var DefaultMutationMapperDataFetcher = /** @class */ (function () {
10827
10836
  return ((_a = mutation.mutationType) === null || _a === void 0 ? void 0 : _a.toUpperCase()) ===
10828
10837
  StructuralVariantType.FUSION;
10829
10838
  }), function (mutation) {
10830
- return generateAnnotateStructuralVariantQuery(getEntrezGeneId(mutation), getTumorType(mutation), mutation.proteinChange, mutation.mutationType, evidenceTypes);
10839
+ return generateAnnotateStructuralVariantQuery(
10840
+ /* @ts-ignore */
10841
+ mutation.structuralVariant, getTumorType(mutation), evidenceTypes);
10831
10842
  }), 'id');
10832
10843
  if (!(mutationQueryVariants.length === 0)) return [3 /*break*/, 1];
10833
10844
  _a = [];
@@ -12303,7 +12314,7 @@ var GeneSummaryInfo = function (_a) {
12303
12314
  DATA: ccdsId,
12304
12315
  },
12305
12316
  }), target: "_blank" }, ccdsId)) : ('-');
12306
- var uniprot = uniprotId ? (React.createElement("a", { href: "http://www.uniprot.org/uniprot/" + uniprotId, target: "_blank" }, uniprotId)) : ('-');
12317
+ var uniprot = uniprotId ? (React.createElement("a", { href: "https://www.uniprot.org/uniprot/" + uniprotId, target: "_blank" }, uniprotId)) : ('-');
12307
12318
  var compactGeneSummaryInfo = (React.createElement("div", null,
12308
12319
  React.createElement("span", { "data-test": "compactGeneSummaryRefSeq" }, refSeq), " | ",
12309
12320
  ensembl,