Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AlphaMissense in Functional prediction #160

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JunheZoooo
Copy link

@JunheZoooo JunheZoooo commented Aug 18, 2024

Description

This pull request adds new features and improvements to the AlphaMissense

Result Display

(1)

Screenshot 2024-08-19 at 2 59 23 PM

(2)

image

(3)

Screenshot 2024-08-19 at 9 25 26 PM

@JunheZoooo JunheZoooo force-pushed the master branch 5 times, most recently from aaf55c2 to ddcb13e Compare August 19, 2024 20:27
@leexgh leexgh requested review from onursumer and leexgh August 19, 2024 20:41
package.json Outdated
@@ -53,6 +52,7 @@
"rehype-raw": "^6.1.0",
"rehype-sanitize": "^5.0.0",
"remark-gfm": "^3.0.1",
"sass": "^1.32.4",
Copy link
Member

Choose a reason for hiding this comment

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

why do we need to update this library version?

Copy link
Author

Choose a reason for hiding this comment

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

got it

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

Comment on lines 14 to 15
// Most of this component comes from cBioPortal-frontend

Copy link
Member

Choose a reason for hiding this comment

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

let's keep this comment

Copy link
Author

Choose a reason for hiding this comment

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

changed it

Comment on lines 89 to 91
const shouldShowAlphaMissense =
SHOW_ALPHAMISSENSE &&
this.props.genomeBuild === GENOME_BUILD.GRCh37;
Copy link
Member

Choose a reason for hiding this comment

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

Is AlphaMissense only available in grch37?

Copy link
Member

Choose a reason for hiding this comment

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

No it's available for both grch37 and grch38

Copy link
Author

Choose a reason for hiding this comment

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

changed it to
const shouldShowAlphaMissense =
SHOW_ALPHAMISSENSE &&
(this.props.genomeBuild === GENOME_BUILD.GRCh37
|| this.props.genomeBuild === GENOME_BUILD.GRCh38);

<AlphaMissense
amClass={data.amClass}
amPathogenicityScore={data.amPathogenicityScore}
></AlphaMissense>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
></AlphaMissense>
/>

Copy link
Author

Choose a reason for hiding this comment

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

changed it

Copy link
Member

@leexgh leexgh Aug 20, 2024

Choose a reason for hiding this comment

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

</AlphaMissense> Still there

Copy link
Author

Choose a reason for hiding this comment

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

changed it

>
AlphaMissense
</a>{' '}
This is AlphaMissense information
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 to display an actual info here.

Copy link
Member

Choose a reason for hiding this comment

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

Please add a short description of what is Alpha Missense (1-2 sentences), and briefly describe the pathogenicity classes and score range of each group, also add link to Alpha Missense text to the paper

Copy link
Author

Choose a reason for hiding this comment

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

added it

Comment on lines 211 to 222
<Collapse in={this.showDetails}>
<div className="pt-2">
<AlphamissenseValue
amClass={this.props.amClass}
amPathogenicityScore={
this.props.amPathogenicityScore
}
/>
<br />
<AlphamissenseLegend />
</div>
</Collapse>
Copy link
Member

Choose a reason for hiding this comment

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

I think this content is always hidden because we don't seem to have a More button

Copy link
Author

@JunheZoooo JunheZoooo Aug 20, 2024

Choose a reason for hiding this comment

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

deleted Collapse part

Comment on lines 166 to 168
if (this.props.amClass === 'N/A') {
alphamissenseContent = <span> N/A </span>;
} else if (this.props.amClass && this.props.amClass.length > 0) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (this.props.amClass === 'N/A') {
alphamissenseContent = <span> N/A </span>;
} else if (this.props.amClass && this.props.amClass.length > 0) {
if (this.props.amClass && this.props.amClass.length > 0 && this.props.amClass !== 'N/A') {

Copy link
Author

Choose a reason for hiding this comment

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

changed it

Comment on lines 89 to 91
const shouldShowAlphaMissense =
SHOW_ALPHAMISSENSE &&
this.props.genomeBuild === GENOME_BUILD.GRCh37;
Copy link
Member

Choose a reason for hiding this comment

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

No it's available for both grch37 and grch38

);
};

