diff --git a/src/components/VariantSampleTable.tsx b/src/components/VariantSampleTable.tsx index 6fda8d5f..cecc56fa 100644 --- a/src/components/VariantSampleTable.tsx +++ b/src/components/VariantSampleTable.tsx @@ -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} /> )} diff --git a/src/components/record/Format.tsx b/src/components/record/Format.tsx index 0cac4493..ace5be23 100644 --- a/src/components/record/Format.tsx +++ b/src/components/record/Format.tsx @@ -13,7 +13,7 @@ export const Format: Component<{ record: Item; isAbbreviate: boolean; allelicBalance: number | undefined | null; - readDepth: number | undefined; + readDepth: number | undefined | null; }> = (props) => { return ( = (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 ( <>