Skip to content

Commit

Permalink
feat(browser): update gene page variant note
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rileyhgrant committed Jan 15, 2025
1 parent 86457c1 commit 253cc0b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions browser/src/GenePage/GenePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,7 @@ const GenePage = ({ datasetId, gene, geneId }: Props) => {
includeNonCodingTranscripts={includeNonCodingTranscripts}
includeUTRs={includeUTRs}
zoomRegion={zoomRegion}
hasOnlyNonCodingTranscripts={!hasCodingExons && hasNonCodingTranscripts}
/>
)}
</RegionViewer>
Expand Down
11 changes: 8 additions & 3 deletions browser/src/GenePage/VariantsInGene.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ type OwnVariantsInGeneProps = {
start: number
stop: number
}
hasOnlyNonCodingTranscripts?: boolean
}

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

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

0 comments on commit 253cc0b

Please sign in to comment.