const AlphamissenseLegend: React.FunctionComponent = () => {
Copy link
Member

@leexgh leexgh Aug 19, 2024

Choose a reason for hiding this comment

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

Looks like this is copied from Sift? Let's keep the code clean and make sure only components we need are in the pull request

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

<div>
Please refer to the score range{' '}
<a
href="https://useast.ensembl.org/info/genome/variation/prediction/protein_function.html"
Copy link
Member

@leexgh leexgh Aug 19, 2024

Choose a reason for hiding this comment

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

What is this link referring to? Is this element copied from Sift or Polyphen? Please make sure we need the exact same element before copy anything, otherwise it will probably cause more issues

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

Comment on lines 66 to 71
const amPathogenicityScore =
genomeNexusData &&
genomeNexusData.transcript_consequences &&
genomeNexusData.transcript_consequences[0].alphaMissense
? genomeNexusData.transcript_consequences[0].alphaMissense.score
: -1;
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to get through annotationSummary? The transcript_consequences[0] may not be the canonical transcript for this variant and alpha missense is associated with transcript id. Using annotationSummary's transcriptConsequenceSummary will make sure it's canonical transcript

Copy link
Author

Choose a reason for hiding this comment

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

changed it

Comment on lines 66 to 71
const amPathogenicityScore =
genomeNexusData &&
genomeNexusData.transcript_consequences &&
genomeNexusData.transcript_consequences[0].alphaMissense
? genomeNexusData.transcript_consequences[0].alphaMissense.score
: -1;
Copy link
Member

Choose a reason for hiding this comment

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

Is -1 an appropriate default value? For people unfamiliar with the score range, -1 might confuse them. I believe the score and pathogenicity are always together, they either both exist or both not exsit, so we can do the checking on a higher level and show NA to avoid setting default value

Copy link
Author

Choose a reason for hiding this comment

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

changed it to undefined

}

public render() {
let alphamissenseContent: JSX.Element;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
let alphamissenseContent: JSX.Element;
let alphaMissenseContent: JSX.Element;

Copy link
Author

Choose a reason for hiding this comment

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

changed it

>
AlphaMissense
</a>{' '}
This is AlphaMissense information
Copy link
Member

Choose a reason for hiding this comment

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

Please add a short description of what is Alpha Missense (1-2 sentences), and briefly describe the pathogenicity classes and score range of each group, also add link to Alpha Missense text to the paper

);
};

