Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
24 changes: 22 additions & 2 deletions src/component/variantPage/FunctionalPrediction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ import {
import MutationAssessor from './functionalPrediction/MutationAssesor';
import Sift from './functionalPrediction/Sift';
import PolyPhen2 from './functionalPrediction/PolyPhen2';
import { SHOW_MUTATION_ASSESSOR } from '../../config/configDefaults';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need this import. sorry for the confusion.

import AlphaMissense from './functionalPrediction/AlphaMissense';
import {
SHOW_ALPHAMISSENSE,
SHOW_MUTATION_ASSESSOR,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHOW_MUTATION_ASSESSOR shouldn't be relevant for AlphaMissense. Let's remove this.

Suggested change
SHOW_MUTATION_ASSESSOR,

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deleted it

} from '../../config/configDefaults';
import Separator from '../Separator';
import { GENOME_BUILD } from '../../util/SearchUtils';

Expand All @@ -25,6 +29,8 @@ interface IFunctionalImpactData {
siftPrediction: string | undefined;
polyPhenScore: number | undefined;
polyPhenPrediction: string | undefined;
amClass: string | undefined;
amPathogenicityScore: number | undefined;
}

@observer
Expand Down Expand Up @@ -52,8 +58,15 @@ class FunctionalPrediction extends React.Component<IFunctionalPredictionProps> {
genomeNexusData &&
genomeNexusData.transcript_consequences &&
genomeNexusData.transcript_consequences[0].polyphen_prediction;

const amClass =
genomeNexusData?.annotation_summary?.transcriptConsequenceSummary
?.alphaMissense?.pathogenicity || undefined;
const amPathogenicityScore =
genomeNexusData?.annotation_summary?.transcriptConsequenceSummary
?.alphaMissense?.score || undefined;
return {
amClass,
amPathogenicityScore,
mutationAssessor,
siftScore,
siftPrediction,
Expand Down Expand Up @@ -89,6 +102,13 @@ class FunctionalPrediction extends React.Component<IFunctionalPredictionProps> {
siftScore={data.siftScore}
siftPrediction={data.siftPrediction}
/>
<Separator />
{SHOW_ALPHAMISSENSE && (
<AlphaMissense
amClass={data.amClass}
amPathogenicityScore={data.amPathogenicityScore}
/>
)}
</div>
);
}
Expand Down
110 changes: 110 additions & 0 deletions src/component/variantPage/functionalPrediction/AlphaMissense.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
import * as React from 'react';
import { DefaultTooltip } from 'cbioportal-frontend-commons';
import { makeObservable } from 'mobx';
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 (
<div>
<a
href={ALPHAMISSENSE_URL}
target="_blank"
rel="noopener noreferrer"
>
AlphaMissense
</a>{' '}
uses deep learning to assess the pathogenicity of missense variants,
indicating how they might affect gene function and contribute to
disease.
<div>
<b>Scores:</b>
<ul>
<li>
<b>Pathogenic:</b> Score &gt; 0.564 – likely to cause
disease.
</li>
<li>
<b>Benign:</b> Score &lt; 0.34 – unlikely to cause
disease.
</li>
<li>
<b>Ambiguous:</b> Score between 0.34 and 0.564 – unclear
impact; insufficient data.
</li>
</ul>
</div>
</div>
);
};

export default class AlphaMissense extends React.Component<
IAlphaMissenseProps,
{}
> {
constructor(props: IAlphaMissenseProps) {
super(props);
makeObservable(this);
}

public render() {
let alphaMissenseContent: JSX.Element;

const dataSource = (
<>
AlphaMissense&nbsp;
<i className="fas fa-external-link-alt" />
</>
);
if (this.props.amClass) {
alphaMissenseContent = (
<p>
{this.props.amClass + ' '}({this.props.amPathogenicityScore}
)
</p>
);
} else {
alphaMissenseContent = <span> N/A </span>;
}

return (
<div className={functionalGroupsStyle['functional-group']}>
<div className={functionalGroupsStyle['data-source']}>
<DefaultTooltip
placement="top"
overlay={
<div style={{ maxWidth: 450 }}>
<AlphaMissenseInfo />
</div>
}
>
<a
href={ALPHAMISSENSE_URL}
target="_blank"
rel="noopener noreferrer"
>
{dataSource}
</a>
</DefaultTooltip>
</div>
<div>
<span className={functionalGroupsStyle['data-with-link']}>
<a
href={ALPHAMISSENSE_URL}
target="_blank"
rel="noopener noreferrer"
>
{alphaMissenseContent}
</a>
</span>
</div>
</div>
);
}
}
3 changes: 1 addition & 2 deletions src/config/configDefaults.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
export const SHOW_MUTATION_ASSESSOR = true;

export const SHOW_ALPHAMISSENSE = true;
export function annotationQueryFields() {
const fields = DEFAULT_ANNOTATION_QUERY_FIELDS;
if (SHOW_MUTATION_ASSESSOR) {
fields.push('mutation_assessor');
}
return fields;
}

export const DEFAULT_ANNOTATION_QUERY_FIELDS = [
'hotspots',
'annotation_summary',
Expand Down
29 changes: 16 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand Down