@@ -3,8 +3,10 @@ import {
33 MitochondrialGeneConstraint ,
44 ProteinMitochondrialGeneConstraint ,
55 RNAMitochondrialGeneConstraint ,
6+ GeneTranscript ,
67} from '../GenePage/GenePage'
78import { BaseTable , TooltipAnchor } from '@gnomad/ui'
9+ import Link from '../Link'
810import { ConstraintHighlight } from './constraintMetrics'
911
1012const isProteinMitochondrialGeneConstraint = (
@@ -138,45 +140,57 @@ const RNAConstraintMetrics = ({ constraint }: { constraint: RNAMitochondrialGene
138140
139141const MitochondrialConstraintTable = ( {
140142 constraint,
143+ transcript,
141144} : {
142145 constraint : MitochondrialGeneConstraint | null
146+ transcript : GeneTranscript | null
143147} ) => {
144148 if ( constraint === null ) {
145149 return < p > Constraint is not available on this gene</ p >
146150 }
147151
148152 return (
149- // @ts -expect-error
150- < BaseTable >
151- < thead >
152- < tr >
153- < th scope = "col" > Category</ th >
154- < th scope = "col" >
155- { ' ' }
156- < >
157- { /* @ts -expect-error */ }
158- < TooltipAnchor tooltip = "Sum of maximum heteroplasmy of expected SNVs in gene" >
159- < span > Expected</ span >
160- </ TooltipAnchor >
161- </ >
162- </ th >
163- < th scope = "col" >
164- < >
165- { /* @ts -expect-error */ }
166- < TooltipAnchor tooltip = "Sum of maximum heteroplasmy of observed SNVs in gene" >
167- < span > Observed</ span >
168- </ TooltipAnchor >
169- </ >
170- </ th >
171- < th scope = "col" > Constraint metrics</ th >
172- </ tr >
173- </ thead > { ' ' }
174- { isProteinMitochondrialGeneConstraint ( constraint ) ? (
175- < ProteinConstraintMetrics constraint = { constraint } />
176- ) : (
177- < RNAConstraintMetrics constraint = { constraint } />
153+ < >
154+ { /* @ts -expect-error */ }
155+ < BaseTable >
156+ < thead >
157+ < tr >
158+ < th scope = "col" > Category</ th >
159+ < th scope = "col" >
160+ { ' ' }
161+ < >
162+ { /* @ts -expect-error */ }
163+ < TooltipAnchor tooltip = "Sum of maximum heteroplasmy of expected SNVs in gene" >
164+ < span > Expected</ span >
165+ </ TooltipAnchor >
166+ </ >
167+ </ th >
168+ < th scope = "col" >
169+ < >
170+ { /* @ts -expect-error */ }
171+ < TooltipAnchor tooltip = "Sum of maximum heteroplasmy of observed SNVs in gene" >
172+ < span > Observed</ span >
173+ </ TooltipAnchor >
174+ </ >
175+ </ th >
176+ < th scope = "col" > Constraint metrics</ th >
177+ </ tr >
178+ </ thead >
179+ { isProteinMitochondrialGeneConstraint ( constraint ) ? (
180+ < ProteinConstraintMetrics constraint = { constraint } />
181+ ) : (
182+ < RNAConstraintMetrics constraint = { constraint } />
183+ ) }
184+ </ BaseTable >
185+ { transcript !== null && (
186+ < >
187+ Constraint metrics based on transcript{ ' ' }
188+ < Link to = { `/transcript/${ transcript . transcript_id } ` } >
189+ { transcript . transcript_id } .{ transcript . transcript_version }
190+ </ Link >
191+ </ >
178192 ) }
179- </ BaseTable >
193+ </ >
180194 )
181195}
182196
0 commit comments