Skip to content

Commit 07d37bd

Browse files
authored
Add gene info table to variant and cancer type pages (oncokb#1274)
* Add gene info * Update screenshots
1 parent ae0a701 commit 07d37bd

12 files changed

+93
-38
lines changed
5.62 KB
Loading
5.95 KB
Loading
6.32 KB
Loading
6.38 KB
Loading
6.45 KB
Loading
6.22 KB
Loading
5.54 KB
Loading
5.54 KB
Loading

src/main/webapp/app/pages/annotationPage/SomaticGermlineCancerTypePage.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ import { SomaticGermlineAlterationTiles } from 'app/shared/tiles/tile-utils';
7474
import GeneticTypeTag from 'app/components/tag/GeneticTypeTag';
7575
import VariantOverView from 'app/shared/sections/VariantOverview';
7676
import styles from './SomaticGermlineCancerTypePage.module.scss';
77+
import GeneAdditionalInfoSection from 'app/shared/sections/GeneAdditionalInfoSection';
7778

7879
type MatchParams = {
7980
hugoSymbol: string;
@@ -100,6 +101,7 @@ export class SomaticGermlineCancerTypePage extends React.Component<
100101
private selectedTab: ANNOTATION_PAGE_TAB_KEYS;
101102

102103
@observable showMutationEffect = true;
104+
@observable showAdditionalGeneInfo = false;
103105

104106
constructor(props: SomaticGermlineCancerTypePageProps) {
105107
super(props);
@@ -156,6 +158,11 @@ export class SomaticGermlineCancerTypePage extends React.Component<
156158
this.showMutationEffect = value;
157159
}
158160

161+
@action.bound
162+
toggleAdditionalGeneInfo() {
163+
this.showAdditionalGeneInfo = !this.showAdditionalGeneInfo;
164+
}
165+
159166
@computed
160167
get pageShouldBeRendered() {
161168
return (
@@ -613,6 +620,12 @@ export class SomaticGermlineCancerTypePage extends React.Component<
613620
/>
614621
}
615622
/>
623+
<GeneAdditionalInfoSection
624+
gene={this.store.gene.result}
625+
ensemblGenes={this.store.ensemblGenes.result}
626+
show={this.showAdditionalGeneInfo}
627+
onToggle={this.toggleAdditionalGeneInfo}
628+
/>
616629
</Col>
617630
<Col md={11}>
618631
<Row className={classnames(styles.descriptionContainer)}>

src/main/webapp/app/pages/genePage/SomaticGermlineGenePage.tsx

Lines changed: 8 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,13 @@ import {
5959
} from 'app/shared/route/types';
6060
import AlterationTableTabs from 'app/pages/annotationPage/AlterationTableTabs';
6161
import { getGeneTypeSentence } from './GeneInfo';
62-
import GeneAdditionalInfoTable from 'app/pages/genePage/GeneAdditionalInfoTable';
6362
import OncokbLollipopPlot from './OncokbLollipopPlot';
6463
import { getUniqueFdaImplications } from 'app/pages/annotationPage/Utils';
6564
import ShowHideText from 'app/shared/texts/ShowHideText';
6665
import { AnnotationType } from 'app/pages/annotationPage/AnnotationPage';
6766
import SummaryWithRefs from 'app/oncokb-frontend-commons/src/components/SummaryWithRefs';
68-
import { findLast, upperFirst } from 'app/shared/utils/LodashUtils';
67+
import { upperFirst } from 'app/shared/utils/LodashUtils';
6968
import { Helmet } from 'react-helmet-async';
70-
import { NcbiLink } from 'app/shared/links/NcbiLink';
7169
import GeneAliasesDescription from 'app/shared/texts/GeneAliasesDescription';
7270
import { COLOR_GREY, COLOR_SOMATIC } from 'app/config/theme';
7371
import GeneticTypeTabs, {
@@ -83,6 +81,7 @@ import MiniNavBarHeader from 'app/shared/nav/MiniNavBarHeader';
8381
import { GenomicIndicatorTable } from 'app/pages/genePage/GenomicIndicatorTable';
8482
import GeneticTypeTag from 'app/components/tag/GeneticTypeTag';
8583
import { SomaticGermlineGeneInfoTiles } from 'app/shared/tiles/tile-utils';
84+
import GeneAdditionalInfoSection from 'app/shared/sections/GeneAdditionalInfoSection';
8685

8786
interface MatchParams {
8887
hugoSymbol: string;
@@ -588,41 +587,12 @@ export default class SomaticGermlineGenePage extends React.Component<
588587
this.store.gene.result.geneType
589588
)}
590589
</h5>
591-
<div className={'d-flex'}>
592-
<NcbiLink
593-
entrezGeneId={
594-
this.store.gene.result.entrezGeneId
595-
}
596-
/>
597-
<span className={'mx-2'}>|</span>
598-
<ShowHideText
599-
show={this.showAdditionalGeneInfo}
600-
title={'additional gene information'}
601-
content={''}
602-
onClick={this.toggleAdditionalGeneInfo}
603-
/>
604-
</div>
605-
{this.showAdditionalGeneInfo && (
606-
<Row className={'mt-2'}>
607-
<Col lg={6} md={8} xs={12}>
608-
<GeneAdditionalInfoTable
609-
gene={this.store.gene.result}
610-
grch37ensemblGene={findLast(
611-
this.store.ensemblGenes.result,
612-
item =>
613-
item.referenceGenome ===
614-
REFERENCE_GENOME.GRCh37
615-
)}
616-
grch38ensemblGene={findLast(
617-
this.store.ensemblGenes.result,
618-
item =>
619-
item.referenceGenome ===
620-
REFERENCE_GENOME.GRCh38
621-
)}
622-
/>
623-
</Col>
624-
</Row>
625-
)}
590+
<GeneAdditionalInfoSection
591+
gene={this.store.gene.result}
592+
ensemblGenes={this.store.ensemblGenes.result}
593+
show={this.showAdditionalGeneInfo}
594+
onToggle={this.toggleAdditionalGeneInfo}
595+
/>
626596
{this.store.geneSummary.result && (
627597
<div className="mt-2">
628598
<SummaryWithRefs

0 commit comments

Comments
 (0)