Unverified Commit c3fb8320 authored by Andrey Azov's avatar Andrey Azov Committed by GitHub
Browse files

Use unversioned gene id when generating url for EntityViewer in Gene Summary drawer (#458)

parent 141bb080
...@@ -40,6 +40,7 @@ const GENE_QUERY = gql` ...@@ -40,6 +40,7 @@ const GENE_QUERY = gql`
alternative_symbols alternative_symbols
name name
stable_id stable_id
unversioned_stable_id
symbol symbol
so_term so_term
transcripts { transcripts {
...@@ -62,6 +63,7 @@ type Gene = Required< ...@@ -62,6 +63,7 @@ type Gene = Required<
Pick< Pick<
GeneFromGraphql, GeneFromGraphql,
| 'stable_id' | 'stable_id'
| 'unversioned_stable_id'
| 'symbol' | 'symbol'
| 'name' | 'name'
| 'alternative_symbols' | 'alternative_symbols'
...@@ -96,7 +98,7 @@ const GeneSummary = () => { ...@@ -96,7 +98,7 @@ const GeneSummary = () => {
const focusId = buildFocusIdForUrl({ const focusId = buildFocusIdForUrl({
type: 'gene', type: 'gene',
objectId: gene.stable_id as string objectId: gene.unversioned_stable_id
}); });
const entityViewerUrl = urlFor.entityViewer({ const entityViewerUrl = urlFor.entityViewer({
genomeId: ensObjectGene.genome_id, genomeId: ensObjectGene.genome_id,
......
...@@ -174,7 +174,7 @@ const TranscriptSummary = () => { ...@@ -174,7 +174,7 @@ const TranscriptSummary = () => {
const focusId = buildFocusIdForUrl({ const focusId = buildFocusIdForUrl({
type: 'gene', type: 'gene',
objectId: gene.unversioned_stable_id as string objectId: gene.unversioned_stable_id
}); });
const entityViewerUrl = urlFor.entityViewer({ const entityViewerUrl = urlFor.entityViewer({
...@@ -183,11 +183,11 @@ const TranscriptSummary = () => { ...@@ -183,11 +183,11 @@ const TranscriptSummary = () => {
}); });
const uniprotXref = product?.external_references.find( const uniprotXref = product?.external_references.find(
(xref) => xref.source.id == 'Uniprot/SWISSPROT' (xref) => xref.source.id === 'Uniprot/SWISSPROT'
); );
const ccdsXref = transcript.external_references.find( const ccdsXref = transcript.external_references.find(
(xref) => xref.source.id == 'CCDS' (xref) => xref.source.id === 'CCDS'
); );
const splicedRNALength = getCommaSeparatedNumber( const splicedRNALength = getCommaSeparatedNumber(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment