react-mutation-mapper 0.8.88 → 0.8.90

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.
@@ -25,6 +25,7 @@ export declare type AnnotationProps = {
25
25
  [genomicLocation: string]: VariantAnnotation;
26
26
  } | undefined>;
27
27
  userDisplayName?: string;
28
+ hasMultipleCancerTypes?: boolean;
28
29
  };
29
30
  export declare type GenericAnnotationProps = {
30
31
  annotation: IAnnotation;
@@ -37,6 +38,7 @@ export declare type GenericAnnotationProps = {
37
38
  oncoKbContentPadding?: number;
38
39
  pubMedCache?: MobxCache;
39
40
  userDisplayName?: string;
41
+ hasMultipleCancerTypes?: boolean;
40
42
  };
41
43
  export interface IAnnotation {
42
44
  isHotspot: boolean;
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  declare type FilterResetPanelProps = {
3
3
  resetFilters: () => void;
4
4
  filterInfo?: JSX.Element | string;
5
+ additionalInfo?: JSX.Element | string;
5
6
  className?: string;
6
7
  buttonText?: string;
7
8
  buttonClass?: string;
@@ -0,0 +1,2 @@
1
+ import { DataFilter } from '../model/DataFilter';
2
+ export declare type ProteinChangeFilter = DataFilter<string>;
package/dist/index.es.js CHANGED
@@ -738,9 +738,9 @@ function sortValue$4(annotation) {
738
738
  ]);
739
739
  }
740
740
  function GenericAnnotation(props) {
741
- var annotation = props.annotation, enableCivic = props.enableCivic, enableHotspot = props.enableHotspot, enableMyCancerGenome = props.enableMyCancerGenome, enableOncoKb = props.enableOncoKb, enableRevue = props.enableRevue; props.pubMedCache; var userDisplayName = props.userDisplayName, mergeOncoKbIcons = props.mergeOncoKbIcons, oncoKbContentPadding = props.oncoKbContentPadding;
741
+ var annotation = props.annotation, enableCivic = props.enableCivic, enableHotspot = props.enableHotspot, enableMyCancerGenome = props.enableMyCancerGenome, enableOncoKb = props.enableOncoKb, enableRevue = props.enableRevue; props.pubMedCache; var userDisplayName = props.userDisplayName, mergeOncoKbIcons = props.mergeOncoKbIcons, oncoKbContentPadding = props.oncoKbContentPadding, hasMultipleCancerTypes = props.hasMultipleCancerTypes;
742
742
  return (React.createElement("span", { style: { display: 'flex', minWidth: 100 } },
743
- enableOncoKb && (React.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, userDisplayName: userDisplayName, contentPadding: oncoKbContentPadding })),
743
+ enableOncoKb && (React.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, userDisplayName: userDisplayName, contentPadding: oncoKbContentPadding, hasMultipleCancerTypes: hasMultipleCancerTypes })),
744
744
  enableRevue ? (annotation.vue ? (React.createElement(RevueCell, { vue: annotation.vue })) : (React.createElement("span", { className: "" + annotationStyles['annotation-item'] }))) : (React.createElement(React.Fragment, null)),
745
745
  enableCivic && (React.createElement(Civic, { civicEntry: annotation.civicEntry, civicStatus: annotation.civicStatus, hasCivicVariants: annotation.hasCivicVariants })),
746
746
  enableMyCancerGenome && (React.createElement(MyCancerGenome, { linksHTML: annotation.myCancerGenomeLinks })),
@@ -2581,8 +2581,10 @@ var FilterResetPanel = /** @class */ (function (_super) {
2581
2581
  value: function () {
2582
2582
  return (React.createElement("div", { className: this.props.className, "data-test": "filter-reset-panel" },
2583
2583
  React.createElement("span", { style: { verticalAlign: 'middle' } },
2584
- this.props.filterInfo,
2585
- React.createElement("button", { className: this.props.buttonClass, style: { cursor: 'pointer', marginLeft: 6 }, onClick: this.props.resetFilters }, this.props.buttonText))));
2584
+ React.createElement("strong", null, this.props.filterInfo),
2585
+ React.createElement("button", { className: this.props.buttonClass, style: { cursor: 'pointer', marginLeft: 6 }, onClick: this.props.resetFilters }, this.props.buttonText),
2586
+ React.createElement("br", null),
2587
+ this.props.additionalInfo)));
2586
2588
  }
2587
2589
  });
2588
2590
  Object.defineProperty(FilterResetPanel, "defaultProps", {
@@ -2610,6 +2612,7 @@ var DataFilterType;
2610
2612
  DataFilterType["CANCER_TYPE"] = "cancerType";
2611
2613
  DataFilterType["PROTEIN_IMPACT_TYPE"] = "proteinImpactType";
2612
2614
  DataFilterType["MUTATION_STATUS"] = "mutationStatus";
2615
+ DataFilterType["PROTEIN_CHANGE"] = "proteinChange";
2613
2616
  })(DataFilterType || (DataFilterType = {}));
