diff --git a/end-to-end-test/remote/screenshots/reference/excluding_unprofiled_samples_igv_tab_tab_element_chrome_1600x1000.png b/end-to-end-test/remote/screenshots/reference/excluding_unprofiled_samples_igv_tab_tab_element_chrome_1600x1000.png index c2ce037830d..b01e6f01999 100644 Binary files a/end-to-end-test/remote/screenshots/reference/excluding_unprofiled_samples_igv_tab_tab_element_chrome_1600x1000.png and b/end-to-end-test/remote/screenshots/reference/excluding_unprofiled_samples_igv_tab_tab_element_chrome_1600x1000.png differ diff --git a/end-to-end-test/remote/screenshots/reference/no_session_igv_tab_tab_element_chrome_1600x1000.png b/end-to-end-test/remote/screenshots/reference/no_session_igv_tab_tab_element_chrome_1600x1000.png index 32754bb079e..a5f4a4938c4 100644 Binary files a/end-to-end-test/remote/screenshots/reference/no_session_igv_tab_tab_element_chrome_1600x1000.png and b/end-to-end-test/remote/screenshots/reference/no_session_igv_tab_tab_element_chrome_1600x1000.png differ diff --git a/end-to-end-test/remote/screenshots/reference/results_view_comparison_tab_microbiome_signature_tab_two_groups_element_chrome_1600x1000.png b/end-to-end-test/remote/screenshots/reference/results_view_comparison_tab_microbiome_signature_tab_two_groups_element_chrome_1600x1000.png deleted file mode 100644 index 0d3f9dc14d5..00000000000 Binary files a/end-to-end-test/remote/screenshots/reference/results_view_comparison_tab_microbiome_signature_tab_two_groups_element_chrome_1600x1000.png and /dev/null differ diff --git a/end-to-end-test/remote/screenshots/reference/session_igv_tab_tab_element_chrome_1600x1000.png b/end-to-end-test/remote/screenshots/reference/session_igv_tab_tab_element_chrome_1600x1000.png index a156e1e329a..a5f4a4938c4 100644 Binary files a/end-to-end-test/remote/screenshots/reference/session_igv_tab_tab_element_chrome_1600x1000.png and b/end-to-end-test/remote/screenshots/reference/session_igv_tab_tab_element_chrome_1600x1000.png differ diff --git a/end-to-end-test/remote/specs/core/comparisonTab.screenshot.spec.js b/end-to-end-test/remote/specs/core/comparisonTab.screenshot.spec.js index 5022a132bf5..4a3adeab971 100644 --- a/end-to-end-test/remote/specs/core/comparisonTab.screenshot.spec.js +++ b/end-to-end-test/remote/specs/core/comparisonTab.screenshot.spec.js @@ -408,31 +408,6 @@ describe('results view comparison tab screenshot tests', () => { ); assertScreenShotMatch(res); }); - - it('results view comparison tab microbiome signature tab two groups', async () => { - await clickElement('button[data-test="groupSelectorButtonBRAF"]', { - timeout: 20000, - }); - - await ( - await getElement( - 'div[data-test="GroupComparisonMethylationEnrichments"]' - ) - ).waitForDisplayed({ timeout: 10000 }); - await waitForElementDisplayed('b=RER1', { timeout: 10000 }); - await clickElement('b=RER1'); - await (await getElement('body')).moveTo({ - x:0, y:0 - }); - const res = await browser.checkElement( - '.msk-tab:not(.hiddenByPosition)', - '', - { - hide: ['.qtip'], - } - ); - assertScreenShotMatch(res); - }); }); describe('delete group from session', () => { diff --git a/package.json b/package.json index 70907bc750a..bd98d278b40 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "cbioportal-frontend", "private": true, - "version": "3.3.285", + "version": "3.3.286", "workspaces": { "packages": [ ".", @@ -88,7 +88,7 @@ "@babel/plugin-transform-modules-commonjs": "^7.4.4", "@babel/preset-env": "^7.4.4", "@babel/preset-react": "^7.0.0", - "@datadog/browser-logs": "^5.4.0", + "@datadog/browser-logs": "^5.28.0", "@rollup/plugin-commonjs": "^22.0.0", "@rollup/plugin-image": "^2.1.1", "@rollup/plugin-json": "^4.1.0", @@ -159,10 +159,10 @@ "bootstrap-sass": "3.4.1", "bowser": "^1.7.1", "bundle-loader": "^0.5.4", - "cbioportal-clinical-timeline": "^0.3.85", - "cbioportal-frontend-commons": "^0.5.69", + "cbioportal-clinical-timeline": "^0.3.86", + "cbioportal-frontend-commons": "^0.5.70", "cbioportal-ts-api-client": "^0.9.73", - "cbioportal-utils": "^0.3.43", + "cbioportal-utils": "^0.3.44", "chart.js": "^2.6.0", "classnames": "^2.2.5", "clinical-timeline": "0.0.30", @@ -189,7 +189,7 @@ "fmin": "^0.0.2", "font-awesome": "^4.7.0", "fork-ts-checker-webpack-plugin": "^6.3.3", - "genome-nexus-ts-api-client": "^1.1.33", + "genome-nexus-ts-api-client": "^1.1.34", "git-revision-webpack-plugin": "^5.0.0", "history": "4.10.1", "html-webpack-plugin": "^5.3.2", @@ -227,7 +227,7 @@ "mobx-utils": "6.0.1", "numeral": "^2.0.6", "object-sizeof": "^1.2.0", - "oncokb-frontend-commons": "^0.0.27", + "oncokb-frontend-commons": "^0.0.28", "oncokb-styles": "~1.4.2", "oncokb-ts-api-client": "^1.3.6", "oncoprintjs": "^6.0.6", @@ -272,7 +272,7 @@ "react-markdown": "^7.0.1", "react-mfb": "^0.6.0", "react-motion": "^0.4.7", - "react-mutation-mapper": "^0.8.113", + "react-mutation-mapper": "^0.8.114", "react-overlays": "0.7.4", "react-portal": "^4.2.0", "react-rangeslider": "^2.1.0", diff --git a/packages/cbioportal-clinical-timeline/package.json b/packages/cbioportal-clinical-timeline/package.json index ee89aceba36..b50b0bfad10 100644 --- a/packages/cbioportal-clinical-timeline/package.json +++ b/packages/cbioportal-clinical-timeline/package.json @@ -1,7 +1,7 @@ { "name": "cbioportal-clinical-timeline", "description": "cBioPortal Clinical Timeline", - "version": "0.3.85", + "version": "0.3.86", "main": "dist/index.js", "module": "dist/index.es.js", "jsnext:main": "dist/index.es.js", @@ -39,7 +39,7 @@ }, "dependencies": { "autobind-decorator": "^2.1.0", - "cbioportal-frontend-commons": "^0.5.69", + "cbioportal-frontend-commons": "^0.5.70", "lodash": "^4.17.11", "react-bootstrap": "^0.31.5", "react-overlays": "0.7.4", diff --git a/packages/cbioportal-frontend-commons/package.json b/packages/cbioportal-frontend-commons/package.json index 4962e431caa..3cd0ee2117b 100644 --- a/packages/cbioportal-frontend-commons/package.json +++ b/packages/cbioportal-frontend-commons/package.json @@ -1,7 +1,7 @@ { "name": "cbioportal-frontend-commons", "description": "cBioPortal Frontend Modules", - "version": "0.5.69", + "version": "0.5.70", "main": "dist/index.js", "module": "dist/index.es.js", "jsnext:main": "dist/index.es.js", @@ -38,7 +38,7 @@ }, "dependencies": { "autobind-decorator": "^2.1.0", - "cbioportal-utils": "^0.3.43", + "cbioportal-utils": "^0.3.44", "classnames": "^2.2.5", "jquery": "^3.2.1", "juice": "^10.0.0", diff --git a/packages/cbioportal-utils/package.json b/packages/cbioportal-utils/package.json index 8729cecbd41..3bba273d41e 100644 --- a/packages/cbioportal-utils/package.json +++ b/packages/cbioportal-utils/package.json @@ -1,7 +1,7 @@ { "name": "cbioportal-utils", "description": "cBioPortal Utilities", - "version": "0.3.43", + "version": "0.3.44", "main": "dist/index.js", "module": "dist/index.es.js", "jsnext:main": "dist/index.es.js", @@ -30,7 +30,7 @@ }, "dependencies": { "buffer": "^6.0.3", - "genome-nexus-ts-api-client": "^1.1.33", + "genome-nexus-ts-api-client": "^1.1.34", "lodash": "^4.17.15", "oncokb-ts-api-client": "^1.3.6", "superagent": "^3.8.3", diff --git a/packages/genome-nexus-ts-api-client/package.json b/packages/genome-nexus-ts-api-client/package.json index 373788fe37a..9f8610dc7da 100644 --- a/packages/genome-nexus-ts-api-client/package.json +++ b/packages/genome-nexus-ts-api-client/package.json @@ -1,7 +1,7 @@ { "name": "genome-nexus-ts-api-client", "description": "Genome Nexus API Client for TypeScript", - "version": "1.1.33", + "version": "1.1.34", "main": "dist/index.js", "module": "dist/index.es.js", "jsnext:main": "dist/index.es.js", diff --git a/packages/genome-nexus-ts-api-client/src/generated/GenomeNexusAPI-docs.json b/packages/genome-nexus-ts-api-client/src/generated/GenomeNexusAPI-docs.json index a88b7a9ab2e..491e0aff186 100644 --- a/packages/genome-nexus-ts-api-client/src/generated/GenomeNexusAPI-docs.json +++ b/packages/genome-nexus-ts-api-client/src/generated/GenomeNexusAPI-docs.json @@ -2506,6 +2506,26 @@ } } }, + "IntergenicConsequenceSummary": { + "type": "object", + "properties": { + "consequenceTerms": { + "type": "array", + "items": { + "type": "string" + } + }, + "impact": { + "type": "string" + }, + "variantAllele": { + "type": "string" + }, + "variantClassification": { + "type": "string" + } + } + }, "IntergenicConsequences": { "type": "object", "required": [ @@ -2554,124 +2574,32 @@ }, "MutationAssessor": { "type": "object", - "required": [ - "input" - ], "properties": { - "codonStartPosition": { - "type": "string", - "description": "Codon start position" - }, - "cosmicCount": { - "type": "integer", - "format": "int32", - "description": "Number of mutations in COSMIC for this protein" - }, - "functionalImpact": { - "type": "string", - "description": "Functional impact" + "functionalImpactPrediction": { + "type": "string" }, "functionalImpactScore": { "type": "number", "format": "double", "description": "Functional impact score" }, - "hgvs": { + "hgvspShort": { "type": "string" }, - "hugoSymbol": { - "type": "string", - "description": "Hugo gene symbol" - }, - "input": { - "type": "string", - "description": "User-input variants" - }, - "mappingIssue": { - "type": "string", - "description": "Mapping issue info" - }, - "msaGaps": { - "type": "number", - "format": "double", - "description": "Portion of gaps in variant position in multiple sequence alignment" - }, - "msaHeight": { + "mav": { "type": "integer", - "format": "int32", - "description": "Number of diverse sequences in multiple sequence alignment (identical or highly similar sequences filtered out)" - }, - "msaLink": { - "type": "string", - "description": "Link to multiple sequence alignment" - }, - "pdbLink": { - "type": "string", - "description": "Link to 3d structure browser" - }, - "referenceGenomeVariant": { - "type": "string", - "description": "Reference genome variant" - }, - "referenceGenomeVariantType": { - "type": "string", - "description": "Reference genome variant type" - }, - "refseqId": { - "type": "string", - "description": "Refseq protein ID" - }, - "refseqPosition": { - "type": "integer", - "format": "int32", - "description": "Variant position in Refseq protein, can be different from the one in Uniprot" + "format": "int32" }, - "refseqResidue": { - "type": "string", - "description": "Reference residue in Refseq protein, can be different from the one in Uniprot" + "msa": { + "type": "string" }, - "snpCount": { + "sv": { "type": "integer", - "format": "int32", - "description": "Number of SNPs in dbSNP for this protein" + "format": "int32" }, "uniprotId": { "type": "string", "description": "Uniprot protein accession ID" - }, - "uniprotPosition": { - "type": "integer", - "format": "int32", - "description": "Variant position in Uniprot protein, can be different from the one in Refseq" - }, - "uniprotResidue": { - "type": "string", - "description": "Reference residue in Uniprot protein, can be different from the one in Refseq" - }, - "variant": { - "type": "string", - "description": "Amino acid substitution" - }, - "variantConservationScore": { - "type": "number", - "format": "double", - "description": "Variant conservation score" - }, - "variantSpecificityScore": { - "type": "number", - "format": "double", - "description": "Variant specificity score" - } - } - }, - "MutationAssessorAnnotation": { - "type": "object", - "properties": { - "annotation": { - "$ref": "#/definitions/MutationAssessor" - }, - "license": { - "type": "string" } } }, @@ -3676,8 +3604,8 @@ "description": "Most severe consequence" }, "mutation_assessor": { - "description": "Mutation Assessor Annotation", - "$ref": "#/definitions/MutationAssessorAnnotation" + "description": "Mutation Assessor", + "$ref": "#/definitions/MutationAssessor" }, "my_variant_info": { "description": "My Variant Info Annotation", @@ -3758,6 +3686,12 @@ "description": "Genomic location", "$ref": "#/definitions/GenomicLocation" }, + "intergenicConsequenceSummaries": { + "type": "array", + "items": { + "$ref": "#/definitions/IntergenicConsequenceSummary" + } + }, "strandSign": { "type": "string", "description": "Strand (- or +)" diff --git a/packages/genome-nexus-ts-api-client/src/generated/GenomeNexusAPI.ts b/packages/genome-nexus-ts-api-client/src/generated/GenomeNexusAPI.ts index 44367862cc5..bf182857798 100644 --- a/packages/genome-nexus-ts-api-client/src/generated/GenomeNexusAPI.ts +++ b/packages/genome-nexus-ts-api-client/src/generated/GenomeNexusAPI.ts @@ -483,6 +483,16 @@ export type IntegerRange = { 'start': number +}; +export type IntergenicConsequenceSummary = { + 'consequenceTerms': Array < string > + + 'impact': string + + 'variantAllele': string + + 'variantClassification': string + }; export type IntergenicConsequences = { 'impact': string @@ -501,60 +511,20 @@ export type MainType = { }; export type MutationAssessor = { - 'codonStartPosition': string - - 'cosmicCount': number - - 'functionalImpact': string + 'functionalImpactPrediction': string 'functionalImpactScore': number - 'hgvs': string - - 'hugoSymbol': string - - 'input': string - - 'mappingIssue': string - - 'msaGaps': number - - 'msaHeight': number - - 'msaLink': string - - 'pdbLink': string - - 'referenceGenomeVariant': string - - 'referenceGenomeVariantType': string - - 'refseqId': string + 'hgvspShort': string - 'refseqPosition': number + 'mav': number - 'refseqResidue': string + 'msa': string - 'snpCount': number + 'sv': number 'uniprotId': string - 'uniprotPosition': number - - 'uniprotResidue': string - - 'variant': string - - 'variantConservationScore': number - - 'variantSpecificityScore': number - -}; -export type MutationAssessorAnnotation = { - 'annotation': MutationAssessor - - 'license': string - }; export type MutationEffectResp = { 'citations': Citations @@ -1008,7 +978,7 @@ export type VariantAnnotation = { 'most_severe_consequence': string - 'mutation_assessor': MutationAssessorAnnotation + 'mutation_assessor': MutationAssessor 'my_variant_info': MyVariantInfoAnnotation @@ -1044,6 +1014,8 @@ export type VariantAnnotationSummary = { 'genomicLocation': GenomicLocation + 'intergenicConsequenceSummaries': Array < IntergenicConsequenceSummary > + 'strandSign': string 'transcriptConsequenceSummaries': Array < TranscriptConsequenceSummary > diff --git a/packages/genome-nexus-ts-api-client/src/generated/GenomeNexusAPIInternal-docs.json b/packages/genome-nexus-ts-api-client/src/generated/GenomeNexusAPIInternal-docs.json index 01071225578..59a139f7e9e 100644 --- a/packages/genome-nexus-ts-api-client/src/generated/GenomeNexusAPIInternal-docs.json +++ b/packages/genome-nexus-ts-api-client/src/generated/GenomeNexusAPIInternal-docs.json @@ -469,7 +469,7 @@ "mutation-assessor-controller" ], "summary": "Retrieves mutation assessor information for the provided list of variants", - "operationId": "postMutationAssessorAnnotation", + "operationId": "postMutationAssessor", "consumes": [ "application/json" ], @@ -509,7 +509,7 @@ "mutation-assessor-controller" ], "summary": "Retrieves mutation assessor information for the provided list of variants", - "operationId": "fetchMutationAssessorAnnotationGET", + "operationId": "fetchMutationAssessorGET", "consumes": [ "application/json" ], @@ -1650,115 +1650,54 @@ } } }, - "MutationAssessor": { + "IntergenicConsequenceSummary": { "type": "object", - "required": [ - "input" - ], "properties": { - "codonStartPosition": { - "type": "string", - "description": "Codon start position" + "consequenceTerms": { + "type": "array", + "items": { + "type": "string" + } }, - "cosmicCount": { - "type": "integer", - "format": "int32", - "description": "Number of mutations in COSMIC for this protein" + "impact": { + "type": "string" }, - "functionalImpact": { - "type": "string", - "description": "Functional impact" + "variantAllele": { + "type": "string" + }, + "variantClassification": { + "type": "string" + } + } + }, + "MutationAssessor": { + "type": "object", + "properties": { + "functionalImpactPrediction": { + "type": "string" }, "functionalImpactScore": { "type": "number", "format": "double", "description": "Functional impact score" }, - "hgvs": { + "hgvspShort": { "type": "string" }, - "hugoSymbol": { - "type": "string", - "description": "Hugo gene symbol" - }, - "input": { - "type": "string", - "description": "User-input variants" - }, - "mappingIssue": { - "type": "string", - "description": "Mapping issue info" - }, - "msaGaps": { - "type": "number", - "format": "double", - "description": "Portion of gaps in variant position in multiple sequence alignment" - }, - "msaHeight": { + "mav": { "type": "integer", - "format": "int32", - "description": "Number of diverse sequences in multiple sequence alignment (identical or highly similar sequences filtered out)" - }, - "msaLink": { - "type": "string", - "description": "Link to multiple sequence alignment" - }, - "pdbLink": { - "type": "string", - "description": "Link to 3d structure browser" - }, - "referenceGenomeVariant": { - "type": "string", - "description": "Reference genome variant" - }, - "referenceGenomeVariantType": { - "type": "string", - "description": "Reference genome variant type" - }, - "refseqId": { - "type": "string", - "description": "Refseq protein ID" - }, - "refseqPosition": { - "type": "integer", - "format": "int32", - "description": "Variant position in Refseq protein, can be different from the one in Uniprot" + "format": "int32" }, - "refseqResidue": { - "type": "string", - "description": "Reference residue in Refseq protein, can be different from the one in Uniprot" + "msa": { + "type": "string" }, - "snpCount": { + "sv": { "type": "integer", - "format": "int32", - "description": "Number of SNPs in dbSNP for this protein" + "format": "int32" }, "uniprotId": { "type": "string", "description": "Uniprot protein accession ID" - }, - "uniprotPosition": { - "type": "integer", - "format": "int32", - "description": "Variant position in Uniprot protein, can be different from the one in Refseq" - }, - "uniprotResidue": { - "type": "string", - "description": "Reference residue in Uniprot protein, can be different from the one in Refseq" - }, - "variant": { - "type": "string", - "description": "Amino acid substitution" - }, - "variantConservationScore": { - "type": "number", - "format": "double", - "description": "Variant conservation score" - }, - "variantSpecificityScore": { - "type": "number", - "format": "double", - "description": "Variant specificity score" } } }, @@ -2336,6 +2275,12 @@ "description": "Genomic location", "$ref": "#/definitions/GenomicLocation" }, + "intergenicConsequenceSummaries": { + "type": "array", + "items": { + "$ref": "#/definitions/IntergenicConsequenceSummary" + } + }, "strandSign": { "type": "string", "description": "Strand (- or +)" diff --git a/packages/genome-nexus-ts-api-client/src/generated/GenomeNexusAPIInternal.ts b/packages/genome-nexus-ts-api-client/src/generated/GenomeNexusAPIInternal.ts index ca2ac86b0e0..1617b9c1883 100644 --- a/packages/genome-nexus-ts-api-client/src/generated/GenomeNexusAPIInternal.ts +++ b/packages/genome-nexus-ts-api-client/src/generated/GenomeNexusAPIInternal.ts @@ -303,55 +303,31 @@ export type IntegerRange = { 'start': number }; -export type MutationAssessor = { - 'codonStartPosition': string - - 'cosmicCount': number +export type IntergenicConsequenceSummary = { + 'consequenceTerms': Array < string > - 'functionalImpact': string - - 'functionalImpactScore': number + 'impact': string - 'hgvs': string - - 'hugoSymbol': string - - 'input': string - - 'mappingIssue': string - - 'msaGaps': number - - 'msaHeight': number - - 'msaLink': string + 'variantAllele': string - 'pdbLink': string + 'variantClassification': string - 'referenceGenomeVariant': string +}; +export type MutationAssessor = { + 'functionalImpactPrediction': string - 'referenceGenomeVariantType': string + 'functionalImpactScore': number - 'refseqId': string + 'hgvspShort': string - 'refseqPosition': number + 'mav': number - 'refseqResidue': string + 'msa': string - 'snpCount': number + 'sv': number 'uniprotId': string - 'uniprotPosition': number - - 'uniprotResidue': string - - 'variant': string - - 'variantConservationScore': number - - 'variantSpecificityScore': number - }; export type Mutdb = { 'alt': string @@ -602,6 +578,8 @@ export type VariantAnnotationSummary = { 'genomicLocation': GenomicLocation + 'intergenicConsequenceSummaries': Array < IntergenicConsequenceSummary > + 'strandSign': string 'transcriptConsequenceSummaries': Array < TranscriptConsequenceSummary > @@ -1543,7 +1521,7 @@ export default class GenomeNexusAPIInternal { return response.body; }); }; - postMutationAssessorAnnotationURL(parameters: { + postMutationAssessorURL(parameters: { 'variants': Array < string > , $queryParameters ? : any }): string { @@ -1563,10 +1541,10 @@ export default class GenomeNexusAPIInternal { /** * Retrieves mutation assessor information for the provided list of variants * @method - * @name GenomeNexusAPIInternal#postMutationAssessorAnnotation + * @name GenomeNexusAPIInternal#postMutationAssessor * @param {} variants - List of variants. For example ["7:g.140453136A>T","12:g.25398285C>A"] */ - postMutationAssessorAnnotationWithHttpInfo(parameters: { + postMutationAssessorWithHttpInfo(parameters: { 'variants': Array < string > , $queryParameters ? : any, $domain ? : string @@ -1607,20 +1585,20 @@ export default class GenomeNexusAPIInternal { /** * Retrieves mutation assessor information for the provided list of variants * @method - * @name GenomeNexusAPIInternal#postMutationAssessorAnnotation + * @name GenomeNexusAPIInternal#postMutationAssessor * @param {} variants - List of variants. For example ["7:g.140453136A>T","12:g.25398285C>A"] */ - postMutationAssessorAnnotation(parameters: { + postMutationAssessor(parameters: { 'variants': Array < string > , $queryParameters ? : any, $domain ? : string }): Promise < Array < MutationAssessor > > { - return this.postMutationAssessorAnnotationWithHttpInfo(parameters).then(function(response: request.Response) { + return this.postMutationAssessorWithHttpInfo(parameters).then(function(response: request.Response) { return response.body; }); }; - fetchMutationAssessorAnnotationGETURL(parameters: { + fetchMutationAssessorGETURL(parameters: { 'variant': string, $queryParameters ? : any }): string { @@ -1642,10 +1620,10 @@ export default class GenomeNexusAPIInternal { /** * Retrieves mutation assessor information for the provided list of variants * @method - * @name GenomeNexusAPIInternal#fetchMutationAssessorAnnotationGET + * @name GenomeNexusAPIInternal#fetchMutationAssessorGET * @param {string} variant - A variant. For example 7:g.140453136A>T */ - fetchMutationAssessorAnnotationGETWithHttpInfo(parameters: { + fetchMutationAssessorGETWithHttpInfo(parameters: { 'variant': string, $queryParameters ? : any, $domain ? : string @@ -1684,15 +1662,15 @@ export default class GenomeNexusAPIInternal { /** * Retrieves mutation assessor information for the provided list of variants * @method - * @name GenomeNexusAPIInternal#fetchMutationAssessorAnnotationGET + * @name GenomeNexusAPIInternal#fetchMutationAssessorGET * @param {string} variant - A variant. For example 7:g.140453136A>T */ - fetchMutationAssessorAnnotationGET(parameters: { + fetchMutationAssessorGET(parameters: { 'variant': string, $queryParameters ? : any, $domain ? : string }): Promise < MutationAssessor > { - return this.fetchMutationAssessorAnnotationGETWithHttpInfo(parameters).then(function(response: request.Response) { + return this.fetchMutationAssessorGETWithHttpInfo(parameters).then(function(response: request.Response) { return response.body; }); }; diff --git a/packages/oncokb-frontend-commons/package.json b/packages/oncokb-frontend-commons/package.json index c9ec7fa3804..7b027239222 100644 --- a/packages/oncokb-frontend-commons/package.json +++ b/packages/oncokb-frontend-commons/package.json @@ -1,6 +1,6 @@ { "name": "oncokb-frontend-commons", - "version": "0.0.27", + "version": "0.0.28", "description": "OncoKB Frontend Modules", "main": "dist/index.js", "module": "dist/index.es.js", @@ -35,7 +35,7 @@ "react-dom": "^15.0.0 || ^16.0.0" }, "dependencies": { - "cbioportal-utils": "^0.3.43", + "cbioportal-utils": "^0.3.44", "classnames": "^2.2.5", "lodash": "^4.17.15", "oncokb-styles": "~1.4.2", diff --git a/packages/react-mutation-mapper/package.json b/packages/react-mutation-mapper/package.json index 4abe7636685..3bf37e4db84 100644 --- a/packages/react-mutation-mapper/package.json +++ b/packages/react-mutation-mapper/package.json @@ -1,6 +1,6 @@ { "name": "react-mutation-mapper", - "version": "0.8.113", + "version": "0.8.114", "description": "Generic Mutation Mapper", "main": "dist/index.js", "module": "dist/index.es.js", @@ -39,14 +39,14 @@ }, "dependencies": { "autobind-decorator": "^2.1.0", - "cbioportal-frontend-commons": "^0.5.69", - "cbioportal-utils": "^0.3.43", + "cbioportal-frontend-commons": "^0.5.70", + "cbioportal-utils": "^0.3.44", "classnames": "^2.2.5", - "genome-nexus-ts-api-client": "^1.1.33", + "genome-nexus-ts-api-client": "^1.1.34", "jquery": "^3.2.1", "lodash": "^4.17.15", "memoize-weak-decorator": "^1.0.3", - "oncokb-frontend-commons": "^0.0.27", + "oncokb-frontend-commons": "^0.0.28", "oncokb-styles": "~1.4.2", "oncokb-ts-api-client": "^1.3.6", "react-collapse": "^4.0.3", diff --git a/packages/react-variant-view/package.json b/packages/react-variant-view/package.json index 41c3db94ebb..91d4bd0831e 100644 --- a/packages/react-variant-view/package.json +++ b/packages/react-variant-view/package.json @@ -1,6 +1,6 @@ { "name": "react-variant-view", - "version": "0.3.114", + "version": "0.3.115", "description": "cBioPortal Variant Viewer", "main": "dist/index.js", "module": "dist/index.es.js", @@ -39,11 +39,11 @@ }, "dependencies": { "autobind-decorator": "^2.1.0", - "cbioportal-frontend-commons": "^0.5.69", - "cbioportal-utils": "^0.3.43", + "cbioportal-frontend-commons": "^0.5.70", + "cbioportal-utils": "^0.3.44", "classnames": "^2.2.5", "font-awesome": "^4.7.0", - "genome-nexus-ts-api-client": "^1.1.33", + "genome-nexus-ts-api-client": "^1.1.34", "jquery": "^3.2.1", "lodash": "^4.17.15", "oncokb-styles": "~1.4.2", @@ -52,7 +52,7 @@ "react-collapse": "4.0.3", "react-if": "^2.1.0", "react-motion": "^0.5.2", - "react-mutation-mapper": "^0.8.113", + "react-mutation-mapper": "^0.8.114", "react-rangeslider": "^2.2.0", "react-select": "^3.0.4", "react-table": "^6.10.0", diff --git a/packages/react-variant-view/src/component/functionalPrediction/FunctionalPrediction.tsx b/packages/react-variant-view/src/component/functionalPrediction/FunctionalPrediction.tsx index 342a982c845..63fe6274dca 100644 --- a/packages/react-variant-view/src/component/functionalPrediction/FunctionalPrediction.tsx +++ b/packages/react-variant-view/src/component/functionalPrediction/FunctionalPrediction.tsx @@ -30,10 +30,7 @@ class FunctionalPrediction extends React.Component { public getData( genomeNexusData: VariantAnnotation | undefined ): IFunctionalImpactData { - const mutationAssessor = - genomeNexusData && - genomeNexusData.mutation_assessor && - genomeNexusData.mutation_assessor.annotation; + const mutationAssessor = genomeNexusData?.mutation_assessor; const siftScore = genomeNexusData && genomeNexusData.transcript_consequences && diff --git a/packages/react-variant-view/src/component/functionalPrediction/MutationAssessor.tsx b/packages/react-variant-view/src/component/functionalPrediction/MutationAssessor.tsx index f66039d6e2d..9f97b7c656c 100644 --- a/packages/react-variant-view/src/component/functionalPrediction/MutationAssessor.tsx +++ b/packages/react-variant-view/src/component/functionalPrediction/MutationAssessor.tsx @@ -27,25 +27,32 @@ export default class MutationAssessor extends React.Component< IMutationAssessorProps, {} > { - private static MUTATION_ASSESSOR_URL: string = - 'http://mutationassessor.org/r3/'; + // TODO Change to new url when manuscript is available + // New url will need to be added in tooltip, discrption, "Please refer to the score range here." and "Go to Mutation Assessor" + // private static MUTATION_ASSESSOR_URL: string = 'http://mutationassessor.org/r3/'; private static mutationAssessorText() { return ( -
- - Mutation Assessor - {' '} - predicts the functional impact of amino-acid substitutions in - proteins, such as mutations discovered in cancer or missense - polymorphisms. The functional impact is assessed based on - evolutionary conservation of the affected amino acid in protein - homologs. The method has been validated on a large set (60k) of - disease associated (OMIM) and polymorphic variants. +
+ Mutation Assessor predicts the functional impact of amino-acid + substitutions in proteins, such as mutations discovered in + cancer or missense polymorphisms. The functional impact is + assessed based on evolutionary conservation of the affected + amino acid in protein homologs. The method has been validated on + a large set of disease associated and polymorphic variants ( + + ClinVar + + ). +
+ + Mutation Assessor V4 data is now available in the portal! + {' '} + New manuscript is in progress. Click{` `} + + here + + {` `} to see information about V3 data.
); } @@ -143,24 +150,6 @@ export default class MutationAssessor extends React.Component< ); } - // This is mostly to make the legacy MA links work - private static maLink(link: string | undefined) { - let url = null; - - // ignore invalid links ("", "NA", "Not Available") - if (link) { - // getma.org is the legacy link, need to replace it with the actual value - url = link.replace('getma.org', 'mutationassessor.org/r3'); - - // prepend "http://" if needed - if (url.indexOf('http://') !== 0) { - url = `http://${url}`; - } - } - - return url; - } - constructor(props: IMutationAssessorProps) { super(props); @@ -169,21 +158,13 @@ export default class MutationAssessor extends React.Component< public render() { let maContent: JSX.Element = ; - const dataSource = ( - <> - Mutation Assessor  - - {!this.props.isCanonicalTranscriptSelected && *} - - ); - if ( this.props.mutationAssessor && - this.props.mutationAssessor.functionalImpact != null && - this.props.mutationAssessor.functionalImpact !== '' + this.props.mutationAssessor.functionalImpactPrediction != null && + this.props.mutationAssessor.functionalImpactPrediction !== '' ) { const maData = this.props.mutationAssessor; - maContent = {maData.functionalImpact}; + maContent = {maData.functionalImpactPrediction}; } else { maContent = N/A; } @@ -192,25 +173,19 @@ export default class MutationAssessor extends React.Component<
{this.mutationAssessorTooltip( - - {dataSource} - + <> + Mutation Assessor  + + {!this.props.isCanonicalTranscriptSelected && ( + * + )} + )}
{this.mutationAssessorTooltip( - - {maContent} - + {maContent} )}
@@ -221,12 +196,7 @@ export default class MutationAssessor extends React.Component< private mutationAssessorData() { if (this.props.mutationAssessor) { const maData = this.props.mutationAssessor; - const xVarLink = MutationAssessor.maLink( - `http://mutationassessor.org/r3/?cm=var&p=${maData.uniprotId}&var=${maData.variant}` - ); - const msaLink = MutationAssessor.maLink(maData.msaLink); - const pdbLink = MutationAssessor.maLink(maData.pdbLink); - const impact = maData.functionalImpact ? ( + const impact = maData.functionalImpactPrediction ? (
{(maData.functionalImpactScore || @@ -245,86 +215,12 @@ export default class MutationAssessor extends React.Component< )}
- - Please refer to the score range{' '} - - here - - . -
) : null; - const xVar = - xVarLink && - maData.uniprotId.length !== 0 && - maData.variant.length !== 0 ? ( - - ) : null; - - const msa = - msaLink && maData.msaLink.length !== 0 ? ( - - ) : null; - - const pdb = - pdbLink && maData.pdbLink.length !== 0 ? ( - - ) : null; - return (
{impact} - {msa} - {pdb} - {xVar}
); diff --git a/src/appBootstrapper.tsx b/src/appBootstrapper.tsx index d36088736a4..33dc126fd0a 100755 --- a/src/appBootstrapper.tsx +++ b/src/appBootstrapper.tsx @@ -1,6 +1,6 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import { configure } from 'mobx'; +import { configure, toJS } from 'mobx'; import { Provider } from 'mobx-react'; import { Router } from 'react-router-dom'; import { createBrowserHistory } from 'history'; @@ -27,7 +27,12 @@ import browser from 'bowser'; import { setNetworkListener } from './shared/lib/ajaxQuiet'; import { initializeTracking, sendToLoggly } from 'shared/lib/tracking'; import superagentCache from 'superagent-cache'; -import { getBrowserWindow, onMobxPromise } from 'cbioportal-frontend-commons'; +import { + getBrowserWindow, + hashString, + isWebdriver, + onMobxPromise, +} from 'cbioportal-frontend-commons'; import { AppStore } from './AppStore'; import { handleLongUrls } from 'shared/lib/handleLongUrls'; import 'shared/polyfill/canvasToBlob'; @@ -39,6 +44,7 @@ import { FeatureFlagStore } from 'shared/FeatureFlagStore'; import eventBus from 'shared/events/eventBus'; import { SiteError } from 'shared/model/appMisc'; import load from 'little-loader'; +import internalClient from 'shared/api/cbioportalInternalClientInstance'; export interface ICBioWindow { globalStores: { @@ -206,6 +212,69 @@ superagent.Request.prototype.end = function(callback) { } }); }; + +function enableDataDogTracking(store: AppStore) { + datadogLogs.init({ + clientToken: 'pub9a94ebb002f105ff44d8e427b6549775', + site: 'datadoghq.com', + service: 'cbioportalinternal', + forwardErrorsToLogs: true, + sessionSampleRate: 100, + } as any); + + const match = [ + /filtered-samples/, + /clinical-data-bin-counts/, + /generic-assay-data-bin-counts/, + /mutated-genes/, + /molecular-profile-sample-counts/, + /cna-genes/, + /structuralvariant-genes/, + /clinical-data-counts/, + /sample-lists-counts/, + /clinical-data-density-plot/, + /clinical-data-violin-plots/, + /genomic-data-counts/, + /mutation-data-counts/, + /clinical-event-type-counts/, + /treatments\/patient-counts/, + /treatments\/sample-counts/, + /genomic-data-bin-counts/, + /clinical-event-type-counts/, + ]; + + const oldRequest = (internalClient as any).request; + (internalClient as any).request = function(...args: any) { + try { + let url = args[1]; + + if (Object.keys(args[4]).length) { + url = url + '?' + $.param(args[4]); + } + + const data = args[2]; + + const studyIds = data.studyIds || data.studyViewFilter.studyIds; + + const appName = store.serverConfig.app_name; + + if (studyIds.length < 4 && _.some(match, re => re.test(url))) { + const hash = hashString(url + JSON.stringify(toJS(data))); + datadogLogs.logger.info('study view request', { + url, + data, + hash, + appName, + }); + } + } catch (ex) { + // fail silently + } + + return oldRequest.apply(this, args); + }; +} + // browserWindow.routingStore = routingStore; @@ -236,24 +305,6 @@ let render = (key?: number) => { ]`; } - if (stores.appStore.serverConfig.app_name === 'mskcc-portal') { - datadogLogs.init({ - clientToken: 'pub9a94ebb002f105ff44d8e427b6549775', - site: 'datadoghq.com', - service: 'cbioportalinternal', - forwardErrorsToLogs: true, - sessionSampleRate: 100, - beforeSend: (log: any) => { - switch (log.origin) { - case 'console': - return false; - default: - // let dd send log - } - }, - } as any); - } - const rootNode = document.getElementById('reactRoot'); ReactDOM.render( @@ -319,6 +370,15 @@ $(document).ready(async () => { initializeAppStore(stores.appStore); + if ( + ['genie-public-portal', 'public-portal'].includes( + stores.appStore.serverConfig.app_name! + ) && + !isWebdriver() + ) { + enableDataDogTracking(stores.appStore); + } + await loadCustomJs(); render(); diff --git a/src/appShell/App/usageAgreements/StudyAgreement.tsx b/src/appShell/App/usageAgreements/StudyAgreement.tsx index f430ba59921..b10dcf8819a 100644 --- a/src/appShell/App/usageAgreements/StudyAgreement.tsx +++ b/src/appShell/App/usageAgreements/StudyAgreement.tsx @@ -28,11 +28,21 @@ export const StudyAgreement: React.FunctionComponent<{}> = function({}) { - WARNING: -  All URLs in this website are private - do NOT include - in manuscripts. + Attention: +  Please read and follow the{' '} + + rules about usage of MSK clinical sequencing data in + manuscripts + + . } + dismissButtonText={'Acknowledge'} persistenceKey={STUDY_VIEW_WARNING_PERSISTENCE_KEY} expirationInDays={90} clauses={[ @@ -56,31 +66,13 @@ export const StudyAgreement: React.FunctionComponent<{}> = function({}) { public cBioPortal. , <> - When adding a link to a cBioPortal cohort in a manuscript,{' '} - - I will not link to this private portal ( - {window.location.hostname}) - - , but will instead link to this study on the public - cBioPortal ( - - cbioportal.org - - ). Contact{' '} - - cbioportal@cbio.mskcc.org - {' '} - with any questions about getting the data transferred to the - public cBioPortal. - , - <> - I have read the{' '} + I have read and agree to the{' '} - MSK-IMPACT Data publication guidelines (intranet/VPN - only) + MSK-IMPACT Memorial Hospital Research Data Governance publication + guidelines . , diff --git a/src/pages/resultsView/ResultsViewPage.tsx b/src/pages/resultsView/ResultsViewPage.tsx index 09423eeade7..62a0868d13a 100644 --- a/src/pages/resultsView/ResultsViewPage.tsx +++ b/src/pages/resultsView/ResultsViewPage.tsx @@ -265,7 +265,10 @@ export default class ResultsViewPage extends React.Component< entrezGeneIdToGene={store.entrezGeneIdToGene} sampleKeyToSample={store.sampleKeyToSample} genes={store.genes} - clinicalAttributes={store.clinicalAttributes} + clinicalAttributes={ + store.plotClinicalAttributes + } + customAttributes={store.customAttributes} genesets={store.genesets} genericAssayEntitiesGroupByMolecularProfileId={ store.genericAssayEntitiesGroupByMolecularProfileId diff --git a/src/pages/resultsView/ResultsViewPageStore.ts b/src/pages/resultsView/ResultsViewPageStore.ts index ea50031be8e..adef8acb186 100644 --- a/src/pages/resultsView/ResultsViewPageStore.ts +++ b/src/pages/resultsView/ResultsViewPageStore.ts @@ -1093,7 +1093,7 @@ export class ResultsViewPageStore extends AnalysisStore this.studyIds, this.clinicalAttributes_profiledIn, this.clinicalAttributes_comparisonGroupMembership, - this.clinicalAttributes_customCharts, + this.customAttributes, this.samples, this.patients, ], @@ -1142,7 +1142,7 @@ export class ResultsViewPageStore extends AnalysisStore ...specialAttributes, ...this.clinicalAttributes_profiledIn.result!, ...this.clinicalAttributes_comparisonGroupMembership.result!, - ...this.clinicalAttributes_customCharts.result!, + ...this.customAttributes.result!, ]; }, }); @@ -1187,7 +1187,7 @@ export class ResultsViewPageStore extends AnalysisStore this.studyToDataQueryFilter, this.clinicalAttributes_profiledIn, this.clinicalAttributes_comparisonGroupMembership, - this.clinicalAttributes_customCharts, + this.customAttributes, ], invoke: async () => { let clinicalAttributeCountFilter: ClinicalAttributeCountFilter; @@ -1270,7 +1270,7 @@ export class ResultsViewPageStore extends AnalysisStore ); } // add counts for custom chart clinical attributes - for (const attr of this.clinicalAttributes_customCharts.result!) { + for (const attr of this.customAttributes.result!) { ret[attr.clinicalAttributeId] = attr.data!.filter( d => d.value !== 'NA' ).length; @@ -2723,7 +2723,17 @@ export class ResultsViewPageStore extends AnalysisStore default: [], }); - readonly clinicalAttributes_customCharts = remoteData({ + readonly plotClinicalAttributes = remoteData({ + await: () => [this.clinicalAttributes, this.customAttributes], + invoke: async () => { + return _.filter( + this.clinicalAttributes.result!, + attr => !this.customAttributes.result!.includes(attr) + ); + }, + }); + + readonly customAttributes = remoteData({ await: () => [this.sampleMap], invoke: async () => { let ret: ExtendedClinicalAttribute[] = []; @@ -5693,7 +5703,7 @@ export class ResultsViewPageStore extends AnalysisStore this.coverageInformation, this.filteredSampleKeyToSample, this.filteredPatientKeyToPatient, - this.clinicalAttributes_customCharts + this.customAttributes ); public mutationCache = new MobxPromiseCache< diff --git a/src/pages/resultsView/mutation/Mutations.tsx b/src/pages/resultsView/mutation/Mutations.tsx index 9c098d005ff..24866e63a36 100644 --- a/src/pages/resultsView/mutation/Mutations.tsx +++ b/src/pages/resultsView/mutation/Mutations.tsx @@ -334,14 +334,20 @@ export default class Mutations extends React.Component< count: number, mutations: Mutation[], axisMode: AxisScale - ): JSX.Element { - return ( - - ); + ) { + if (this.props.store.filteredPatients.isComplete) { + return ( + + ); + } else { + return <>; + } } } diff --git a/src/pages/resultsView/oncoprint/TracksMenu.tsx b/src/pages/resultsView/oncoprint/TracksMenu.tsx index 839eb7aa698..a8910a227ba 100644 --- a/src/pages/resultsView/oncoprint/TracksMenu.tsx +++ b/src/pages/resultsView/oncoprint/TracksMenu.tsx @@ -151,7 +151,7 @@ export default class TracksMenu extends React.Component { await: () => [ this.props.store.clinicalAttributes, this.clinicalAttributeIdToAvailableFrequency, - this.props.store.clinicalAttributes_customCharts, + this.props.store.customAttributes, ], invoke: () => { const uniqueAttributes = _.uniqBy( @@ -167,7 +167,7 @@ export default class TracksMenu extends React.Component { }; const customChartClinicalAttributeIds = _.keyBy( - this.props.store.clinicalAttributes_customCharts.result!, + this.props.store.customAttributes.result!, a => a.clinicalAttributeId ); diff --git a/src/pages/studyView/StudyViewPage.tsx b/src/pages/studyView/StudyViewPage.tsx index 0971f3c73fe..5628f49ba2d 100644 --- a/src/pages/studyView/StudyViewPage.tsx +++ b/src/pages/studyView/StudyViewPage.tsx @@ -769,6 +769,9 @@ export default class StudyViewPage extends React.Component< clinicalAttributes={ this.store.clinicalAttributes } + customAttributes={ + this.store.customAttributes + } genesets={this.store.genesets} genericAssayEntitiesGroupByMolecularProfileId={ this.store diff --git a/src/pages/studyView/StudyViewPageStore.ts b/src/pages/studyView/StudyViewPageStore.ts index cafc79680de..faf5c3cc105 100644 --- a/src/pages/studyView/StudyViewPageStore.ts +++ b/src/pages/studyView/StudyViewPageStore.ts @@ -11477,7 +11477,7 @@ export class StudyViewPageStore ), }); - readonly clinicalAttributes_customCharts = remoteData({ + readonly customAttributes = remoteData({ await: () => [this.sampleMap], invoke: async () => { let ret: ExtendedClinicalAttribute[] = []; @@ -11523,7 +11523,7 @@ export class StudyViewPageStore this.coverageInformation, this.filteredSampleKeyToSample, this.filteredPatientKeyToPatient, - this.clinicalAttributes_customCharts + this.customAttributes ); private _numericGeneMolecularDataCache = new MobxPromiseCache< diff --git a/src/shared/components/UsageAgreement.tsx b/src/shared/components/UsageAgreement.tsx index 79bf1dbb833..d41ed3d7816 100644 --- a/src/shared/components/UsageAgreement.tsx +++ b/src/shared/components/UsageAgreement.tsx @@ -15,6 +15,7 @@ interface IUsageAgreement { clauses: JSX.Element[]; useCheckboxes?: boolean; expirationInDays?: number; + dismissButtonText?: string; } @observer @@ -68,7 +69,6 @@ export default class UsageAgreement extends React.Component< 'true', this.expirationInSeconds ); - //localStorage.setItem(this.props.persistenceKey, 'true'); } @autobind @@ -111,7 +111,7 @@ export default class UsageAgreement extends React.Component< bsSize="xsmall" onClick={this.handleModalShow} > - Dismiss + {this.props.dismissButtonText || 'Dismiss'} @@ -122,7 +122,7 @@ export default class UsageAgreement extends React.Component< container={this} aria-labelledby="contained-modal-title" > - + { - static MUTATION_ASSESSOR_URL: string = 'http://mutationassessor.org/r3/'; + // TODO Replace to new url when manuscript is available + // static MUTATION_ASSESSOR_URL: string = 'http://mutationassessor.org/r3/'; constructor(props: IMutationAssessorProps) { super(props); @@ -31,7 +32,7 @@ export default class MutationAssessor extends React.Component< mutationAssessorData: MutationAssessorData | undefined ): string { if (mutationAssessorData) { - return `impact: ${mutationAssessorData.functionalImpact}, score: ${mutationAssessorData.functionalImpactScore}`; + return `impact: ${mutationAssessorData.functionalImpactPrediction}, score: ${mutationAssessorData.functionalImpactScore}`; } else { return 'NA'; } @@ -44,7 +45,7 @@ export default class MutationAssessor extends React.Component< if ( this.props.mutationAssessor && - this.props.mutationAssessor.functionalImpact !== null + this.props.mutationAssessor.functionalImpactPrediction !== null ) { const maData = this.props.mutationAssessor; maContent = ( @@ -52,7 +53,7 @@ export default class MutationAssessor extends React.Component< className={classNames( annotationStyles['annotation-item-text'], (mutationAssessorColumn as any)[ - `ma-${maData.functionalImpact}` + `ma-${maData.functionalImpactPrediction}` ] )} > @@ -80,15 +81,14 @@ export default class MutationAssessor extends React.Component< private tooltipContent() { if (this.props.mutationAssessor) { const maData = this.props.mutationAssessor; - const impact = maData.functionalImpact ? ( + const impact = maData.functionalImpactPrediction ? (
@@ -97,11 +97,11 @@ export default class MutationAssessor extends React.Component< - {maData.functionalImpact} + {maData.functionalImpactPrediction} diff --git a/src/shared/components/mutationTable/column/FunctionalImpactColumnFormatter.tsx b/src/shared/components/mutationTable/column/FunctionalImpactColumnFormatter.tsx index c3f418ae07f..1dad21853fc 100644 --- a/src/shared/components/mutationTable/column/FunctionalImpactColumnFormatter.tsx +++ b/src/shared/components/mutationTable/column/FunctionalImpactColumnFormatter.tsx @@ -305,19 +305,26 @@ class FunctionalImpactColumnTooltip extends React.Component< public static mutationAssessorText() { return ( -
- - Mutation Assessor - {' '} - predicts the functional impact of amino-acid substitutions in - proteins, such as mutations discovered in cancer or missense - polymorphisms. The functional impact is assessed based on - evolutionary conservation of the affected amino acid in protein - homologs. The method has been validated on a large set (60k) of - disease associated (OMIM) and polymorphic variants. +
+ Mutation Assessor predicts the functional impact of amino-acid + substitutions in proteins, such as mutations discovered in + cancer or missense polymorphisms. The functional impact is + assessed based on evolutionary conservation of the affected + amino acid in protein homologs. The method has been validated on + a large set of disease associated and polymorphic variants ( + + ClinVar + + ). +
+ + Mutation Assessor V4 data is now available in the portal! + {' '} + New manuscript is in progress. Click{` `} + + here + + {` `} to see information about V3 data.
); } @@ -531,13 +538,7 @@ export default class FunctionalImpactColumnFormatter { public static getMutationAssessorData( mutationAssessorDataCache: VariantAnnotation | null ): MutationAssessorData | undefined { - if (!mutationAssessorDataCache) { - return undefined; - } else { - return mutationAssessorDataCache.mutation_assessor - ? mutationAssessorDataCache.mutation_assessor.annotation - : undefined; - } + return mutationAssessorDataCache?.mutation_assessor; } public static renderFunction( diff --git a/src/shared/components/plots/PlotsTab.tsx b/src/shared/components/plots/PlotsTab.tsx index 814df5b16f7..d1890336965 100644 --- a/src/shared/components/plots/PlotsTab.tsx +++ b/src/shared/components/plots/PlotsTab.tsx @@ -18,6 +18,7 @@ import _ from 'lodash'; import { axisHasNegativeNumbers, boxPlotTooltip, + CUSTOM_ATTR_DATA_TYPE, CLIN_ATTR_DATA_TYPE, CNA_STROKE_WIDTH, dataTypeDisplayOrder, @@ -277,6 +278,7 @@ export interface IPlotsTabProps { sampleKeyToSample: MobxPromise<_.Dictionary>; genes: MobxPromise; clinicalAttributes: MobxPromise; + customAttributes: MobxPromise; genesets: MobxPromise; genericAssayEntitiesGroupByMolecularProfileId: MobxPromise<{ [profileId: string]: GenericAssayMeta[]; @@ -696,6 +698,31 @@ export default class PlotsTab extends React.Component { ); } break; + case CUSTOM_ATTR_DATA_TYPE: + if ( + this.horzSelection.dataSourceId !== undefined && + this.customAttributesGroupByclinicalAttributeId.isComplete + ) { + const attributes = this + .customAttributesGroupByclinicalAttributeId.result![ + this.horzSelection.dataSourceId + ]; + const studyIds = attributes.map( + attribute => attribute.studyId + ); + horzAxisStudies = this.props.studies.result.filter(study => + studyIds.includes(study.studyId) + ); + components.push( +
+ Horizontal Axis: + {`${horzAxisDataSampleCount} samples from ${ + horzAxisStudies.length + } ${Pluralize('study', horzAxisStudies.length)}`} +
+ ); + } + break; default: // molecular profile if ( @@ -731,6 +758,31 @@ export default class PlotsTab extends React.Component { case NONE_SELECTED_OPTION_STRING_VALUE: isVertAxisNoneOptionSelected = true; break; + case CUSTOM_ATTR_DATA_TYPE: + if ( + this.vertSelection.dataSourceId !== undefined && + this.customAttributesGroupByclinicalAttributeId.isComplete + ) { + const attributes = this + .customAttributesGroupByclinicalAttributeId.result![ + this.vertSelection.dataSourceId + ]; + const studyIds = attributes.map( + attribute => attribute.studyId + ); + vertAxisStudies = this.props.studies.result.filter(study => + studyIds.includes(study.studyId) + ); + components.push( +
+ Vertical Axis: + {`${vertAxisDataSampleCount} samples from ${ + vertAxisStudies.length + } ${Pluralize('study', vertAxisStudies.length)}`} +
+ ); + } + break; case CLIN_ATTR_DATA_TYPE: if ( this.vertSelection.dataSourceId !== undefined && @@ -1121,9 +1173,10 @@ export default class PlotsTab extends React.Component { this._selectedGenesetOption && this._selectedGenesetOption.value === SAME_SELECTED_OPTION_STRING_VALUE && - self.horzSelection.dataType === CLIN_ATTR_DATA_TYPE + (self.horzSelection.dataType === CLIN_ATTR_DATA_TYPE || + self.horzSelection.dataType === CUSTOM_ATTR_DATA_TYPE) ) { - // if vertical gene set option is "same as horizontal", and horizontal is clinical, then use the actual + // if vertical gene set option is "same as horizontal", and horizontal is clinical or custom, then use the actual // gene set option value instead of "Same gene" option value, because that would be slightly weird UX return self.horzSelection.selectedGenesetOption; } else { @@ -1195,9 +1248,10 @@ export default class PlotsTab extends React.Component { this._selectedGenericAssayOption && this._selectedGenericAssayOption.value === SAME_SELECTED_OPTION_STRING_VALUE && - self.horzSelection.dataType === CLIN_ATTR_DATA_TYPE + (self.horzSelection.dataType === CLIN_ATTR_DATA_TYPE || + self.horzSelection.dataType === CUSTOM_ATTR_DATA_TYPE) ) { - // if vertical gene set option is "same as horizontal", and horizontal is clinical, then use the actual + // if vertical gene set option is "same as horizontal", and horizontal is clinical or custom, then use the actual // gene set option value instead of "Same gene" option value, because that would be slightly weird UX return self.horzSelection.selectedGenericAssayOption; } else { @@ -2063,10 +2117,45 @@ export default class PlotsTab extends React.Component { }, }); + readonly clinicalAndCustomAttributes = remoteData< + ExtendedClinicalAttribute[] + >({ + await: () => [ + this.props.clinicalAttributes, + this.props.customAttributes, + ], + invoke: () => { + return Promise.resolve([ + ...this.props.clinicalAttributes.result!, + ...this.props.customAttributes.result!, + ]); + }, + }); + + readonly clinicalAttributeOptions = remoteData({ + await: () => [this.props.clinicalAttributes], + invoke: () => + Promise.resolve( + makeClinicalAttributeOptions( + this.props.clinicalAttributes.result! + ) + ), + }); + + readonly customAttributeOptions = remoteData({ + await: () => [this.props.customAttributes], + invoke: () => + Promise.resolve( + makeClinicalAttributeOptions( + this.props.customAttributes.result! + ) + ), + }); + readonly coloringMenuOmnibarOptions = remoteData< (ColoringMenuOmnibarOption | ColoringMenuOmnibarGroup)[] >({ - await: () => [this.props.genes, this.props.clinicalAttributes], + await: () => [this.props.genes, this.clinicalAndCustomAttributes], invoke: () => { const allOptions: ( | Omit @@ -2088,7 +2177,7 @@ export default class PlotsTab extends React.Component { allOptions.push({ label: 'Clinical Attributes', - options: this.props.clinicalAttributes + options: this.clinicalAndCustomAttributes .result!.filter(a => { return ( a.clinicalAttributeId !== @@ -2104,7 +2193,6 @@ export default class PlotsTab extends React.Component { }; }), }); - if (allOptions.length > 0) { // add 'None' option to the top of the list to allow removing coloring of samples allOptions.unshift({ @@ -2365,6 +2453,7 @@ export default class PlotsTab extends React.Component { dataType !== NONE_SELECTED_OPTION_STRING_VALUE && dataType !== GENESET_DATA_TYPE && dataType !== CLIN_ATTR_DATA_TYPE && + dataType !== CUSTOM_ATTR_DATA_TYPE && !isGenericAssaySelected ); } @@ -2408,12 +2497,27 @@ export default class PlotsTab extends React.Component { readonly clinicalAttributeIdToClinicalAttribute = remoteData<{ [clinicalAttributeId: string]: ClinicalAttribute; }>({ - await: () => [this.props.clinicalAttributes, this.props.studyIds], + await: () => [this.props.studyIds, this.props.clinicalAttributes], invoke: () => { let _map: { [clinicalAttributeId: string]: ClinicalAttribute; } = _.keyBy( - this.props.clinicalAttributes.result, + this.props.clinicalAttributes.result!, + c => c.clinicalAttributeId + ); + return Promise.resolve(_map); + }, + }); + + readonly customAttributeIdToClinicalAttribute = remoteData<{ + [clinicalAttributeId: string]: ClinicalAttribute; + }>({ + await: () => [this.props.studyIds, this.props.customAttributes], + invoke: () => { + let _map: { + [clinicalAttributeId: string]: ClinicalAttribute; + } = _.keyBy( + this.props.customAttributes.result!, c => c.clinicalAttributeId ); return Promise.resolve(_map); @@ -2427,21 +2531,25 @@ export default class PlotsTab extends React.Component { invoke: () => { return Promise.resolve( _.groupBy( - this.props.clinicalAttributes.result, + this.props.clinicalAttributes.result!, c => c.clinicalAttributeId ) ); }, }); - readonly clinicalAttributeOptions = remoteData({ - await: () => [this.props.clinicalAttributes], - invoke: () => - Promise.resolve( - makeClinicalAttributeOptions( - this.props.clinicalAttributes.result! + readonly customAttributesGroupByclinicalAttributeId = remoteData<{ + [clinicalAttributeId: string]: ClinicalAttribute[]; + }>({ + await: () => [this.props.customAttributes], + invoke: () => { + return Promise.resolve( + _.groupBy( + this.props.customAttributes.result!, + c => c.clinicalAttributeId ) - ), + ); + }, }); readonly dataTypeOptions = remoteData({ @@ -2450,6 +2558,7 @@ export default class PlotsTab extends React.Component { this.clinicalAttributeOptions, this.props.molecularProfilesInStudies, this.props.genesets, + this.customAttributeOptions, ], invoke: () => { const profiles = this.props.molecularProfilesWithData.result!; @@ -2476,6 +2585,10 @@ export default class PlotsTab extends React.Component { dataTypeIds.push(CLIN_ATTR_DATA_TYPE); } + if (!_.isEmpty(this.customAttributeOptions.result)) { + dataTypeIds.push(CUSTOM_ATTR_DATA_TYPE); + } + if ( this.props.molecularProfilesInStudies.result!.length && this.horzGenesetOptions.result && @@ -2532,6 +2645,7 @@ export default class PlotsTab extends React.Component { await: () => [ this.props.molecularProfilesInStudies, this.clinicalAttributeOptions, + this.customAttributeOptions, ], invoke: () => { const profiles = this.props.molecularProfilesInStudies.result!; @@ -2584,6 +2698,13 @@ export default class PlotsTab extends React.Component { CLIN_ATTR_DATA_TYPE ] = this.clinicalAttributeOptions.result!; } + + if (!_.isEmpty(this.customAttributeOptions.result)) { + // add custom attributes + map[ + CUSTOM_ATTR_DATA_TYPE + ] = this.customAttributeOptions.result!; + } return Promise.resolve(map); }, }); @@ -2686,6 +2807,7 @@ export default class PlotsTab extends React.Component { @computed get hasMolecularProfile() { return (dataType: string | undefined) => dataType !== CLIN_ATTR_DATA_TYPE && + dataType !== CUSTOM_ATTR_DATA_TYPE && dataType !== AlterationTypeConstants.GENERIC_ASSAY; } @@ -2822,6 +2944,7 @@ export default class PlotsTab extends React.Component { selection.dataType !== undefined && selection.dataType !== NONE_SELECTED_OPTION_STRING_VALUE && selection.dataType !== CLIN_ATTR_DATA_TYPE && + selection.dataType !== CUSTOM_ATTR_DATA_TYPE && selection.dataType !== GENESET_DATA_TYPE && !isGenericAssaySelected(selection) ); @@ -3048,6 +3171,7 @@ export default class PlotsTab extends React.Component { return makeAxisDataPromise( this.horzSelection, this.clinicalAttributeIdToClinicalAttribute, + this.customAttributeIdToClinicalAttribute, this.props.molecularProfileIdSuffixToMolecularProfiles, this.props.patientKeyToFilteredSamples, this.props.entrezGeneIdToGene, @@ -3075,6 +3199,7 @@ export default class PlotsTab extends React.Component { return makeAxisDataPromise( this.vertSelection, this.clinicalAttributeIdToClinicalAttribute, + this.customAttributeIdToClinicalAttribute, this.props.molecularProfileIdSuffixToMolecularProfiles, this.props.patientKeyToFilteredSamples, this.props.entrezGeneIdToGene, @@ -3154,6 +3279,7 @@ export default class PlotsTab extends React.Component { this.props.molecularProfileIdSuffixToMolecularProfiles, this.props.entrezGeneIdToGene, this.clinicalAttributeIdToClinicalAttribute, + this.customAttributeIdToClinicalAttribute, this.plotType, ], invoke: () => { @@ -3164,6 +3290,7 @@ export default class PlotsTab extends React.Component { .result!, this.props.entrezGeneIdToGene.result!, this.clinicalAttributeIdToClinicalAttribute.result!, + this.customAttributeIdToClinicalAttribute.result!, this.horzLogScaleFunction ) ); @@ -3175,6 +3302,7 @@ export default class PlotsTab extends React.Component { this.props.molecularProfileIdSuffixToMolecularProfiles, this.props.entrezGeneIdToGene, this.clinicalAttributeIdToClinicalAttribute, + this.customAttributeIdToClinicalAttribute, ], invoke: () => { return Promise.resolve( @@ -3184,6 +3312,7 @@ export default class PlotsTab extends React.Component { .result!, this.props.entrezGeneIdToGene.result!, this.clinicalAttributeIdToClinicalAttribute.result!, + this.customAttributeIdToClinicalAttribute.result!, this.vertLogScaleFunction ) ); @@ -3195,6 +3324,7 @@ export default class PlotsTab extends React.Component { this.props.molecularProfileIdSuffixToMolecularProfiles, this.props.entrezGeneIdToGene, this.clinicalAttributeIdToClinicalAttribute, + this.customAttributeIdToClinicalAttribute, this.plotType, ], invoke: () => { @@ -3212,6 +3342,7 @@ export default class PlotsTab extends React.Component { .result!, this.props.entrezGeneIdToGene.result!, this.clinicalAttributeIdToClinicalAttribute.result!, + this.customAttributeIdToClinicalAttribute.result!, logScaleFunc ) ); @@ -3564,6 +3695,9 @@ export default class PlotsTab extends React.Component { : structuralVariantCountByOptions; switch (axisSelection.dataType) { + case CUSTOM_ATTR_DATA_TYPE: + dataSourceLabel = 'Custom Attribute'; + break; case CLIN_ATTR_DATA_TYPE: dataSourceLabel = 'Clinical Attribute'; break; @@ -3609,6 +3743,11 @@ export default class PlotsTab extends React.Component { .clinicalAttributeIdToClinicalAttribute.result![ dataSourceValue ].description; + } else if (axisSelection.dataType === CUSTOM_ATTR_DATA_TYPE) { + dataSourceDescription = this + .customAttributeIdToClinicalAttribute.result![ + dataSourceValue + ].description; } else { dataSourceDescription = this.props .molecularProfileIdSuffixToMolecularProfiles.result![ @@ -3939,7 +4078,9 @@ export default class PlotsTab extends React.Component { style={{ display: axisSelection.dataType === - CLIN_ATTR_DATA_TYPE + CLIN_ATTR_DATA_TYPE || + axisSelection.dataType === + CUSTOM_ATTR_DATA_TYPE ? 'none' : 'block', }} @@ -3979,7 +4120,9 @@ export default class PlotsTab extends React.Component { axisSelection.dataType === CLIN_ATTR_DATA_TYPE || axisSelection.dataType === - GENESET_DATA_TYPE + GENESET_DATA_TYPE || + axisSelection.dataType === + CUSTOM_ATTR_DATA_TYPE } loadOptions={loadOptions} cacheOptions={true} @@ -4017,7 +4160,9 @@ export default class PlotsTab extends React.Component { axisSelection.dataType === CLIN_ATTR_DATA_TYPE || axisSelection.dataType === - GENESET_DATA_TYPE + GENESET_DATA_TYPE || + axisSelection.dataType === + CUSTOM_ATTR_DATA_TYPE } /> @@ -4125,6 +4270,8 @@ export default class PlotsTab extends React.Component { undefined || axisSelection.dataType === CLIN_ATTR_DATA_TYPE || + axisSelection.dataType === + CUSTOM_ATTR_DATA_TYPE || !isGenericAssaySelected( axisSelection ) diff --git a/src/shared/components/plots/PlotsTabUtils.tsx b/src/shared/components/plots/PlotsTabUtils.tsx index 97ba12da992..23af98bf8ef 100644 --- a/src/shared/components/plots/PlotsTabUtils.tsx +++ b/src/shared/components/plots/PlotsTabUtils.tsx @@ -85,6 +85,7 @@ import { AnnotatedNumericGeneMolecularData } from 'shared/model/AnnotatedNumeric import { CustomDriverNumericGeneMolecularData } from 'shared/model/CustomDriverNumericGeneMolecularData'; export const CLIN_ATTR_DATA_TYPE = 'clinical_attribute'; +export const CUSTOM_ATTR_DATA_TYPE = 'custom_attribute'; export const GENESET_DATA_TYPE = 'GENESET_SCORE'; export const dataTypeToDisplayType: { [s: string]: string } = { [AlterationTypeConstants.MUTATION_EXTENDED]: 'Mutation', @@ -95,6 +96,7 @@ export const dataTypeToDisplayType: { [s: string]: string } = { [AlterationTypeConstants.METHYLATION]: 'DNA Methylation', [CLIN_ATTR_DATA_TYPE]: 'Clinical Attribute', [GENESET_DATA_TYPE]: 'Gene Sets', + [CUSTOM_ATTR_DATA_TYPE]: 'Custom Data', }; export const NO_GENE_OPTION = { @@ -115,6 +117,7 @@ export const mutationTypeToDisplayName: { export const dataTypeDisplayOrder = [ CLIN_ATTR_DATA_TYPE, + CUSTOM_ATTR_DATA_TYPE, AlterationTypeConstants.MUTATION_EXTENDED, AlterationTypeConstants.STRUCTURAL_VARIANT, AlterationTypeConstants.COPY_NUMBER_ALTERATION, @@ -1423,6 +1426,9 @@ export function makeAxisDataPromise( clinicalAttributeIdToClinicalAttribute: MobxPromise<{ [clinicalAttributeId: string]: ClinicalAttribute; }>, + customAttributeIdToClinicalAttribute: MobxPromise<{ + [clinicalAttributeId: string]: ClinicalAttribute; + }>, molecularProfileIdSuffixToMolecularProfiles: MobxPromise<{ [molecularProfileIdSuffix: string]: MolecularProfile[]; }>, @@ -1495,6 +1501,21 @@ export function makeAxisDataPromise( ); } break; + case CUSTOM_ATTR_DATA_TYPE: + if ( + selection.dataSourceId !== undefined && + customAttributeIdToClinicalAttribute.isComplete + ) { + const attribute = customAttributeIdToClinicalAttribute.result![ + selection.dataSourceId + ]; + ret = makeAxisDataPromise_Clinical( + attribute, + clinicalDataCache, + patientKeyToSamples + ); + } + break; case GENESET_DATA_TYPE: if ( selection.genesetId !== undefined && @@ -1553,6 +1574,9 @@ export function getAxisLabel( clinicalAttributeIdToClinicalAttribute: { [clinicalAttributeId: string]: ClinicalAttribute; }, + customAttributeIdToClinicalAttribute: { + [clinicalAttributeId: string]: ClinicalAttribute; + }, logScaleFunc: IAxisLogScaleParams | undefined ) { let label = ''; @@ -1570,6 +1594,13 @@ export function getAxisLabel( switch (selection.dataType) { case NONE_SELECTED_OPTION_STRING_VALUE: break; + case CUSTOM_ATTR_DATA_TYPE: + const customAttr = + customAttributeIdToClinicalAttribute[selection.dataSourceId!]; + if (customAttr) { + label = customAttr.displayName; + } + break; case CLIN_ATTR_DATA_TYPE: const attribute = clinicalAttributeIdToClinicalAttribute[selection.dataSourceId!]; @@ -1623,10 +1654,20 @@ export function getAxisDescription( }, clinicalAttributeIdToClinicalAttribute: { [clinicalAttributeId: string]: ClinicalAttribute; + }, + customAttributeIdToClinicalAttribute: { + [clinicalAttributeId: string]: ClinicalAttribute; } ) { let ret = ''; switch (selection.dataType) { + case CUSTOM_ATTR_DATA_TYPE: + const customAttr = + customAttributeIdToClinicalAttribute[selection.dataSourceId!]; + if (customAttr) { + ret = customAttr.description; + } + break; case CLIN_ATTR_DATA_TYPE: const attribute = clinicalAttributeIdToClinicalAttribute[selection.dataSourceId!]; @@ -3169,6 +3210,7 @@ export function bothAxesNoMolecularProfile( vertSelection: AxisMenuSelection ): boolean { const noMolecularProfileDataTypes = [ + CUSTOM_ATTR_DATA_TYPE, CLIN_ATTR_DATA_TYPE, NONE_SELECTED_OPTION_STRING_VALUE, ]; diff --git a/yarn.lock b/yarn.lock index 840732ddb91..58b143d0a42 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1147,11 +1147,23 @@ dependencies: "@cspotcode/source-map-consumer" "0.8.0" +"@datadog/browser-core@5.28.0": + version "5.28.0" + resolved "https://registry.yarnpkg.com/@datadog/browser-core/-/browser-core-5.28.0.tgz#bd4677eeb08fcd3c98eba0600e34a2d8bc347ee2" + integrity sha512-aLYXaTkbZQIpyx+mxRGnj3Es6njoac8VhBaGr27KPuvwb/xJlBgAt5K/xdGxAPO135mdfq5evmguWuMpffE4Og== + "@datadog/browser-core@5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@datadog/browser-core/-/browser-core-5.4.0.tgz#c9d55357d75a6ce25a95d235795d6b68c6f85e17" integrity sha512-8HlKAcKXm7cJmzWQTVGnZiBs21BXkmRiknDaH9NbO6UT5JqYupXe/3zEesoX6Kxad2EzGlPVpBV816luWfqepw== +"@datadog/browser-logs@^5.28.0": + version "5.28.0" + resolved "https://registry.yarnpkg.com/@datadog/browser-logs/-/browser-logs-5.28.0.tgz#9f86067c0482d0ea01a86a185aff511252d52307" + integrity sha512-MdmgRnYgxkqHBYQ6nv9VDGLRQcqPgs68PLV6vj1uR1d36F6ZU2r6Blta8qhw3tWyopipw6y08MRuZ4XR2HLtQQ== + dependencies: + "@datadog/browser-core" "5.28.0" + "@datadog/browser-logs@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@datadog/browser-logs/-/browser-logs-5.4.0.tgz#fc346364b1e59acb24d400114ef74adb6f223b92"
Source - - MutationAssessor - + {/* TODO Add link when manuscript is available */} + Mutation Assessor