Skip to content

Commit

Permalink
Merge pull request #258 from molgenis/fix/depthIndicator
Browse files Browse the repository at this point in the history
Fix #257 Do not show read depth warning indicator if read depth is null
  • Loading branch information
bartcharbon authored Mar 20, 2023
2 parents 33004c0 + e0b5b84 commit 57fce2a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/VariantSampleTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const VariantSampleTable: Component<{
allelicBalance={
props.record.data.s[props.samples[i()].index]["VIAB"] as number | undefined | null
}
readDepth={props.record.data.s[props.samples[i()].index]["DP"] as number | undefined}
readDepth={props.record.data.s[props.samples[i()].index]["DP"] as number | undefined | null}
/>
</td>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/record/Format.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const Format: Component<{
record: Item<Record>;
isAbbreviate: boolean;
allelicBalance: number | undefined | null;
readDepth: number | undefined;
readDepth: number | undefined | null;
}> = (props) => {
return (
<Switch
Expand Down
4 changes: 2 additions & 2 deletions src/components/record/format/GenotypeField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ export const GenotypeField: Component<{
altAlleles: (string | null)[];
isAbbreviate: boolean;
allelicBalance: number | undefined | null;
readDepth: number | undefined;
readDepth: number | undefined | null;
}> = (props) => {
const allelicImbalance: boolean = isAllelicImbalance(props.genotype, props.allelicBalance);
const lowReadDepth = props.readDepth !== undefined && props.readDepth < 20;
const lowReadDepth = props.readDepth !== undefined && props.readDepth !== null && props.readDepth < 20;
return (
<>
<For each={props.genotype.a}>
Expand Down

0 comments on commit 57fce2a

Please sign in to comment.