Skip to content

Commit

Permalink
Mutational Signature Improvements (#4916)
Browse files Browse the repository at this point in the history
Fix Mutational Signature range slider.
Improve layout

---------

Co-authored-by: TJMKuijpers <[email protected]>
  • Loading branch information
alisman and TJMKuijpers authored Jun 26, 2024
1 parent 94ccb95 commit 3aedd72
Show file tree
Hide file tree
Showing 16 changed files with 569 additions and 309 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
106 changes: 52 additions & 54 deletions src/pages/patientView/PatientViewPageTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,15 @@ export function patientViewTabs(
<HelpWidget path={urlWrapper.routing.location.pathname} />
}
>
{tabs(pageInstance, sampleManager)}
{tabs(pageInstance, sampleManager, urlWrapper)}
</MSKTabs>
);
}

export function tabs(
pageComponent: PatientViewPageInner,
sampleManager: SampleManager | null
sampleManager: SampleManager | null,
urlWrapper: PatientViewUrlWrapper
) {
const tabs: JSX.Element[] = [];
tabs.push(
Expand Down Expand Up @@ -644,61 +645,58 @@ export function tabs(
</MSKTab>
);

pageComponent.patientViewPageStore.hasMutationalSignatureData.result &&
pageComponent.patientViewPageStore.initialMutationalSignatureVersion
.isComplete &&
tabs.push(
<MSKTab
key={8}
id="mutationalSignatures"
linkText="Mutational Signatures"
hide={
tabs.push(
<MSKTab
key={8}
id="mutationalSignatures"
linkText="Mutational Signatures"
hide={
pageComponent.patientViewPageStore
.mutationalSignatureMolecularProfiles.isPending ||
pageComponent.patientViewPageStore
.initialMutationalSignatureVersion.isPending ||
_.isEmpty(
pageComponent.patientViewPageStore
.mutationalSignatureMolecularProfiles.isPending ||
.mutationalSignatureDataGroupByVersion.result
)
}
>
<MutationalSignaturesContainer
data={
pageComponent.patientViewPageStore
.initialMutationalSignatureVersion.isPending ||
_.isEmpty(
pageComponent.patientViewPageStore
.mutationalSignatureDataGroupByVersion.result
)
.mutationalSignatureDataGroupByVersion.result
}
>
<MutationalSignaturesContainer
data={
pageComponent.patientViewPageStore
.mutationalSignatureDataGroupByVersion.result
}
profiles={
pageComponent.patientViewPageStore
.mutationalSignatureMolecularProfiles.result
}
onVersionChange={
pageComponent.onMutationalSignatureVersionChange
}
version={
pageComponent.patientViewPageStore
.selectedMutationalSignatureVersion
}
dataCount={
pageComponent.patientViewPageStore
.mutationalSignatureCountDataGroupedByVersion.result
}
sample={
pageComponent.patientViewPageStore
.selectedSampleMutationalSignatureData
}
samples={
pageComponent.patientViewPageStore
.samplesWithCountDataAvailable
}
samplesNotProfiled={
pageComponent.patientViewPageStore
.samplesNotProfiledForMutationalSignatures
}
onSampleChange={pageComponent.onSampleIdChange}
/>
</MSKTab>
);
profiles={
pageComponent.patientViewPageStore
.mutationalSignatureMolecularProfiles.result
}
onVersionChange={
pageComponent.onMutationalSignatureVersionChange
}
version={
pageComponent.patientViewPageStore
.selectedMutationalSignatureVersion
}
dataCount={
pageComponent.patientViewPageStore
.mutationalSignatureCountDataGroupedByVersion.result
}
sample={
pageComponent.patientViewPageStore
.selectedSampleMutationalSignatureData
}
samples={
pageComponent.patientViewPageStore
.samplesWithCountDataAvailable
}
samplesNotProfiled={
pageComponent.patientViewPageStore
.samplesNotProfiledForMutationalSignatures
}
onSampleChange={pageComponent.onSampleIdChange}
/>
</MSKTab>
);

pageComponent.resourceTabs.component &&
/* @ts-ignore */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const sampleMutationalSignatureDataWithoutClass = [
mutationalSignatureClass: '',
version: 'v2',
value: 15,
percentage: 90,
},
{
uniqueSampleKey: 's09e3B34',
Expand All @@ -30,6 +31,7 @@ const sampleMutationalSignatureDataWithoutClass = [
mutationalSignatureClass: '',
version: 'v2',
value: 12,
percentage: 90,
},
{
uniqueSampleKey: 's09e3B34',
Expand All @@ -41,6 +43,7 @@ const sampleMutationalSignatureDataWithoutClass = [
mutationalSignatureClass: '',
version: 'v2',
value: 20,
percentage: 90,
},
];

Expand All @@ -55,6 +58,7 @@ const sampleMutationalSignatureData: IMutationalCounts[] = [
mutationalSignatureClass: 'C>T',
version: 'v2',
value: 15,
percentage: 90,
},
{
uniqueSampleKey: 's09e3B34',
Expand All @@ -66,6 +70,7 @@ const sampleMutationalSignatureData: IMutationalCounts[] = [
mutationalSignatureClass: 'C>T',
version: 'v2',
value: 12,
percentage: 90,
},
{
uniqueSampleKey: 's09e3B34',
Expand All @@ -77,6 +82,7 @@ const sampleMutationalSignatureData: IMutationalCounts[] = [
mutationalSignatureClass: 'T>A',
version: 'v2',
value: 20,
percentage: 90,
},
];

Expand All @@ -94,6 +100,7 @@ describe('MutationalSignatureBarChart', () => {
mutationalSignatureClass: 'C>T',
version: 'v2',
value: 15,
percentage: 90,
colorValue: 'red',
label: 'A[C>T]G',
subcategory: ' ',
Expand All @@ -110,6 +117,7 @@ describe('MutationalSignatureBarChart', () => {
mutationalSignatureClass: 'C>T',
version: 'v2',
value: 12,
percentage: 90,
colorValue: 'red',
label: 'A[C>T]G',
subcategory: ' ',
Expand All @@ -127,6 +135,7 @@ describe('MutationalSignatureBarChart', () => {
mutationalSignatureClass: 'T>A',
version: 'v2',
value: 20,
percentage: 90,
colorValue: '#99A3A4',
subcategory: ' ',
sublabel: ' ',
Expand All @@ -150,6 +159,7 @@ describe('MutationalSignatureBarChart', () => {
mutationalSignatureLabel: 'A[C>T]G',
version: 'v2',
value: 15,
percentage: 90,
colorValue: 'red',
label: 'A[C>T]G',
subcategory: ' ',
Expand All @@ -166,6 +176,7 @@ describe('MutationalSignatureBarChart', () => {
mutationalSignatureLabel: 'A[C>T]G',
version: 'v2',
value: 12,
percentage: 90,
colorValue: 'red',
label: 'A[C>T]G',
subcategory: ' ',
Expand All @@ -183,6 +194,7 @@ describe('MutationalSignatureBarChart', () => {
mutationalSignatureLabel: 'A[C>T]G',
version: 'v2',
value: 20,
percentage: 90,
colorValue: 'red',
label: 'A[C>T]G',
subcategory: ' ',
Expand Down
Loading

0 comments on commit 3aedd72

Please sign in to comment.