2614
2617
 
2615
2618
  var TEXT_INPUT_FILTER_ID = '_mutationTableTextInputFilter_';
@@ -2692,6 +2695,12 @@ function applyDefaultPositionFilter(filter, mutation) {
2692
2695
  function applyDefaultProteinImpactTypeFilter(filter, mutation) {
2693
2696
  return filter.values.includes(getProteinImpactType(mutation.mutationType || 'other'));
2694
2697
  }
2698
+ function applyDefaultProteinChangeFilter(filter, mutation) {
2699
+ return (mutation.proteinChange !== undefined &&
2700
+ ___default.some(filter.values, function (value) {
2701
+ return value.toLowerCase() === mutation.proteinChange.toLowerCase();
2702
+ }));
2703
+ }
2695
2704
  function applyDefaultMutationStatusFilter(filter, mutation) {
2696
2705
  return (mutation.mutationStatus !== undefined &&
2697
2706
  ___default.some(filter.values, function (value) {
@@ -5965,7 +5974,6 @@ var PercentToggle = /** @class */ (function (_super) {
5965
5974
  } },
5966
5975
  React.createElement("div", { style: {
5967
5976
  marginLeft: 10,
5968
- marginRight: 10,
5969
5977
  } },
5970
5978
  React.createElement("div", { style: { textAlign: 'center' } }, "Y-Axis:"),
5971
5979
  React.createElement(AxisScaleSwitch, { selectedScale: this.props.axisMode, onChange: this.props.onScaleToggle }))));
@@ -9540,7 +9548,7 @@ var DefaultMutationMapperFilterApplier = /** @class */ (function () {
9540
9548
  get: function () {
9541
9549
  var _a;
9542
9550
  return __assign((_a = {}, _a[DataFilterType.POSITION] = this.applyPositionFilter, _a[DataFilterType.ONCOKB] = this.applyOncoKbFilter, _a[DataFilterType.HOTSPOT] = this.applyHostpotFilter, _a[DataFilterType.MUTATION] = this.applyMutationFilter, _a[DataFilterType.PROTEIN_IMPACT_TYPE] = this
9543
- .applyProteinImpactTypeFilter, _a[DataFilterType.MUTATION_STATUS] = this.applyMutationStatusFilter, _a), this.filterAppliersOverride);
9551
+ .applyProteinImpactTypeFilter, _a[DataFilterType.MUTATION_STATUS] = this.applyMutationStatusFilter, _a[DataFilterType.PROTEIN_CHANGE] = this.applyProteinChangeFilter, _a), this.filterAppliersOverride);
9544
9552
  },
9545
9553
  enumerable: false,
9546
9554
  configurable: true
@@ -9609,6 +9617,14 @@ var DefaultMutationMapperFilterApplier = /** @class */ (function () {
9609
9617
  return applyDefaultMutationStatusFilter(filter, mutation);
9610
9618
  }
9611
9619
  });
9620
+ Object.defineProperty(DefaultMutationMapperFilterApplier.prototype, "applyProteinChangeFilter", {
9621
+ enumerable: false,
9622
+ configurable: true,
9623
+ writable: true,
9624
+ value: function (filter, mutation) {
9625
+ return applyDefaultProteinChangeFilter(filter, mutation);
9626
+ }
9627
+ });
9612
9628
  __decorate([
9613
9629
  autobind
9614
9630
  ], DefaultMutationMapperFilterApplier.prototype, "applyFilter", null);
@@ -9630,6 +9646,9 @@ var DefaultMutationMapperFilterApplier = /** @class */ (function () {
9630
9646
  __decorate([
9631
9647
  autobind
9632
9648
  ], DefaultMutationMapperFilterApplier.prototype, "applyMutationStatusFilter", null);
9649
+ __decorate([
9650
+ autobind
9651
+ ], DefaultMutationMapperFilterApplier.prototype, "applyProteinChangeFilter", null);
9633
9652
  return DefaultMutationMapperFilterApplier;
9634
9653
  }());
9635
9654
 
@@ -11466,5 +11485,5 @@ var MutationMapper = /** @class */ (function (_super) {
11466
11485
  return MutationMapper;
11467
11486
  }(React.Component));
11468
11487
 
11469
- export { Annotation, AxisScale, AxisScaleSwitch, 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, LollipopTooltipCountInfo, 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, PercentToggle, ProteinChange, ProteinImpactTypeBadgeSelector, ProteinImpactTypeDropdownSelector, RevueCell, RevueTooltipContent, LollipopPlot as Sequence, Signal, SignalTable, TEXT_INPUT_FILTER_ID, TrackName, TrackSelector, USE_DEFAULT_PUBLIC_INSTANCE_FOR_ONCOKB, sortValue$4 as annotationSortValue, applyDataFilters, applyDataFiltersOnDatum, applyDefaultMutationFilter, applyDefaultMutationStatusFilter, applyDefaultPositionFilter, applyDefaultProteinImpactTypeFilter, calculateGnomadAlleleFrequency, download$6 as civicDownload, sortValue$8 as civicSortValue, download$4 as clinvarDownload, sortValue$3 as clinvarSortValue, download$3 as dbsnpDownload, sortValue$2 as dbsnpSortValue, fetchVariantAnnotationsByMutation, fetchVariantAnnotationsIndexedByGenomicLocation, findAllUniquePositions, findNonTextInputFilters, findOneMutationFilterValue, findTextInputFilter, getAllOptionValues, getAnnotationData, getClinvarData, getColorForProteinImpactType, getGnomadData, getHgvscColumnData, getHgvsgColumnData, getProteinImpactTypeBadgeLabel, getProteinImpactTypeOptionLabel, getSelectedOptionValues, getSignalData, getSingleSignalValue, getUrl, download$2 as gnomadDownload, sortValue$1 as gnomadSortValue, groupDataByGroupFilters, groupDataByProteinImpactType, handleOptionSelect, download$1 as hgvscDownload, sortValue as hgvscSortValue, sortValue$6 as hotspotAnnotationSortValue, includesSearchTextIgnoreCase, indexPositions, initDefaultMutationMapperStore, initDefaultTrackVisibility, initGenomeNexusClient, initGenomeNexusInternalClient, initOncoKbClient, mergeColumns, mutationTypeSort, download$5 as myCancerGenomeDownload, sortValue$7 as myCancerGenomeSortValue, onFilterOptionSelect, proteinChangeSortMethod, rightAlignedCell, download as signalDownload, getSortValue as signalSortValue, updatePositionHighlightFilters, updatePositionRangeHighlightFilters, updatePositionSelectionFilters };
11488
+ export { Annotation, AxisScale, AxisScaleSwitch, 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, LollipopTooltipCountInfo, 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, PercentToggle, ProteinChange, ProteinImpactTypeBadgeSelector, ProteinImpactTypeDropdownSelector, RevueCell, RevueTooltipContent, LollipopPlot as Sequence, Signal, SignalTable, TEXT_INPUT_FILTER_ID, TrackName, TrackSelector, USE_DEFAULT_PUBLIC_INSTANCE_FOR_ONCOKB, sortValue$4 as annotationSortValue, applyDataFilters, applyDataFiltersOnDatum, applyDefaultMutationFilter, applyDefaultMutationStatusFilter, applyDefaultPositionFilter, applyDefaultProteinChangeFilter, applyDefaultProteinImpactTypeFilter, calculateGnomadAlleleFrequency, download$6 as civicDownload, sortValue$8 as civicSortValue, download$4 as clinvarDownload, sortValue$3 as clinvarSortValue, download$3 as dbsnpDownload, sortValue$2 as dbsnpSortValue, fetchVariantAnnotationsByMutation, fetchVariantAnnotationsIndexedByGenomicLocation, findAllUniquePositions, findNonTextInputFilters, findOneMutationFilterValue, findTextInputFilter, getAllOptionValues, getAnnotationData, getClinvarData, getColorForProteinImpactType, getGnomadData, getHgvscColumnData, getHgvsgColumnData, getProteinImpactTypeBadgeLabel, getProteinImpactTypeOptionLabel, getSelectedOptionValues, getSignalData, getSingleSignalValue, getUrl, download$2 as gnomadDownload, sortValue$1 as gnomadSortValue, groupDataByGroupFilters, groupDataByProteinImpactType, handleOptionSelect, download$1 as hgvscDownload, sortValue as hgvscSortValue, sortValue$6 as hotspotAnnotationSortValue, includesSearchTextIgnoreCase, indexPositions, initDefaultMutationMapperStore, initDefaultTrackVisibility, initGenomeNexusClient, initGenomeNexusInternalClient, initOncoKbClient, mergeColumns, mutationTypeSort, download$5 as myCancerGenomeDownload, sortValue$7 as myCancerGenomeSortValue, onFilterOptionSelect, proteinChangeSortMethod, rightAlignedCell, download as signalDownload, getSortValue as signalSortValue, updatePositionHighlightFilters, updatePositionRangeHighlightFilters, updatePositionSelectionFilters };
11470
11489
  //# sourceMappingURL=index.es.js.map