Skip to content

Commit 846558c

Browse files
committed
feat(browser): update gene page variant note
Update the warning/note on the gene page to explicitly state that the valid coding exons that define the padded regions to display variants for the gene only includes CDS exons, not UTRs. Clarifies the text in the case of genes with only non-coding transcripts.
1 parent 0d211c7 commit 846558c

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

browser/src/GenePage/GenePage.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,7 @@ const GenePage = ({ datasetId, gene, geneId }: Props) => {
574574
includeNonCodingTranscripts={includeNonCodingTranscripts}
575575
includeUTRs={includeUTRs}
576576
zoomRegion={zoomRegion}
577+
hasOnlyNonCodingTranscripts={!hasCodingExons && hasNonCodingTranscripts}
577578
/>
578579
)}
579580
</RegionViewer>

browser/src/GenePage/VariantsInGene.tsx

+8-3
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ type OwnVariantsInGeneProps = {
8282
start: number
8383
stop: number
8484
}
85+
hasOnlyNonCodingTranscripts?: boolean
8586
}
8687

8788
// @ts-expect-error TS(2456) FIXME: Type alias 'VariantsInGeneProps' circularly refere... Remove this comment to see the full error message
@@ -97,6 +98,7 @@ const VariantsInGene = ({
9798
includeUTRs,
9899
variants,
99100
zoomRegion,
101+
hasOnlyNonCodingTranscripts,
100102
}: VariantsInGeneProps) => {
101103
const datasetLabel = labelForDataset(datasetId)
102104

@@ -134,9 +136,12 @@ const VariantsInGene = ({
134136
<Badge level={includeNonCodingTranscripts || includeUTRs ? 'warning' : 'info'}>
135137
{includeNonCodingTranscripts || includeUTRs ? 'Warning' : 'Note'}
136138
</Badge>{' '}
137-
Only variants located in or within 75 base pairs of a coding exon are shown here. To see
138-
variants in UTRs or introns, use the{' '}
139-
<Link to={`/region/${gene.chrom}-${gene.start}-${gene.stop}`}>region view</Link>.
139+
{hasOnlyNonCodingTranscripts && <>This gene has no coding transcripts. </>}
140+
Only variants located in or within 75 base pairs of{' '}
141+
{!hasOnlyNonCodingTranscripts ? <>a coding exon (CDS)</> : <>an exon</>} are shown here.
142+
To see variants {!hasOnlyNonCodingTranscripts ? <>in UTRs or introns</> : <>in introns</>}
143+
, use the <Link to={`/region/${gene.chrom}-${gene.start}-${gene.stop}`}>region view</Link>
144+
.
140145
</p>
141146
<p>
142147
The table below shows the HGVS consequence and VEP annotation for each variant&apos;s most

0 commit comments

Comments
 (0)