const AlphamissenseValue: React.FunctionComponent<IAlphamissenseProps> = (
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const AlphamissenseValue: React.FunctionComponent<IAlphamissenseProps> = (
const AlphaMissenseValue: React.FunctionComponent<IAlphamissenseProps> = (

Copy link
Author

Choose a reason for hiding this comment

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

changed it

import functionalImpactColor from './styles/functionalImpactTooltip.module.scss';
import functionalGroupsStyle from '../functionalGroups.module.scss';

export interface IAlphamissenseProps {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
export interface IAlphamissenseProps {
export interface IAlphaMissenseProps {

Copy link
Author

@JunheZoooo JunheZoooo Aug 20, 2024

Choose a reason for hiding this comment

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

changed it all the alphamissense to alphaMissense


const ALPHAMISSENSE_URL = 'https://www.science.org/doi/10.1126/science.adg7492';

const AlphamissenseInfo: React.FunctionComponent = () => {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const AlphamissenseInfo: React.FunctionComponent = () => {
const AlphaMissenseInfo: React.FunctionComponent = () => {

Copy link
Author

Choose a reason for hiding this comment

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

changed it

@JunheZoooo JunheZoooo force-pushed the master branch 2 times, most recently from cb61f5b to 819e9b2 Compare August 20, 2024 02:13
Comment on lines 19 to 44
<div>
<a
href={ALPHAMISSENSE_URL}
target="_blank"
rel="noopener noreferrer"
>
AlphaMissense
</a>{' '}
{' '}
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. <b>Pathogenic:</b> Score &gt; 0.564;
significant impact; may cause disease.
<b>Benign:</b> Score &lt; 0.34; minor impact; unlikely to
cause disease.
<b>Ambiguous:</b> Score between 0.34 and 0.564; intermediate
score; insufficient data.-{' '}
</div>
Copy link
Member

Choose a reason for hiding this comment

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

Some suggestions I have:

  • Can you make the description a bit shorter?
  • "alpha missense is a feature within the VEP plugin used to predict the pathogenicity of missense variants" could confuse users. This should be about what is alpha missense itself, not where we get the data from.
  • Probably no need to describe what is missense variant, people using this website usually already know it.
  • Could you clean up extra - and whitespace?
  • Can you show score and range in new line with bullet point? Right now it's a bit hard to read

Copy link
Author

Choose a reason for hiding this comment

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

changed it

Copy link
Author

Choose a reason for hiding this comment

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

image

<AlphaMissense
amClass={data.amClass}
amPathogenicityScore={data.amPathogenicityScore}
></AlphaMissense>
Copy link
Member

@leexgh leexgh Aug 20, 2024

Choose a reason for hiding this comment

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

</AlphaMissense> Still there

Comment on lines 85 to 88
const shouldShowAlphaMissense =
SHOW_ALPHAMISSENSE &&
(this.props.genomeBuild === GENOME_BUILD.GRCh37
|| this.props.genomeBuild === GENOME_BUILD.GRCh38);
Copy link
Member

Choose a reason for hiding this comment

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

No need to check the genome build in this case, it will always be either grch37 or grch38, no other options available. Just the SHOW_ALPHAMISSENSE should do the work

Copy link
Author

Choose a reason for hiding this comment

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

changed it

Comment on lines 58 to 66
const amClass =
genomeNexusData &&
genomeNexusData.annotation_summary &&
genomeNexusData.annotation_summary.transcriptConsequenceSummary &&
genomeNexusData.annotation_summary.transcriptConsequenceSummary.alphaMissense
? genomeNexusData.annotation_summary.transcriptConsequenceSummary.alphaMissense.pathogenicity
: 'N/A';
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const amClass =
genomeNexusData &&
genomeNexusData.annotation_summary &&
genomeNexusData.annotation_summary.transcriptConsequenceSummary &&
genomeNexusData.annotation_summary.transcriptConsequenceSummary.alphaMissense
? genomeNexusData.annotation_summary.transcriptConsequenceSummary.alphaMissense.pathogenicity
: 'N/A';
const amClass = genomeNexusData?.annotation_summary?.transcriptConsequenceSummary?.alphaMissense?.pathogenicity || undefined;

Same for amPathogenicityScore

Copy link
Author

Choose a reason for hiding this comment

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

changed it

Comment on lines 115 to 113
@action
onToggleDetails = () => {
this.showDetails = !this.showDetails;
};
Copy link
Member

Choose a reason for hiding this comment

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

Where do we use this?

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

@JunheZoooo JunheZoooo force-pushed the master branch 3 times, most recently from 0669165 to 6238031 Compare August 20, 2024 19:46
const shouldShowMutationAssessor =
SHOW_MUTATION_ASSESSOR &&
this.props.genomeBuild === GENOME_BUILD.GRCh37;
const shouldShowAlphaMissense = SHOW_ALPHAMISSENSE;
Copy link
Member

@leexgh leexgh Aug 20, 2024

Choose a reason for hiding this comment

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

Do we need to set to an extra const? Just SHOW_ALPHAMISSENSE should be enough

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

Comment on lines 66 to 69
// Mutation Assessor only available in grch37
const shouldShowMutationAssessor =
SHOW_MUTATION_ASSESSOR &&
this.props.genomeBuild === GENOME_BUILD.GRCh37;
Copy link
Member

Choose a reason for hiding this comment

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

We shouldn't remove this, right?

Copy link
Member

Choose a reason for hiding this comment

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

Right, we should keep this feature.

Copy link
Author

Choose a reason for hiding this comment

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

changed back

return (
<div>
<PolyPhen2
polyPhenScore={data.polyPhenScore}
polyPhenPrediction={data.polyPhenPrediction}
/>
<Separator />
{shouldShowMutationAssessor && (
Copy link
Member

Choose a reason for hiding this comment

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

Same here, we shouldn't remove the mutation assessor checking

Copy link
Member

Choose a reason for hiding this comment

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

yes we should keep it, I was only referring to the import SHOW_MUTATION_ASSESSOR statement which seemed redundant to me but probably I overlooked those changes.

Copy link
Author

Choose a reason for hiding this comment

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

changed back

IAlphaMissenseProps,
{}
> {
@observable showDetails = false;
Copy link
Member

Choose a reason for hiding this comment

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

This is not used anymore

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

if (
this.props.amClass &&
this.props.amClass.length > 0 &&
this.props.amClass !== 'N/A'
Copy link
Member

Choose a reason for hiding this comment

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

Is it even possible to have 'N/A'?

Copy link
Member

Choose a reason for hiding this comment

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

And do we need to check both this.props.amClass && this.props.amClass.length > 0?

Copy link
Author

Choose a reason for hiding this comment

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

amClass has a default value of 'na'. The checks are in place to ensure that the value is valid, not an empty string, and not equal to 'N/A', which helps prevent any issues with uninitialized or default values.

Copy link
Member

@leexgh leexgh Aug 21, 2024

Choose a reason for hiding this comment

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

@JunheZoooo

const amClass =
            genomeNexusData?.annotation_summary?.transcriptConsequenceSummary
                ?.alphaMissense?.pathogenicity || undefined;

Isn't the default value undefined? I couldn't be 'N/A', right?

Copy link
Author

Choose a reason for hiding this comment

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

changed it

this.props.amClass !== 'N/A'
) {
alphaMissenseContent = (
<span>
Copy link
Member

@leexgh leexgh Aug 20, 2024

Choose a reason for hiding this comment

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

Do we need the extra <span>?

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

<p>
{this.props.amClass + ' '}(
{this.props.amPathogenicityScore})
</p>{' '}
Copy link
Member

@leexgh leexgh Aug 20, 2024

Choose a reason for hiding this comment

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

What is this last {' '} for? I guess we can delete it, right?

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

Comment on lines 66 to 69
// Mutation Assessor only available in grch37
const shouldShowMutationAssessor =
SHOW_MUTATION_ASSESSOR &&
this.props.genomeBuild === GENOME_BUILD.GRCh37;
Copy link
Member

Choose a reason for hiding this comment

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

Right, we should keep this feature.

@@ -7,9 +7,9 @@ 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.

return (
<div>
<PolyPhen2
polyPhenScore={data.polyPhenScore}
polyPhenPrediction={data.polyPhenPrediction}
/>
<Separator />
{shouldShowMutationAssessor && (
Copy link
Member

Choose a reason for hiding this comment

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

yes we should keep it, I was only referring to the import SHOW_MUTATION_ASSESSOR statement which seemed redundant to me but probably I overlooked those changes.

if (
this.props.amClass &&
this.props.amClass.length > 0 &&
this.props.amClass !== 'N/A'
Copy link
Member

@leexgh leexgh Aug 21, 2024

Choose a reason for hiding this comment

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

@JunheZoooo

const amClass =
            genomeNexusData?.annotation_summary?.transcriptConsequenceSummary
                ?.alphaMissense?.pathogenicity || undefined;

Isn't the default value undefined? I couldn't be 'N/A', right?

@JunheZoooo JunheZoooo force-pushed the master branch 2 times, most recently from 015b1bb to 5442d52 Compare August 21, 2024 19:15
Copy link
Member

@leexgh leexgh left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants