66 OtTable ,
77 Tooltip ,
88 ClinvarStars ,
9- OtScoreLinearBar ,
9+ L2GScoreIndicator ,
1010 useBatchQuery ,
1111 Navigate ,
1212} from "ui" ;
@@ -36,7 +36,8 @@ function getColumns({ id, referenceAllele, alternateAllele }: getColumnsType) {
3636 return [
3737 {
3838 id : "studyLocusId" ,
39- label : "Navigate" ,
39+ label : "Credible set" ,
40+ sticky : true ,
4041 enableHiding : false ,
4142 renderCell : ( { studyLocusId } ) => < Navigate to = { `/credible-set/${ studyLocusId } ` } /> ,
4243 } ,
@@ -206,7 +207,15 @@ function getColumns({ id, referenceAllele, alternateAllele }: getColumnsType) {
206207 id : "l2Gpredictions" ,
207208 label : "Top L2G" ,
208209 filterValue : ( { l2GPredictions } ) => l2GPredictions ?. rows [ 0 ] ?. target ?. approvedSymbol ,
209- tooltip : "Top gene prioritised by our locus-to-gene model" ,
210+ tooltip : (
211+ < >
212+ Top gene prioritised by our locus-to-gene model. See{ " " }
213+ < Link external to = "https://platform-docs.opentargets.org/gentropy/locus-to-gene-l2g" >
214+ our documentation
215+ </ Link > { " " }
216+ for more information.
217+ </ >
218+ ) ,
210219 renderCell : ( { l2GPredictions } ) => {
211220 if ( ! l2GPredictions ?. rows [ 0 ] ?. target ) return naLabel ;
212221 const { target } = l2GPredictions ?. rows [ 0 ] ;
@@ -227,15 +236,20 @@ function getColumns({ id, referenceAllele, alternateAllele }: getColumnsType) {
227236 false
228237 ) ,
229238 sortable : true ,
230- tooltip :
231- "Machine learning prediction linking a gene to a credible set using all features. Score range [0,1]." ,
232- renderCell : ( { l2GPredictions } ) => {
233- if ( ! l2GPredictions ?. rows [ 0 ] ?. score ) return naLabel ;
234- return (
235- < Tooltip title = { l2GPredictions ?. rows [ 0 ] . score . toFixed ( 3 ) } style = "" >
236- < OtScoreLinearBar variant = "determinate" value = { l2GPredictions ?. rows [ 0 ] . score * 100 } />
237- </ Tooltip >
238- ) ;
239+ tooltip : (
240+ < >
241+ Machine learning prediction linking a gene to a credible set using all features. Score
242+ range [0,1]. See{ " " }
243+ < Link external to = "https://platform-docs.opentargets.org/gentropy/locus-to-gene-l2g" >
244+ our documentation
245+ </ Link > { " " }
246+ for more information.
247+ </ >
248+ ) ,
249+ renderCell : ( { studyLocusId, l2GPredictions } ) => {
250+ const score = l2GPredictions ?. rows [ 0 ] ?. score ;
251+ if ( ! score ) return naLabel ;
252+ return < L2GScoreIndicator score = { score } studyLocusId = { studyLocusId } /> ;
239253 } ,
240254 exportValue : ( { l2GPredictions } ) => l2GPredictions ?. rows [ 0 ] ?. score ,
241255 } ,
0 commit comments