+ Pathogenicity predictions
+
+
+
+ >
+}
\ No newline at end of file
diff --git a/src/ui/components/search/CaddHelper.ts b/src/ui/components/search/CaddHelper.ts
deleted file mode 100644
index 28ae3028..00000000
--- a/src/ui/components/search/CaddHelper.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-export function getColor(CADD: number) {
- if (CADD < 15) {
- return 'DarkGreen';
- } else if (CADD >= 15 && CADD < 20) {
- return 'DarkSeaGreen';
- } else if (CADD >= 20 && CADD < 25) {
- return 'Gold';
- } else if (CADD >= 25 && CADD < 30) {
- return 'DarkOrange';
- } else if (CADD >= 30) {
- return 'FireBrick';
- }
-}
-
-export function getTitle(cadd: string | undefined) {
- const CADD = parseFloat(cadd!)
- if (CADD < 15) {
- return '< 15.0 - Likely benign';;
- } else if (CADD >= 15 && CADD < 20) {
- return '15.0 to 19.9 - Potentially deleterious';
- } else if (CADD >= 20 && CADD < 25) {
- return '20.0 to 24.9 - Quite likely deleterious';
- } else if (CADD >= 25 && CADD < 30) {
- return '25.0 to 29.9 - Probably deleterious';
- } else if (CADD >= 30) {
- return '> 29.9 - Highly likely deleterious';
- }
-}
-
-export function getCaddCss(CADD: string | undefined) {
- if (CADD === undefined || CADD === '-') {
- return '';
- } else {
- return `label warning cadd-score cadd-score--${getColor(parseFloat(CADD))}`
- }
-}
\ No newline at end of file
diff --git a/src/ui/components/search/CaddLegendColors.tsx b/src/ui/components/search/CaddLegendColors.tsx
deleted file mode 100644
index 45124be3..00000000
--- a/src/ui/components/search/CaddLegendColors.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-import { EmptyElement } from "../../../constants/ConstElement";
-import { getColor, getTitle } from "./CaddHelper";
-
-function CaddLegendColors() {
- return (
-
-
CADD phred-like score colour
-
-
-
-
-
-
-
-
-
-
- );
-}
-
-function CaddColourLi(props: { cadd: number }) {
- const texts = getTitle(props.cadd.toString())?.split("-")
- if (!texts || texts.length < 2)
- return EmptyElement
- return <>
-
-
-
{texts[0]}
-
{texts[1]}
-
- >
-}
-export default CaddLegendColors;
diff --git a/src/ui/components/search/CaddScorePred.ts b/src/ui/components/search/CaddScorePred.ts
new file mode 100644
index 00000000..c5f8b4bb
--- /dev/null
+++ b/src/ui/components/search/CaddScorePred.ts
@@ -0,0 +1,28 @@
+import {PredAttr} from "../function/prediction/Prediction";
+import {STD_COLOR_GRADIENT} from "../function/prediction/PredConstants";
+
+export const CADD_SCORE_ATTR: PredAttr[] = [
+ {color: 'DarkGreen', stdColor: STD_COLOR_GRADIENT.rgbAt(0).toHexString(), title: '<15.0 Likely benign' },
+ {color: 'DarkSeaGreen', stdColor: STD_COLOR_GRADIENT.rgbAt(0.5).toHexString(), title: '15.0-19.9 Potentially deleterious' },
+ {color: 'Gold', stdColor: STD_COLOR_GRADIENT.rgbAt(0.65).toHexString(), title: '20.0-24.9 Quite likely deleterious' },
+ {color: 'DarkOrange', stdColor: STD_COLOR_GRADIENT.rgbAt(0.8).toHexString(), title: '25.0-29.9 Probably deleterious' },
+ {color: 'FireBrick', stdColor: STD_COLOR_GRADIENT.rgbAt(1).toHexString(), title: '>29.9 Highly likely deleterious' }
+]
+
+export function caddScoreAttr(cadd?: string) {
+ if (cadd === undefined || cadd === '-') {
+ return null;
+ }
+ let score = parseFloat(cadd)
+ let idx: number = 0
+ if (score >= 15 && score < 20) {
+ idx = 1
+ } else if (score >= 20 && score < 25) {
+ idx = 2
+ } else if (score >= 25 && score < 30) {
+ idx = 3
+ } else if (score >= 30) {
+ idx = 4
+ }
+ return CADD_SCORE_ATTR[idx];
+}
\ No newline at end of file
diff --git a/src/ui/components/search/EveScore.tsx b/src/ui/components/search/EveScore.tsx
deleted file mode 100644
index 6f87cc37..00000000
--- a/src/ui/components/search/EveScore.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-export function getEveClassText(eveClass?: number) {
- switch(eveClass) {
- case 1: return "Benign";
- case 2: return "Pathogenic";
- case 3: return "Uncertain";
- default: return "N/A";
- }
-}
-
-export interface EveIconProps {
- eveScore?: string
- eveClass?: number
-}
-
-export function EveIcon(props: EveIconProps) {
- switch(props.eveClass) {
- case 1: return
- case 2: return
- case 3: return
- default: return <>>
- }
-}
\ No newline at end of file
diff --git a/src/ui/components/search/EveScoreColors.tsx b/src/ui/components/search/EveScoreColors.tsx
deleted file mode 100644
index e7644823..00000000
--- a/src/ui/components/search/EveScoreColors.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
-
-function EveScoreColors() {
- return (
-
-
EVE score colour
-
-
-
-
- );
-}
-
-export default EveScoreColors;
diff --git a/src/ui/components/search/PrimaryRow.css b/src/ui/components/search/PrimaryRow.css
new file mode 100644
index 00000000..bd8b3af4
--- /dev/null
+++ b/src/ui/components/search/PrimaryRow.css
@@ -0,0 +1,13 @@
+.score-box {
+ width: 2rem;
+ text-align: center;
+ display: inline-block;
+ padding: 0.1rem 0.2rem;
+ margin-right: 1rem;
+ margin-bottom: 0.3rem;
+ border: none;
+ border-radius: 0.75rem;
+ font-size: 0.8rem;
+ font-weight: 700;
+ color: white;
+}
\ No newline at end of file
diff --git a/src/ui/components/search/PrimaryRow.tsx b/src/ui/components/search/PrimaryRow.tsx
index e9b8d56b..f63f7074 100644
--- a/src/ui/components/search/PrimaryRow.tsx
+++ b/src/ui/components/search/PrimaryRow.tsx
@@ -1,7 +1,9 @@
-import { Fragment, lazy, Suspense } from "react";
+import './PrimaryRow.css';
+import {Fragment, lazy, Suspense} from "react";
import { StringVoidFun } from "../../../constants/CommonTypes";
import {
- CADD_INFO_URL, CLINVAR_RCV_URL, CLINVAR_VCV_URL, COSMIC_URL,
+ CADD_INFO_URL, AM_INFO_URL,
+ CLINVAR_RCV_URL, CLINVAR_VCV_URL, COSMIC_URL,
DBSNP_URL,
ENSEMBL_CHRM_URL,
ENSEMBL_GENE_URL,
@@ -12,7 +14,8 @@ import { ALLELE, CONSEQUENCES } from "../../../constants/SearchResultTable";
import { MappingRecord } from "../../../utills/Convertor";
import Spaces from "../../elements/Spaces";
import Tool from "../../elements/Tool";
-import { getCaddCss, getTitle } from "./CaddHelper";
+import {caddScoreAttr} from "./CaddScorePred";
+import {amScoreAttr} from "../function/prediction/AlphaMissensePred";
import { getProteinName } from "./ResultTable";
import ProteinIcon from '../../../images/proteins.svg';
import StructureIcon from '../../../images/structures-3d.svg';
@@ -22,7 +25,6 @@ import { ReactComponent as ChevronDownIcon } from "../../../images/chevron-down.
import { ReactComponent as ChevronUpIcon } from "../../../images/chevron-up.svg"
import { EmptyElement } from "../../../constants/ConstElement";
import { aaChangeTip, CanonicalIcon } from "./AlternateIsoFormRow";
-import {EveIcon, getEveClassText} from "./EveScore";
import {INPUT_GEN, INPUT_PRO, INPUT_ID, INPUT_CDNA} from "../../../types/MappingResponse";
const StructuralDetail = lazy(() => import(/* webpackChunkName: "StructuralDetail" */ "../structure/StructuralDetail"));
@@ -30,9 +32,11 @@ const PopulationDetail = lazy(() => import(/* webpackChunkName: "PopulationDetai
const FunctionalDetail = lazy(() => import(/* webpackChunkName: "FunctionalDetail" */ "../function/FunctionalDetail"));
const getPrimaryRow = (record: MappingRecord, toggleOpenGroup: string, isoFormGroupExpanded: string, toggleIsoFormGroup: StringVoidFun,
- annotationExpanded: string, toggleAnnotation: StringVoidFun, hasAltIsoForm: boolean, currStyle: object) => {
- let caddCss = getCaddCss(record.CADD);
- let caddTitle = getTitle(record.CADD);
+ annotationExpanded: string, toggleAnnotation: StringVoidFun, hasAltIsoForm: boolean, currStyle: object, stdColor: boolean) => {
+
+ const caddAttr = caddScoreAttr(record.cadd)
+ const amAttr = amScoreAttr(record.amScore?.amClass)
+
let strand = record.strand ? '(-)' : '(+)';
if (!record.codon) {
strand = '';
@@ -105,9 +109,9 @@ const getPrimaryRow = (record: MappingRecord, toggleOpenGroup: string, isoFormGr
-
+
- 9 ? 0 : 2} />{isNaN(parseFloat(record.CADD!)) ? "" : parseFloat(record.CADD!).toFixed(1)}
+ 9 ? 0 : 2} />{isNaN(parseFloat(record.cadd!)) ? "" : parseFloat(record.cadd!).toFixed(1)}
|
@@ -138,12 +142,16 @@ const getPrimaryRow = (record: MappingRecord, toggleOpenGroup: string, isoFormGr
{record.aaPos} |
{record.aaChange} |
{record.consequences} |
-
-
- |
-
+ |
+
+
+ {record.amScore?.amPathogenicity.toString().substring(0,4)}
+
+
+ |
+
- {!record.canonical && <> >}
+ {!record.canonical && <> >}
{getSignificancesButton(functionalKey, 'FUN', record, annotationExpanded, toggleAnnotation)}
{getSignificancesButton(populationKey, 'POP', record, annotationExpanded, toggleAnnotation)}
{getSignificancesButton(structuralKey, 'STR', record, annotationExpanded, toggleAnnotation)}
@@ -163,8 +171,7 @@ const getPrimaryRow = (record: MappingRecord, toggleOpenGroup: string, isoFormGr
}
{functionalKey === annotationExpanded &&
}>
-
+
}
diff --git a/src/ui/components/search/ResultTable.tsx b/src/ui/components/search/ResultTable.tsx
index 692ae15e..278e918f 100644
--- a/src/ui/components/search/ResultTable.tsx
+++ b/src/ui/components/search/ResultTable.tsx
@@ -1,4 +1,4 @@
-import { useState } from "react"
+import {useContext, useState} from "react"
import { StringVoidFun } from "../../../constants/CommonTypes";
import { MappingRecord } from "../../../utills/Convertor";
import AlternateIsoFormRow from "./AlternateIsoFormRow";
@@ -6,6 +6,7 @@ import { GENOMIC_COLS, PROTEIN_COLS } from "../../../constants/SearchResultTable
import Tool from "../../elements/Tool";
import getPrimaryRow from "./PrimaryRow";
import MsgRow from "./MsgRow";
+import {StdColorContext} from "../../App";
interface ResultTableProps {
mappings: Array >>
@@ -20,6 +21,7 @@ export function getProteinName(record: MappingRecord) {
}
function ResultTable(props: ResultTableProps) {
+ const stdColor = useContext(StdColorContext);
const [isoFormGroupExpanded, setIsoFormGroupExpanded] = useState('')
const [annotationExpanded, setAnnotationExpanded] = useState('')
@@ -31,7 +33,7 @@ function ResultTable(props: ResultTableProps) {
setAnnotationExpanded(annotationExpanded === key ? '' : key);
}
- const tableRows = getTableRows(props.mappings, isoFormGroupExpanded, toggleIsoFormGroup, annotationExpanded, toggleAnnotation);
+ const tableRows = getTableRows(props.mappings, isoFormGroupExpanded, toggleIsoFormGroup, annotationExpanded, toggleAnnotation, stdColor);
return
@@ -48,7 +50,7 @@ function ResultTable(props: ResultTableProps) {
Alt.
Gene
Codon (strand)
- CADD
+ CADD
Isoform
@@ -56,7 +58,7 @@ function ResultTable(props: ResultTableProps) {
AA pos.
AA change
Consequence(s)
- EVE
+ AlphaMiss. pred.
Click for details |
@@ -67,7 +69,7 @@ function ResultTable(props: ResultTableProps) {
}
const getTableRows = (mappings: MappingRecord[][][], isoFormGroupExpanded: string, toggleIsoFormGroup: StringVoidFun,
- annotationExpanded: string, toggleAnnotation: StringVoidFun) => {
+ annotationExpanded: string, toggleAnnotation: StringVoidFun, stdColor: boolean) => {
const tableRows: Array = [];
const rowStyle = { a: {backgroundColor: "#F4F3F3" }, b: {backgroundColor: "#FFFFFF" }}
let prevInput = ""
@@ -91,7 +93,7 @@ const getTableRows = (mappings: MappingRecord[][][], isoFormGroupExpanded: strin
}
else
tableRows.push(getPrimaryRow(isoform, currentGroup, isoFormGroupExpanded, toggleIsoFormGroup, annotationExpanded,
- toggleAnnotation, matchingIsoForms.length > 1, currStyle))
+ toggleAnnotation, matchingIsoForms.length > 1, currStyle, stdColor))
else if (currentGroup === isoFormGroupExpanded)
tableRows.push()
}
diff --git a/src/ui/layout/DefaultPageLayout.tsx b/src/ui/layout/DefaultPageLayout.tsx
index 6f523f23..784910dd 100644
--- a/src/ui/layout/DefaultPageLayout.tsx
+++ b/src/ui/layout/DefaultPageLayout.tsx
@@ -16,7 +16,7 @@ interface DefaultPageLayoutProps {
searchResults?: MappingRecord[][][]
}
-const bannerText = null
+const bannerText = "AlphaMissense prediction has replaced EVE score in the main table. You can now find EVE score under Predictions in the Functional Information section."
function DefaultPageLayout(props: DefaultPageLayoutProps) {
const [showBanner, setShowBanner ] = useState(bannerText == null ? false : true);
diff --git a/src/ui/components/search/ResultTableButtonsLegend.tsx b/src/ui/modal/AnnotationLegend.tsx
similarity index 80%
rename from src/ui/components/search/ResultTableButtonsLegend.tsx
rename to src/ui/modal/AnnotationLegend.tsx
index 48492b9c..c582e04c 100644
--- a/src/ui/components/search/ResultTableButtonsLegend.tsx
+++ b/src/ui/modal/AnnotationLegend.tsx
@@ -1,8 +1,8 @@
-import ProteinIcon from '../../../images/proteins.svg'
-import StructureIcon from '../../../images/structures-3d.svg'
-import PopulationIcon from '../../../images/human.svg'
+import ProteinIcon from '../../images/proteins.svg'
+import StructureIcon from '../../images/structures-3d.svg'
+import PopulationIcon from '../../images/human.svg'
-function ResultTableButtonsLegend() {
+function AnnotationLegend() {
return (
Annotations
@@ -41,4 +41,4 @@ function ResultTableButtonsLegend() {
)
}
-export default ResultTableButtonsLegend
+export default AnnotationLegend
diff --git a/src/ui/modal/LegendModal.tsx b/src/ui/modal/LegendModal.tsx
index c373a078..d6ab8254 100644
--- a/src/ui/modal/LegendModal.tsx
+++ b/src/ui/modal/LegendModal.tsx
@@ -1,12 +1,17 @@
-import { useState, useCallback, useRef } from 'react'
+import {useState, useCallback, useRef, useContext} from 'react'
+import { v1 as uuidv1 } from 'uuid';
import Button from '../elements/form/Button'
import Modal from './Modal'
import useOnClickOutside from '../../hooks/useOnClickOutside'
-import ResultTableButtonsLegend from '../components/search/ResultTableButtonsLegend'
-import EveScoreColors from '../components/search/EveScoreColors'
-import CaddLegendColors from '../components/search/CaddLegendColors'
+import AnnotationLegend from './AnnotationLegend'
+import {CADD_SCORE_ATTR} from "../components/search/CaddScorePred";
+import {PredAttr} from "../components/function/prediction/Prediction";
+import {AM_SCORE_ATTR} from "../components/function/prediction/AlphaMissensePred";
+import {EVE_SCORE_ATTR} from "../components/function/prediction/EvePred";
+import {StdColorContext} from "../App";
-function LegendModal() {
+function LegendModal(props: {toggleStdColor: () => void}) {
+ const stdColor = useContext(StdColorContext);
const [showModel, setShowModel] = useState(false)
const downloadModelDiv = useRef(null)
@@ -15,6 +20,7 @@ function LegendModal() {
useCallback(() => setShowModel(false), []),
)
+
return (
)
}
+
+interface CommonLegendProps {
+ stdColor: boolean
+}
+
+function CaddLegend(props: CommonLegendProps) {
+ return (
+
+ CADD phred-like score
+
+
+ {
+ Object.values(CADD_SCORE_ATTR).map((sc: PredAttr) => {
+ return ;
+ })
+ }
+
+
+ );
+}
+
+function ConservLegend() {
+ return (
+
+ Residue conservation
+
+
+
+
+ );
+}
+
+function EsmLegend(props: CommonLegendProps) {
+ return (
+
+ ESM1b LLR score
+
+
+
+
+
+
+ 0 -5 -10 -15 -20 -25
+
+
+
+
+ );
+}
+
+function AlphaMissenseLegend(props: CommonLegendProps) {
+ return
+ AlphaMissense score
+
+
+ {
+ Object.values(AM_SCORE_ATTR).map((sc: PredAttr) => {
+ return ;
+ })
+ }
+
+
+ ;
+}
+
+function EveLegend(props: CommonLegendProps) {
+ return (
+
+ EVE score
+
+
+ {
+ Object.values(EVE_SCORE_ATTR).map((sc: PredAttr) => {
+ return ;
+ })
+ }
+
+
+
+ );
+}
+
export default LegendModal
diff --git a/src/ui/pages/query/QueryPage.tsx b/src/ui/pages/query/QueryPage.tsx
index bbc7370e..1774f294 100644
--- a/src/ui/pages/query/QueryPage.tsx
+++ b/src/ui/pages/query/QueryPage.tsx
@@ -157,7 +157,7 @@ function getInputsFromUrl(location: any): any {
return []
}
-const QueryPageContent = () => {
+const QueryPageContent = (props: {toggleStdColor: () => void}) => {
const location = useLocation()
const [loaded, setLoaded] = useState(false)
const [err, setErr] = useState(false)
@@ -190,7 +190,7 @@ const QueryPageContent = () => {
@@ -203,8 +203,8 @@ const QueryPageContent = () => {
return <>{loaded ? result : (err ? : )}>
}
-function QueryPage() {
- return } />
+function QueryPage(props: {toggleStdColor: () => void}) {
+ return } />
}
export default QueryPage
diff --git a/src/ui/pages/search/SearchResultPage.tsx b/src/ui/pages/search/SearchResultPage.tsx
index 6505eac1..77806188 100644
--- a/src/ui/pages/search/SearchResultPage.tsx
+++ b/src/ui/pages/search/SearchResultPage.tsx
@@ -16,6 +16,7 @@ interface SearchResultPageProps {
fetchNextPage: NextPageFun
rows: MappingRecord[][][]
loading: boolean
+ toggleStdColor: () => void
}
function SearchResultsPageContent(props: SearchResultPageProps) {
@@ -34,7 +35,7 @@ function SearchResultsPageContent(props: SearchResultPageProps) {
-
+
diff --git a/src/utills/Convertor.ts b/src/utills/Convertor.ts
index ce217f11..9b830bea 100644
--- a/src/utills/Convertor.ts
+++ b/src/utills/Convertor.ts
@@ -6,7 +6,7 @@ import {
INPUT_CDNA,
UserInput,
GenomicInput,
- Message, MappingResponse
+ Message, MappingResponse, EVEScore, ConservScore, ESMScore, AMScore
} from "../types/MappingResponse";
export interface MappingRecord {
@@ -23,7 +23,7 @@ export interface MappingRecord {
geneName?: string
codon?: string
strand?: boolean
- CADD?: string
+ cadd?: string
// PROTEIN column properties
canonical?: boolean // display as can (true) or iso (false)
isoform?: string
@@ -35,8 +35,10 @@ export interface MappingRecord {
variantAA?: string
cdsPosition?: number // not displayed or used anywhere
consequences?: string
- eveScore?: string
- eveClass?: number
+ conservScore?: ConservScore
+ amScore?: AMScore
+ eveScore?: EVEScore
+ esmScore?: ESMScore
// ANNOTATIONS column
referenceFunctionUri?: string
populationObservationsUri?: string
@@ -169,8 +171,8 @@ function convertGenInputMappings(originalInput: UserInput, genInput: GenomicInpu
record.geneName = gene.geneName;
record.codon = isoform.refCodon + '/' + isoform.variantCodon;
record.strand = gene.reverseStrand;
- if (gene.caddScore === null) record.CADD = '-';
- else record.CADD = gene.caddScore.toString();
+ if (gene.caddScore === null) record.cadd = '-';
+ else record.cadd = gene.caddScore.toString();
}
// PROTEIN
record.canonical = isoform.canonical;
@@ -183,12 +185,10 @@ function convertGenInputMappings(originalInput: UserInput, genInput: GenomicInpu
record.variantAA = isoform.variantAA;
record.cdsPosition = isoform.cdsPosition;
record.consequences = isoform.consequences;
- if (isoform.eveScore !== undefined && isoform.eveScore !== null) {
- record.eveScore = isoform.eveScore.toString();
- record.eveClass = isoform.eveClass;
- } else {
- record.eveScore = '-';
- }
+ record.conservScore = isoform.conservScore;
+ record.amScore = isoform.amScore;
+ record.eveScore = isoform.eveScore;
+ record.esmScore = isoform.esmScore;
// ANNOTATIONS
record.referenceFunctionUri = isoform.referenceFunctionUri;
record.populationObservationsUri = isoform.populationObservationsUri;
|