Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: interpretation panel #149

Merged
merged 6 commits into from
Jan 2, 2025
Merged

feat: interpretation panel #149

merged 6 commits into from
Jan 2, 2025

Conversation

crfmc
Copy link
Collaborator

@crfmc crfmc commented Dec 19, 2024

Implements interpretation panel for demo's with the clinical information field

feat: zoom to gene functionality
style: add clinical panel styles
@crfmc crfmc changed the title feat: clinical panel feat: interpretation panel Jan 2, 2025
crfmc added 2 commits January 2, 2025 15:45
style: center callout text
style: revert padding for gosling panel
@crfmc crfmc marked this pull request as ready for review January 2, 2025 21:03
@crfmc crfmc requested a review from sehilyi January 2, 2025 21:04
@@ -186,6 +194,9 @@ function App(props: RouteComponentProps) {
setSelectedSvId('');
leftReads.current = [];
rightReads.current = [];

// Update the appearance of the clinical panel
setIsClinicalPanelOpen(!!demo?.clinicalInfo);
Copy link
Member

@sehilyi sehilyi Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we respect the previous state of whether the clinical panel was opened? If I understand correctly, I think you are force-opening the clinical panel whenever the user selects a new demo. I think this could be disturbing to the user if they want the panel to be closed.

Suggested change
setIsClinicalPanelOpen(!!demo?.clinicalInfo);
setIsClinicalPanelOpen(!!demo?.clinicalInfo && isClinicalPanelOpen);

@@ -963,7 +981,7 @@ function App(props: RouteComponentProps) {
{!isMinimalMode && (
<div
style={{
width: '100%',
width: `calc(100% - ${0}px)`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this change was only for testing purposes?

Suggested change
width: `calc(100% - ${0}px)`,
width: '100%',

@@ -899,6 +897,490 @@ a:hover {
background-color: #e6e4e4;
}

.clinical-panel-container {
Copy link
Member

@sehilyi sehilyi Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you could consider moving styles related to the clinical panel to a separate CSS file to prevent this file becoming longer, e.g., css/ClinicalPanel.css

@@ -31,6 +33,7 @@ export type SampleType = {
cnFields?: [string, string, string];
thumbnail?: string;
note?: string;
clinicalInfo?: { [key: string]: DataRowProps[] };
Copy link
Member

@sehilyi sehilyi Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something to consider in the next round of update is further narrowing down the type definitions.

export type ClinicalInfo = {
    summary: SummaryItem[];
    variants: VariantItem[];
    signatures: SignatureItem[];
}

export type SummaryItem = {
    label: string;
    value: string;
}

export type VariantItem = {
    gene: string;
    type?: string; // if we know all the possible types, we can narrow down further, i.e., type: "Germline" | "homozygous loss" | ...;
    cDNA?: string;
    chr: string;
    start: string; // ideally this should be number
    end: string;  // ideally this should be number
    position: string;  // ideally this should be number
    handleClick?: () => void;
}

export type SignatureItem = {
    type: string;  // if we know all the possible types, we can narrow down further, i.e., type: "indels" | "point_mutations" | ...;
    count: string;  // this can be number
    label: string;
    hrDetect: boolean;
}

@crfmc crfmc merged commit 9008e5e into main Jan 2, 2025
14 checks passed
@crfmc crfmc deleted the crfmc/clinical-panel branch January 2, 2025 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants