@@ -3,8 +3,10 @@ import {
3
3
MitochondrialGeneConstraint ,
4
4
ProteinMitochondrialGeneConstraint ,
5
5
RNAMitochondrialGeneConstraint ,
6
+ GeneTranscript ,
6
7
} from '../GenePage/GenePage'
7
8
import { BaseTable , TooltipAnchor } from '@gnomad/ui'
9
+ import Link from '../Link'
8
10
import { ConstraintHighlight } from './constraintMetrics'
9
11
10
12
const isProteinMitochondrialGeneConstraint = (
@@ -138,45 +140,57 @@ const RNAConstraintMetrics = ({ constraint }: { constraint: RNAMitochondrialGene
138
140
139
141
const MitochondrialConstraintTable = ( {
140
142
constraint,
143
+ transcript,
141
144
} : {
142
145
constraint : MitochondrialGeneConstraint | null
146
+ transcript : GeneTranscript | null
143
147
} ) => {
144
148
if ( constraint === null ) {
145
149
return < p > Constraint is not available on this gene</ p >
146
150
}
147
151
148
152
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
+ </ >
178
192
) }
179
- </ BaseTable >
193
+ </ >
180
194
)
181
195
}
182
196
0 commit comments