-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathExacConstraintTable.tsx
More file actions
78 lines (72 loc) · 2.06 KB
/
ExacConstraintTable.tsx
File metadata and controls
78 lines (72 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import React from 'react'
import { BaseTable } from '@gnomad/ui'
import { renderRoundedNumber } from './constraintMetrics'
export type ExacConstraint = {
exp_syn: number | null
obs_syn: number | null
syn_z: number
exp_mis: number | null
obs_mis: number | null
mis_z: number
exp_lof: number | null
obs_lof: number | null
pLI: number
}
type Props = {
constraint: ExacConstraint
}
const ExacConstraintTable = ({ constraint }: Props) => (
// @ts-expect-error TS(2746) FIXME: This JSX tag's 'children' prop expects a single ch... Remove this comment to see the full error message
<BaseTable>
<thead>
<tr>
<th scope="col">Category</th>
<th scope="col">Expected SNVs</th>
<th scope="col">Observed SNVs</th>
<th scope="col">Constraint metric</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Synonymous</th>
<td>{renderRoundedNumber(constraint.exp_syn)}</td>
<td>{constraint.obs_syn}</td>
<td>
Z ={' '}
{renderRoundedNumber(constraint.syn_z, {
precision: 2,
tooltipPrecision: 3,
highlightColor: constraint.syn_z > 3.71 ? '#ff2600' : null,
})}
</td>
</tr>
<tr>
<th scope="row">Missense</th>
<td>{renderRoundedNumber(constraint.exp_mis)}</td>
<td>{constraint.obs_mis}</td>
<td>
Z ={' '}
{renderRoundedNumber(constraint.mis_z, {
precision: 2,
tooltipPrecision: 3,
highlightColor: constraint.mis_z > 3.09 ? '#ff9300' : null,
})}
</td>
</tr>
<tr>
<th scope="row">pLoF</th>
<td>{renderRoundedNumber(constraint.exp_lof)}</td>
<td>{constraint.obs_lof}</td>
<td>
pLI ={' '}
{renderRoundedNumber(constraint.pLI, {
precision: 2,
tooltipPrecision: 3,
highlightColor: constraint.pLI > 0.9 ? '#ff9300' : null,
})}
</td>
</tr>
</tbody>
</BaseTable>
)
export default ExacConstraintTable