-
Notifications
You must be signed in to change notification settings - Fork 12
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
base: master
Are you sure you want to change the base?
Conversation
aaf55c2
to
ddcb13e
Compare
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", |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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.
SHOW_MUTATION_ASSESSOR, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleted it
// Most of this component comes from cBioPortal-frontend | ||
|
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed it
const shouldShowAlphaMissense = | ||
SHOW_ALPHAMISSENSE && | ||
this.props.genomeBuild === GENOME_BUILD.GRCh37; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
></AlphaMissense> | |
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
</AlphaMissense>
Still there
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added it
<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.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleted Collapse part
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed it
const shouldShowAlphaMissense = | ||
SHOW_ALPHAMISSENSE && | ||
this.props.genomeBuild === GENOME_BUILD.GRCh37; |
There was a problem hiding this comment.
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 = () => { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleted it
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.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed it
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.
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
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let alphamissenseContent: JSX.Element; | |
let alphaMissenseContent: JSX.Element; |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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> = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const AlphamissenseValue: React.FunctionComponent<IAlphamissenseProps> = ( | |
const AlphaMissenseValue: React.FunctionComponent<IAlphamissenseProps> = ( |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export interface IAlphamissenseProps { | |
export interface IAlphaMissenseProps { |
There was a problem hiding this comment.
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 = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const AlphamissenseInfo: React.FunctionComponent = () => { | |
const AlphaMissenseInfo: React.FunctionComponent = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed it
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.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<AlphaMissense | ||
amClass={data.amClass} | ||
amPathogenicityScore={data.amPathogenicityScore} | ||
></AlphaMissense> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
</AlphaMissense>
Still there
const shouldShowAlphaMissense = | ||
SHOW_ALPHAMISSENSE && | ||
(this.props.genomeBuild === GENOME_BUILD.GRCh37 | ||
|| this.props.genomeBuild === GENOME_BUILD.GRCh38); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed it
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed it
@action | ||
onToggleDetails = () => { | ||
this.showDetails = !this.showDetails; | ||
}; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleted it
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.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleted it
// Mutation Assessor only available in grch37 | ||
const shouldShowMutationAssessor = | ||
SHOW_MUTATION_ASSESSOR && | ||
this.props.genomeBuild === GENOME_BUILD.GRCh37; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 && ( |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
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'?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const amClass =
genomeNexusData?.annotation_summary?.transcriptConsequenceSummary
?.alphaMissense?.pathogenicity || undefined;
Isn't the default value undefined
? I couldn't be 'N/A', right?
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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>
?
There was a problem hiding this comment.
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>{' '} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleted it
// Mutation Assessor only available in grch37 | ||
const shouldShowMutationAssessor = | ||
SHOW_MUTATION_ASSESSOR && | ||
this.props.genomeBuild === GENOME_BUILD.GRCh37; |
There was a problem hiding this comment.
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'; |
There was a problem hiding this comment.
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 && ( |
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this 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!
Description
This pull request adds new features and improvements to the
AlphaMissense
Result Display
(1)
(2)
(3)