diff --git a/package.json b/package.json index f8674ab..c4e640c 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "classnames": "^2.2.6", "file-loader": "^4.3.0", "font-awesome": "^4.7.0", - "genome-nexus-ts-api-client": "1.1.32", + "genome-nexus-ts-api-client": "1.1.33", "lodash": "^4.17.21", "mobx": "^6.0.0", "mobx-react": "^6.0.0", diff --git a/src/component/variantPage/FunctionalPrediction.tsx b/src/component/variantPage/FunctionalPrediction.tsx index f62730c..1609afe 100644 --- a/src/component/variantPage/FunctionalPrediction.tsx +++ b/src/component/variantPage/FunctionalPrediction.tsx @@ -7,7 +7,8 @@ import { import MutationAssessor from './functionalPrediction/MutationAssesor'; import Sift from './functionalPrediction/Sift'; import PolyPhen2 from './functionalPrediction/PolyPhen2'; -import { SHOW_MUTATION_ASSESSOR } from '../../config/configDefaults'; +import AlphaMissense from './functionalPrediction/AlphaMissense'; +import { SHOW_ALPHAMISSENSE } from '../../config/configDefaults'; import Separator from '../Separator'; import { GENOME_BUILD } from '../../util/SearchUtils'; @@ -25,6 +26,8 @@ interface IFunctionalImpactData { siftPrediction: string | undefined; polyPhenScore: number | undefined; polyPhenPrediction: string | undefined; + amClass: string | undefined; + amPathogenicityScore: number | undefined; } @observer @@ -52,8 +55,28 @@ class FunctionalPrediction extends React.Component { genomeNexusData && genomeNexusData.transcript_consequences && genomeNexusData.transcript_consequences[0].polyphen_prediction; + const amClass = + genomeNexusData && + genomeNexusData.annotation_summary && + genomeNexusData.annotation_summary.transcriptConsequenceSummary && + genomeNexusData.annotation_summary.transcriptConsequenceSummary + .alphaMissense + ? genomeNexusData.annotation_summary + .transcriptConsequenceSummary.alphaMissense.pathogenicity + : 'N/A'; + const amPathogenicityScore = + genomeNexusData && + genomeNexusData.annotation_summary && + genomeNexusData.annotation_summary.transcriptConsequenceSummary && + genomeNexusData.annotation_summary.transcriptConsequenceSummary + .alphaMissense + ? genomeNexusData.annotation_summary + .transcriptConsequenceSummary.alphaMissense.score + : undefined; return { + amClass, + amPathogenicityScore, mutationAssessor, siftScore, siftPrediction, @@ -63,10 +86,10 @@ class FunctionalPrediction extends React.Component { } public render() { const data = this.getData(this.props.variantAnnotation); - // Mutation Assessor only available in grch37 - const shouldShowMutationAssessor = - SHOW_MUTATION_ASSESSOR && - this.props.genomeBuild === GENOME_BUILD.GRCh37; + const shouldShowAlphaMissense = + SHOW_ALPHAMISSENSE && + (this.props.genomeBuild === GENOME_BUILD.GRCh37 || + this.props.genomeBuild === GENOME_BUILD.GRCh38); return (
{ polyPhenPrediction={data.polyPhenPrediction} /> - {shouldShowMutationAssessor && ( - <> - - - - )} + <> + + + + + {shouldShowAlphaMissense && ( + + )}
); } diff --git a/src/component/variantPage/functionalPrediction/AlphaMissense.tsx b/src/component/variantPage/functionalPrediction/AlphaMissense.tsx new file mode 100644 index 0000000..90c28fa --- /dev/null +++ b/src/component/variantPage/functionalPrediction/AlphaMissense.tsx @@ -0,0 +1,118 @@ +import * as React from 'react'; +import { DefaultTooltip } from 'cbioportal-frontend-commons'; +import { action, makeObservable, observable } from 'mobx'; +import { observer } from 'mobx-react'; +import functionalGroupsStyle from '../functionalGroups.module.scss'; + +export interface IAlphaMissenseProps { + amClass?: string; + amPathogenicityScore?: number; +} + +const ALPHAMISSENSE_URL = 'https://www.science.org/doi/10.1126/science.adg7492'; + +const AlphaMissenseInfo: React.FunctionComponent = () => { + return ( +
+ + AlphaMissense + {' '} + is a feature within the VEP plugin used to predict the pathogenicity + of missense variants. Missense variants refer to changes in a single + base of the gene that result in a change in the encoded amino acid, + potentially affecting the function of the protein. AlphaMissense + utilizes deep learning algorithms to assess the potential impact of + these variants, aiding researchers in better understanding the + relationship between the variant, gene function, and disease.{' '} + Pathogenic: Score > 0.564; significant impact; may cause + disease. + Benign: Score < 0.34; minor impact; unlikely to cause + disease. + Ambiguous: Score between 0.34 and 0.564; intermediate score; + insufficient data.-{' '} +
+ ); +}; + +@observer +export default class AlphaMissense extends React.Component< + IAlphaMissenseProps, + {} +> { + @observable showDetails = false; + + constructor(props: IAlphaMissenseProps) { + super(props); + makeObservable(this); + } + + public render() { + let alphaMissenseContent: JSX.Element; + + const dataSource = ( + <> + AlphaMissense  + + + ); + if ( + this.props.amClass && + this.props.amClass.length > 0 && + this.props.amClass !== 'N/A' + ) { + alphaMissenseContent = ( + +

+ {this.props.amClass + ' '}( + {this.props.amPathogenicityScore}) +

{' '} +
+ ); + } else { + alphaMissenseContent = N/A ; + } + + return ( +
+
+ + +
+ } + > + + {dataSource} + + +
+
+ + + {alphaMissenseContent} + + +
+ + ); + } + + @action + onToggleDetails = () => { + this.showDetails = !this.showDetails; + }; +} diff --git a/src/config/configDefaults.ts b/src/config/configDefaults.ts index 9dd94e0..713af55 100644 --- a/src/config/configDefaults.ts +++ b/src/config/configDefaults.ts @@ -1,5 +1,5 @@ export const SHOW_MUTATION_ASSESSOR = true; - +export const SHOW_ALPHAMISSENSE = true; export function annotationQueryFields() { const fields = DEFAULT_ANNOTATION_QUERY_FIELDS; if (SHOW_MUTATION_ASSESSOR) { @@ -7,7 +7,6 @@ export function annotationQueryFields() { } return fields; } - export const DEFAULT_ANNOTATION_QUERY_FIELDS = [ 'hotspots', 'annotation_summary', diff --git a/yarn.lock b/yarn.lock index cf14d07..bbb4484 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4260,15 +4260,10 @@ caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000985.tgz#208c723beb15123eb27cc6ad9bc285b4f27a3f87" integrity sha512-1m3CC9+dYNh/FHd0V1/McOB73CxjmzzrcXi360x8mKoApUY8QIOYXg4bU5QeJmlenn++20GBI38EKw6qQpJ3kQ== -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000984: - version "1.0.30000985" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz#0eb40f6c8a8c219155cbe43c4975c0efb4a0f77f" - integrity sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w== - -caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001035, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001219: - version "1.0.30001245" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001245.tgz#45b941bbd833cb0fa53861ff2bae746b3c6ca5d4" - integrity sha512-768fM9j1PKXpOCKws6eTo3RHmvTUsG9UrpT4WoREFeZgJBTi4/X9g565azS/rVUGtqb8nt7FjLeF5u4kukERnA== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30000984, caniuse-lite@^1.0.30001035, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001219: + version "1.0.30001643" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001643.tgz" + integrity sha512-ERgWGNleEilSrHM6iUz/zJNSQTP8Mr21wDWpdgvRwcTXGAq6jMtOUPP4dqFPTdKqZ2wKTdtB+uucZ3MRpAUSmg== canvg@1.5.3: version "1.5.3" @@ -7038,10 +7033,10 @@ gauge@~2.7.3: strip-ansi "^3.0.1" wide-align "^1.1.0" -genome-nexus-ts-api-client@1.1.32, genome-nexus-ts-api-client@^1.1.32: - version "1.1.32" - resolved "https://registry.yarnpkg.com/genome-nexus-ts-api-client/-/genome-nexus-ts-api-client-1.1.32.tgz#e8a9c70d6644e17ae7f76c803ecb0d3e1720c7d9" - integrity sha512-ELXH+50alvUVnRioxCOLvxf5VcN57YVheF80kEVFBXT5cnO178tvDLHdaqbmAlEvezHwptercQ9kqh8d9TTm5Q== +genome-nexus-ts-api-client@1.1.33: + version "1.1.33" + resolved "https://registry.yarnpkg.com/genome-nexus-ts-api-client/-/genome-nexus-ts-api-client-1.1.33.tgz#aea3eafe6ca59e0187c25c487b7fb9f9b704bdde" + integrity sha512-wrbDKoVjw9etDChfacrNStlORqWlS/k2dA5DzlxFEfen3WYO7QtXAFLVSxpjanA/3sGQnVqaxreZzjTPDXhs1A== dependencies: superagent "^3.8.3" typescript "4.0.3" @@ -7054,6 +7049,14 @@ genome-nexus-ts-api-client@^1.1.28: superagent "^3.8.3" typescript "4.0.3" +genome-nexus-ts-api-client@^1.1.32: + version "1.1.32" + resolved "https://registry.yarnpkg.com/genome-nexus-ts-api-client/-/genome-nexus-ts-api-client-1.1.32.tgz#e8a9c70d6644e17ae7f76c803ecb0d3e1720c7d9" + integrity sha512-ELXH+50alvUVnRioxCOLvxf5VcN57YVheF80kEVFBXT5cnO178tvDLHdaqbmAlEvezHwptercQ9kqh8d9TTm5Q== + dependencies: + superagent "^3.8.3" + typescript "4.0.3" + gensync@^1.0.0-beta.1: version "1.0.0-beta.2" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"