diff --git a/packages/react-variant-view/src/component/functionalPrediction/FunctionalPrediction.tsx b/packages/react-variant-view/src/component/functionalPrediction/FunctionalPrediction.tsx index 342a982c845..63b2de35916 100644 --- a/packages/react-variant-view/src/component/functionalPrediction/FunctionalPrediction.tsx +++ b/packages/react-variant-view/src/component/functionalPrediction/FunctionalPrediction.tsx @@ -31,9 +31,7 @@ class FunctionalPrediction extends React.Component { genomeNexusData: VariantAnnotation | undefined ): IFunctionalImpactData { const mutationAssessor = - genomeNexusData && - genomeNexusData.mutation_assessor && - genomeNexusData.mutation_assessor.annotation; + genomeNexusData && genomeNexusData.mutation_assessor; const siftScore = genomeNexusData && genomeNexusData.transcript_consequences && diff --git a/packages/react-variant-view/src/component/functionalPrediction/MutationAssessor.tsx b/packages/react-variant-view/src/component/functionalPrediction/MutationAssessor.tsx index f66039d6e2d..255153a4d21 100644 --- a/packages/react-variant-view/src/component/functionalPrediction/MutationAssessor.tsx +++ b/packages/react-variant-view/src/component/functionalPrediction/MutationAssessor.tsx @@ -27,25 +27,20 @@ export default class MutationAssessor extends React.Component< IMutationAssessorProps, {} > { - private static MUTATION_ASSESSOR_URL: string = - 'http://mutationassessor.org/r3/'; + // Change to new url when available + // New url will need to be added in tooltip, discrption, "Please refer to the score range here." and "Go to Mutation Assessor" + // private static MUTATION_ASSESSOR_URL: string = 'http://mutationassessor.org/r3/'; private static mutationAssessorText() { return (
- - Mutation Assessor - {' '} - predicts the functional impact of amino-acid substitutions in - proteins, such as mutations discovered in cancer or missense - polymorphisms. The functional impact is assessed based on - evolutionary conservation of the affected amino acid in protein - homologs. The method has been validated on a large set (60k) of - disease associated (OMIM) and polymorphic variants. + Mutation Assessor predicts the functional impact of amino-acid + substitutions in proteins, such as mutations discovered in + cancer or missense polymorphisms. The functional impact is + assessed based on evolutionary conservation of the affected + amino acid in protein homologs. The method has been validated on + a large set of disease associated and polymorphic variants + (ClinVar).
); } @@ -143,24 +138,6 @@ export default class MutationAssessor extends React.Component< ); } - // This is mostly to make the legacy MA links work - private static maLink(link: string | undefined) { - let url = null; - - // ignore invalid links ("", "NA", "Not Available") - if (link) { - // getma.org is the legacy link, need to replace it with the actual value - url = link.replace('getma.org', 'mutationassessor.org/r3'); - - // prepend "http://" if needed - if (url.indexOf('http://') !== 0) { - url = `http://${url}`; - } - } - - return url; - } - constructor(props: IMutationAssessorProps) { super(props); @@ -179,11 +156,11 @@ export default class MutationAssessor extends React.Component< if ( this.props.mutationAssessor && - this.props.mutationAssessor.functionalImpact != null && - this.props.mutationAssessor.functionalImpact !== '' + this.props.mutationAssessor.functionalImpactPrediction != null && + this.props.mutationAssessor.functionalImpactPrediction !== '' ) { const maData = this.props.mutationAssessor; - maContent = {maData.functionalImpact}; + maContent = {maData.functionalImpactPrediction}; } else { maContent = N/A; } @@ -191,26 +168,12 @@ export default class MutationAssessor extends React.Component< return (
- {this.mutationAssessorTooltip( - - {dataSource} - - )} + {this.mutationAssessorTooltip(<>{dataSource})}
{this.mutationAssessorTooltip( - - {maContent} - + {maContent} )}
@@ -221,12 +184,7 @@ export default class MutationAssessor extends React.Component< private mutationAssessorData() { if (this.props.mutationAssessor) { const maData = this.props.mutationAssessor; - const xVarLink = MutationAssessor.maLink( - `http://mutationassessor.org/r3/?cm=var&p=${maData.uniprotId}&var=${maData.variant}` - ); - const msaLink = MutationAssessor.maLink(maData.msaLink); - const pdbLink = MutationAssessor.maLink(maData.pdbLink); - const impact = maData.functionalImpact ? ( + const impact = maData.functionalImpactPrediction ? (
{(maData.functionalImpactScore || @@ -245,86 +203,12 @@ export default class MutationAssessor extends React.Component< )}
- - Please refer to the score range{' '} - - here - - . -
) : null; - const xVar = - xVarLink && - maData.uniprotId.length !== 0 && - maData.variant.length !== 0 ? ( -
- - Mutation Assessor - Go to Mutation Assessor - -
- ) : null; - - const msa = - msaLink && maData.msaLink.length !== 0 ? ( -
- - - msa - - Multiple Sequence Alignment - -
- ) : null; - - const pdb = - pdbLink && maData.pdbLink.length !== 0 ? ( -
- - - 3D - - Mutation Assessor 3D View - -
- ) : null; - return (
{impact} - {msa} - {pdb} - {xVar}
); diff --git a/src/shared/components/annotation/genomeNexus/MutationAssessor.tsx b/src/shared/components/annotation/genomeNexus/MutationAssessor.tsx index 4665e3f3e37..592387c6b6b 100644 --- a/src/shared/components/annotation/genomeNexus/MutationAssessor.tsx +++ b/src/shared/components/annotation/genomeNexus/MutationAssessor.tsx @@ -19,7 +19,8 @@ export default class MutationAssessor extends React.Component< IMutationAssessorProps, {} > { - static MUTATION_ASSESSOR_URL: string = 'http://mutationassessor.org/r3/'; + // Replace to new url when publication available + // static MUTATION_ASSESSOR_URL: string = 'http://mutationassessor.org/r3/'; constructor(props: IMutationAssessorProps) { super(props); @@ -31,7 +32,7 @@ export default class MutationAssessor extends React.Component< mutationAssessorData: MutationAssessorData | undefined ): string { if (mutationAssessorData) { - return `impact: ${mutationAssessorData.functionalImpact}, score: ${mutationAssessorData.functionalImpactScore}`; + return `impact: ${mutationAssessorData.functionalImpactPrediction}, score: ${mutationAssessorData.functionalImpactScore}`; } else { return 'NA'; } @@ -44,7 +45,7 @@ export default class MutationAssessor extends React.Component< if ( this.props.mutationAssessor && - this.props.mutationAssessor.functionalImpact !== null + this.props.mutationAssessor.functionalImpactPrediction !== null ) { const maData = this.props.mutationAssessor; maContent = ( @@ -52,7 +53,7 @@ export default class MutationAssessor extends React.Component< className={classNames( annotationStyles['annotation-item-text'], (mutationAssessorColumn as any)[ - `ma-${maData.functionalImpact}` + `ma-${maData.functionalImpactPrediction}` ] )} > @@ -80,15 +81,14 @@ export default class MutationAssessor extends React.Component< private tooltipContent() { if (this.props.mutationAssessor) { const maData = this.props.mutationAssessor; - const impact = maData.functionalImpact ? ( + const impact = maData.functionalImpactPrediction ? (
@@ -97,11 +97,11 @@ export default class MutationAssessor extends React.Component< - {maData.functionalImpact} + {maData.functionalImpactPrediction} diff --git a/src/shared/components/mutationTable/column/FunctionalImpactColumnFormatter.tsx b/src/shared/components/mutationTable/column/FunctionalImpactColumnFormatter.tsx index c3f418ae07f..ddb2254f69d 100644 --- a/src/shared/components/mutationTable/column/FunctionalImpactColumnFormatter.tsx +++ b/src/shared/components/mutationTable/column/FunctionalImpactColumnFormatter.tsx @@ -306,18 +306,13 @@ class FunctionalImpactColumnTooltip extends React.Component< public static mutationAssessorText() { return (
- - Mutation Assessor - {' '} - predicts the functional impact of amino-acid substitutions in - proteins, such as mutations discovered in cancer or missense - polymorphisms. The functional impact is assessed based on - evolutionary conservation of the affected amino acid in protein - homologs. The method has been validated on a large set (60k) of - disease associated (OMIM) and polymorphic variants. + Mutation Assessor predicts the functional impact of amino-acid + substitutions in proteins, such as mutations discovered in + cancer or missense polymorphisms. The functional impact is + assessed based on evolutionary conservation of the affected + amino acid in protein homologs. The method has been validated on + a large set of disease associated and polymorphic variants + (ClinVar).
); } @@ -531,13 +526,7 @@ export default class FunctionalImpactColumnFormatter { public static getMutationAssessorData( mutationAssessorDataCache: VariantAnnotation | null ): MutationAssessorData | undefined { - if (!mutationAssessorDataCache) { - return undefined; - } else { - return mutationAssessorDataCache.mutation_assessor - ? mutationAssessorDataCache.mutation_assessor.annotation - : undefined; - } + return mutationAssessorDataCache?.mutation_assessor; } public static renderFunction(
Source - - MutationAssessor - + {/* Add link when pubilcation is available */} + MutationAssessor