Add AlphaMissense in Functional prediction#160
Add AlphaMissense in Functional prediction#160JunheZoooo wants to merge 2 commits intogenome-nexus:masterfrom
Conversation
aaf55c2 to
ddcb13e
Compare
package.json
Outdated
| "rehype-raw": "^6.1.0", | ||
| "rehype-sanitize": "^5.0.0", | ||
| "remark-gfm": "^3.0.1", | ||
| "sass": "^1.32.4", |
There was a problem hiding this comment.
why do we need to update this library version?
| import AlphaMissense from './functionalPrediction/AlphaMissense'; | ||
| import { | ||
| SHOW_ALPHAMISSENSE, | ||
| SHOW_MUTATION_ASSESSOR, |
There was a problem hiding this comment.
SHOW_MUTATION_ASSESSOR shouldn't be relevant for AlphaMissense. Let's remove this.
| SHOW_MUTATION_ASSESSOR, |
| // Most of this component comes from cBioPortal-frontend | ||
|
|
| const shouldShowAlphaMissense = | ||
| SHOW_ALPHAMISSENSE && | ||
| this.props.genomeBuild === GENOME_BUILD.GRCh37; |
There was a problem hiding this comment.
Is AlphaMissense only available in grch37?
There was a problem hiding this comment.
No it's available for both grch37 and grch38
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
| ></AlphaMissense> | |
| /> |
| > | ||
| AlphaMissense | ||
| </a>{' '} | ||
| This is AlphaMissense information |
There was a problem hiding this comment.
We need to display an actual info here.
There was a problem hiding this comment.
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
| <Collapse in={this.showDetails}> | ||
| <div className="pt-2"> | ||
| <AlphamissenseValue | ||
| amClass={this.props.amClass} | ||
| amPathogenicityScore={ | ||
| this.props.amPathogenicityScore | ||
| } | ||
| /> | ||
| <br /> | ||
| <AlphamissenseLegend /> | ||
| </div> | ||
| </Collapse> |
There was a problem hiding this comment.
I think this content is always hidden because we don't seem to have a More button
| if (this.props.amClass === 'N/A') { | ||
| alphamissenseContent = <span> N/A </span>; | ||
| } else if (this.props.amClass && this.props.amClass.length > 0) { |
There was a problem hiding this comment.
| 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') { |
| const shouldShowAlphaMissense = | ||
| SHOW_ALPHAMISSENSE && | ||
| this.props.genomeBuild === GENOME_BUILD.GRCh37; |
There was a problem hiding this comment.
No it's available for both grch37 and grch38
| ); | ||
| }; | ||
|
|
||
| const AlphamissenseLegend: React.FunctionComponent = () => { |
There was a problem hiding this comment.
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
| <div> | ||
| Please refer to the score range{' '} | ||
| <a | ||
| href="https://useast.ensembl.org/info/genome/variation/prediction/protein_function.html" |
There was a problem hiding this comment.
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
| const amPathogenicityScore = | ||
| genomeNexusData && | ||
| genomeNexusData.transcript_consequences && | ||
| genomeNexusData.transcript_consequences[0].alphaMissense | ||
| ? genomeNexusData.transcript_consequences[0].alphaMissense.score | ||
| : -1; |
There was a problem hiding this comment.
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
| const amPathogenicityScore = | ||
| genomeNexusData && | ||
| genomeNexusData.transcript_consequences && | ||
| genomeNexusData.transcript_consequences[0].alphaMissense | ||
| ? genomeNexusData.transcript_consequences[0].alphaMissense.score | ||
| : -1; |
There was a problem hiding this comment.
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
| } | ||
|
|
||
| public render() { | ||
| let alphamissenseContent: JSX.Element; |
There was a problem hiding this comment.
| let alphamissenseContent: JSX.Element; | |
| let alphaMissenseContent: JSX.Element; |
| > | ||
| AlphaMissense | ||
| </a>{' '} | ||
| This is AlphaMissense information |
There was a problem hiding this comment.
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> = ( |
There was a problem hiding this comment.
| const AlphamissenseValue: React.FunctionComponent<IAlphamissenseProps> = ( | |
| const AlphaMissenseValue: React.FunctionComponent<IAlphamissenseProps> = ( |
| import functionalImpactColor from './styles/functionalImpactTooltip.module.scss'; | ||
| import functionalGroupsStyle from '../functionalGroups.module.scss'; | ||
|
|
||
| export interface IAlphamissenseProps { |
There was a problem hiding this comment.
| export interface IAlphamissenseProps { | |
| export interface IAlphaMissenseProps { |
There was a problem hiding this comment.
changed it all the alphamissense to alphaMissense
|
|
||
| const ALPHAMISSENSE_URL = 'https://www.science.org/doi/10.1126/science.adg7492'; | ||
|
|
||
| const AlphamissenseInfo: React.FunctionComponent = () => { |
There was a problem hiding this comment.
| const AlphamissenseInfo: React.FunctionComponent = () => { | |
| const AlphaMissenseInfo: React.FunctionComponent = () => { |
cb61f5b to
819e9b2
Compare
| <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 > 0.564; | ||
| significant impact; may cause disease. | ||
| <b>Benign:</b> Score < 0.34; minor impact; unlikely to | ||
| cause disease. | ||
| <b>Ambiguous:</b> Score between 0.34 and 0.564; intermediate | ||
| score; insufficient data.-{' '} | ||
| </div> |
There was a problem hiding this comment.
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
| <AlphaMissense | ||
| amClass={data.amClass} | ||
| amPathogenicityScore={data.amPathogenicityScore} | ||
| ></AlphaMissense> |
| const shouldShowAlphaMissense = | ||
| SHOW_ALPHAMISSENSE && | ||
| (this.props.genomeBuild === GENOME_BUILD.GRCh37 | ||
| || this.props.genomeBuild === GENOME_BUILD.GRCh38); |
There was a problem hiding this comment.
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
| const amClass = | ||
| genomeNexusData && | ||
| genomeNexusData.annotation_summary && | ||
| genomeNexusData.annotation_summary.transcriptConsequenceSummary && | ||
| genomeNexusData.annotation_summary.transcriptConsequenceSummary.alphaMissense | ||
| ? genomeNexusData.annotation_summary.transcriptConsequenceSummary.alphaMissense.pathogenicity | ||
| : 'N/A'; |
There was a problem hiding this comment.
| 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
| @action | ||
| onToggleDetails = () => { | ||
| this.showDetails = !this.showDetails; | ||
| }; |
0669165 to
6238031
Compare
| const shouldShowMutationAssessor = | ||
| SHOW_MUTATION_ASSESSOR && | ||
| this.props.genomeBuild === GENOME_BUILD.GRCh37; | ||
| const shouldShowAlphaMissense = SHOW_ALPHAMISSENSE; |
There was a problem hiding this comment.
Do we need to set to an extra const? Just SHOW_ALPHAMISSENSE should be enough
| // Mutation Assessor only available in grch37 | ||
| const shouldShowMutationAssessor = | ||
| SHOW_MUTATION_ASSESSOR && | ||
| this.props.genomeBuild === GENOME_BUILD.GRCh37; |
There was a problem hiding this comment.
We shouldn't remove this, right?
There was a problem hiding this comment.
Right, we should keep this feature.
| polyPhenPrediction={data.polyPhenPrediction} | ||
| /> | ||
| <Separator /> | ||
| {shouldShowMutationAssessor && ( |
There was a problem hiding this comment.
Same here, we shouldn't remove the mutation assessor checking
There was a problem hiding this comment.
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.
| IAlphaMissenseProps, | ||
| {} | ||
| > { | ||
| @observable showDetails = false; |
| if ( | ||
| this.props.amClass && | ||
| this.props.amClass.length > 0 && | ||
| this.props.amClass !== 'N/A' |
There was a problem hiding this comment.
Is it even possible to have 'N/A'?
There was a problem hiding this comment.
And do we need to check both this.props.amClass && this.props.amClass.length > 0?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
const amClass =
genomeNexusData?.annotation_summary?.transcriptConsequenceSummary
?.alphaMissense?.pathogenicity || undefined;
Isn't the default value undefined? I couldn't be 'N/A', right?
| this.props.amClass !== 'N/A' | ||
| ) { | ||
| alphaMissenseContent = ( | ||
| <span> |
| <p> | ||
| {this.props.amClass + ' '}( | ||
| {this.props.amPathogenicityScore}) | ||
| </p>{' '} |
There was a problem hiding this comment.
What is this last {' '} for? I guess we can delete it, right?
| // Mutation Assessor only available in grch37 | ||
| const shouldShowMutationAssessor = | ||
| SHOW_MUTATION_ASSESSOR && | ||
| this.props.genomeBuild === GENOME_BUILD.GRCh37; |
There was a problem hiding this comment.
Right, we should keep this feature.
| import MutationAssessor from './functionalPrediction/MutationAssesor'; | ||
| import Sift from './functionalPrediction/Sift'; | ||
| import PolyPhen2 from './functionalPrediction/PolyPhen2'; | ||
| import { SHOW_MUTATION_ASSESSOR } from '../../config/configDefaults'; |
There was a problem hiding this comment.
we need this import. sorry for the confusion.
| polyPhenPrediction={data.polyPhenPrediction} | ||
| /> | ||
| <Separator /> | ||
| {shouldShowMutationAssessor && ( |
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
const amClass =
genomeNexusData?.annotation_summary?.transcriptConsequenceSummary
?.alphaMissense?.pathogenicity || undefined;
Isn't the default value undefined? I couldn't be 'N/A', right?
015b1bb to
5442d52
Compare

Description
This pull request adds new features and improvements to the
AlphaMissenseResult Display
(1)
(2)
(3)