Skip to content

Commit

Permalink
Update v4 default coverage metric to >20
Browse files Browse the repository at this point in the history
  • Loading branch information
rileyhgrant committed Nov 1, 2023
1 parent 45eabb3 commit 3f00ba2
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion browser/src/CoverageTrack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class CoverageTrack extends Component<CoverageTrackProps, CoverageTrackState> {
plotElement: any

state = {
selectedMetric: isV4(this.props.datasetId) ? 'over_30' : 'mean',
selectedMetric: isV4(this.props.datasetId) ? 'over_20' : 'mean',
}

plotRef = (el: any) => {
Expand Down
4 changes: 2 additions & 2 deletions browser/src/GenePage/__snapshots__/GenePage.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -28035,7 +28035,7 @@ exports[`GenePage with non-SV dataset "gnomad_r4" has no unexpected changes 1`]
className="Select-sc-1lkyg9e-0 ivadCR"
id="coverage-metric"
onChange={[Function]}
value="over_30"
value="over_20"
>
<optgroup
label="Per-base depth of coverage"
Expand Down Expand Up @@ -28139,7 +28139,7 @@ exports[`GenePage with non-SV dataset "gnomad_r4" has no unexpected changes 1`]
<div
className="CoverageTrack__TitlePanel-sc-1kumbsx-4 bwGOoh"
>
Fraction of individuals with coverage over 30
Fraction of individuals with coverage over 20
</div>
</div>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19057,7 +19057,7 @@ exports[`TranscriptPageContainer with dataset gnomad_r4 has no unexpected change
className="Select-sc-1lkyg9e-0 ivadCR"
id="coverage-metric"
onChange={[Function]}
value="over_30"
value="over_20"
>
<optgroup
label="Per-base depth of coverage"
Expand Down Expand Up @@ -19161,7 +19161,7 @@ exports[`TranscriptPageContainer with dataset gnomad_r4 has no unexpected change
<div
className="CoverageTrack__TitlePanel-sc-1kumbsx-4 bwGOoh"
>
Fraction of individuals with coverage over 30
Fraction of individuals with coverage over 20
</div>
</div>
<div
Expand Down
12 changes: 6 additions & 6 deletions browser/src/VariantPage/VariantOccurrenceTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,11 @@ export const GnomadVariantOccurrenceTable = ({

const exomeCoverage = {
mean: (variant.coverage.exome || { mean: null }).mean,
over30: (variant.coverage.exome || { over_30: null }).over_30,
over20: (variant.coverage.exome || { over_20: null }).over_20,
}
const genomeCoverage = {
mean: (variant.coverage.genome || { mean: null }).mean,
over30: (variant.coverage.genome || { over_30: null }).over_30,
over20: (variant.coverage.genome || { over_20: null }).over_20,
}

// Display a warning if a variant's AN is < 50% of the max AN for exomes/genomes.
Expand Down Expand Up @@ -439,19 +439,19 @@ export const GnomadVariantOccurrenceTable = ({
<tr>
<th scope="row">
{/* @ts-expect-error TS(2322) FIXME: Type '{ children: Element; tooltip: string; }' is ... Remove this comment to see the full error message */}
<TooltipAnchor tooltip="Fraction of individuals with >30x coverage at this variant's locus">
<TooltipAnchor tooltip="Fraction of individuals with >20x coverage at this variant's locus">
{/* @ts-expect-error TS(2745) FIXME: This JSX tag's 'children' prop expects type 'never... Remove this comment to see the full error message */}
<TooltipHint>Fraction of individuals with &gt;30x coverage</TooltipHint>
<TooltipHint>Fraction of individuals with &gt;20x coverage</TooltipHint>
</TooltipAnchor>
</th>
{/* TODO: this logic can be extracted into a helper, and cleaned for clarity, todo after V4 mvp launch */}
{variant.exome ? (
<td>{exomeCoverage.over30 !== null ? exomeCoverage.over30.toFixed(1) : '–'}</td>
<td>{exomeCoverage.over20 !== null ? exomeCoverage.over20.toFixed(1) : '–'}</td>
) : (
<td />
)}
{variant.genome ? (
<td>{genomeCoverage.over30 !== null ? genomeCoverage.over30.toFixed(1) : '–'}</td>
<td>{genomeCoverage.over20 !== null ? genomeCoverage.over20.toFixed(1) : '–'}</td>
) : (
<td />
)}
Expand Down
4 changes: 2 additions & 2 deletions browser/src/VariantPage/VariantPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -460,11 +460,11 @@ query ${operationName}($variantId: String!, $datasetId: DatasetId!, $referenceGe
coverage {
exome {
mean
over_30
over_20
}
genome {
mean
over_30
over_20
}
}
multi_nucleotide_variants {
Expand Down

0 comments on commit 3f00ba2

Please sign in to comment.