Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
jfkonecn committed Feb 7, 2025
1 parent f5f532c commit 238c016
Show file tree
Hide file tree
Showing 5 changed files with 272 additions and 149 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ import SomaticGermlineBreadcrumbs from 'app/shared/nav/SomaticGermlineBreadcrumb
import GermlineSomaticHeader from 'app/shared/header/GermlineSomaticHeader';
import SomaticGermlineCancerTypeSelect from 'app/shared/dropdown/SomaticGermlineCancerTypeSelect';
import { RouterStore } from 'mobx-react-router';
import { SomaticGermlineAlterationTiles } from 'app/shared/tiles/tile-utils';

function OncogenicInfo({
isUnknownOncogenicity,
Expand Down Expand Up @@ -845,7 +846,11 @@ export class SomaticGermlineCancerTypePage extends React.Component<
<Container>
<Row className="justify-content-center">
<Col md={11}>
<SomaticGermlineTiles tiles={tiles} />
<SomaticGermlineAlterationTiles
includeTitle={false}
isGermline={this.store.germline}
variantAnnotation={this.store.annotationData.result}
/>
</Col>
</Row>
<Row className="justify-content-center">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,25 +79,17 @@ import { Else, If, Then } from 'react-if';
import LoadingIndicator, {
LoaderSize,
} from 'app/components/loadingIndicator/LoadingIndicator';
import { FeedbackType } from 'app/components/feedback/types';
import { FeedbackIcon } from 'app/components/feedback/FeedbackIcon';
import { CitationTooltip } from 'app/components/CitationTooltip';
import { DefaultTooltip } from 'cbioportal-frontend-commons';
import {
COLOR_ICON_WITH_INFO,
COLOR_ICON_WITHOUT_INFO,
} from 'app/config/theme';
import SomaticGermlineAlterationView from '../annotationPage/SomaticGermlineAlterationView';
import {
ITextBreadcrumb,
ILinkBreadcrumb,
IDropdownBreadcrumb,
IInputBreadcrumb,
AnnotationBreadcrumbs,
} from '../annotationPage/AnnotationBreadcrumbs';
import GermlineSomaticHeader from 'app/shared/header/GermlineSomaticHeader';
import SomaticGermlineBreadcrumbs from 'app/shared/nav/SomaticGermlineBreadcrumbs';
import { RouterStore } from 'mobx-react-router';
import { SomaticGermlineAlterationTiles } from 'app/shared/tiles/tile-utils';

function OncogenicInfo({
isUnknownOncogenicity,
Expand Down Expand Up @@ -591,140 +583,6 @@ export class SomaticGermlineAlterationPage extends React.Component<
}

render() {
let tiles: Parameters<typeof SomaticGermlineTiles>[0]['tiles'];
if (this.store.germline) {
tiles = [
{
title: 'Pathogenicity',
items: [
{
title: ONCOKB_TM,
value: this.store.annotationData.result.germline.pathogenic,
},
{
title: 'Clinvar',
value: 'Conflicting Classification',
link: '#',
},
],
},
{
title: 'Genetic Risk',
items: [
{
title: 'Penetrance',
value: this.store.geneNumber.result.penetrance,
},
{
title: 'Inheritance',
value: this.store.geneNumber.result.inheritanceMechanism,
},
],
},
];
} else {
tiles = [
{
title: 'Mutation Effect',
items: [
{
title: 'Oncogenicity',
show: !this.isUnknownOncogenicity || !this.isPositionalAlteration,

value: (
<OncogenicInfo
oncogenicity={this.store.annotationData.result.oncogenic}
isVus={this.store.annotationData.result.vus}
isUnknownOncogenicity={this.isUnknownOncogenicity}
/>
),
},
{
title: 'Biological Effect',
show:
this.store.annotationData.result.mutationEffect &&
(this.store.annotationData.result.mutationEffect.knownEffect !==
MUTATION_EFFECT.UNKNOWN ||
this.isPositionalAlteration),
value: (
<MutationEffectIcon
mutationEffect={
this.store.annotationData.result.mutationEffect
}
/>
),
},
],
},
{
title: 'Highest level of evidence',
items: [
[
{
title: 'Therapeutic',
show:
!!this.store.geneNumber.result.highestSensitiveLevel ||
!!this.store.geneNumber.result.highestResistanceLevel,
value: (
<div className={classNames('d-flex', 'flex-row')}>
<HighestLevelEvidence
type="Sensitive"
level={this.store.geneNumber.result.highestSensitiveLevel}
/>
<HighestLevelEvidence
type="Resistance"
level={
this.store.geneNumber.result.highestResistanceLevel
}
/>
</div>
),
},
{
title: 'Diagnostic',
show: !!this.store.geneNumber.result
.highestDiagnosticImplicationLevel,
value: (
<HighestLevelEvidence
type="DiagnosticImplication"
level={
this.store.geneNumber.result
.highestDiagnosticImplicationLevel
}
/>
),
},
],
[
{
title: 'Prognostic',
show: !!this.store.geneNumber.result
.highestPrognosticImplicationLevel,
value: (
<HighestLevelEvidence
type="PrognosticImplication"
level={
this.store.geneNumber.result
.highestPrognosticImplicationLevel
}
/>
),
},
{
title: 'FDA',
show: !!this.store.geneNumber.result.highestFdaLevel,
value: (
<HighestLevelEvidence
type="Fda"
level={this.store.geneNumber.result.highestFdaLevel}
/>
),
},
],
],
},
];
}
return (
<>
<Helmet>
Expand Down Expand Up @@ -816,7 +674,11 @@ export class SomaticGermlineAlterationPage extends React.Component<
<Container>
<Row className="justify-content-center">
<Col md={11}>
<SomaticGermlineTiles tiles={tiles} />
<SomaticGermlineAlterationTiles
includeTitle
variantAnnotation={this.store.annotationData.result}
isGermline={this.store.germline}
/>
</Col>
</Row>
<Row className="justify-content-center">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@
border-radius: 8px;
height: 200px;
}
.alterationTile.slim {
padding: 8px 16px;
}

.alterationTileColumnMerge {
grid-column: 1 / 3;
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/app/shared/tiles/SomaticGermlineTiles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function AlterationItem({
);
}

type AlterationTileProps = {
export type AlterationTileProps = {
title?: string;
items: (AlterationItemProps | [AlterationItemProps, AlterationItemProps])[];
};
Expand Down
Loading

0 comments on commit 238c016

Please sign in to comment.