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

Add initial CDx page #1055

Merged
merged 5 commits into from
Apr 30, 2024
Merged

Add initial CDx page #1055

merged 5 commits into from
Apr 30, 2024

Conversation

calvinlu3
Copy link
Collaborator

@calvinlu3 calvinlu3 commented Nov 15, 2023

This fixes https://github.com/oncokb/oncokb-pipeline/issues/200

Todo:

  • Add table sorting
  • Update logic for CDx cancer type filtering
  • Update CDx data

@calvinlu3
Copy link
Collaborator Author

Latest updates to CDx page after weekly meeting.
image

@calvinlu3
Copy link
Collaborator Author

Changes with Search Biomarker replaces with Gene dropdown and alteration search

image

Comment on lines 18 to 82
export interface ICompanionDiagnosticDevice {
name: string;
manufacturer: string;
platformType?: string | null;
biomarkerAssociation: IBiomarkerAssociation;
specimenTypes?: string[];
}

interface IBiomarkerAssociation {
gene: string;
alterations: string[];
drugs: string[];
cancerType: string;
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Once we start using the rc branch from transcript, these models should be auto generated.

Comment on lines +1 to +11
export function downloadFile(
fileName: string,
content: string,
options: BlobPropertyBag = { type: 'text/tsv' }
) {
const blob = new Blob([content], options);
const downloadLink = document.createElement('a');
downloadLink.href = URL.createObjectURL(blob);
downloadLink.download = fileName;
downloadLink.click();
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copied from oncokb-transcript

gene: ba.gene.hugoSymbol,
alterations: ba.alterations.map((a: any) => a.name),
drugs: ba.drugs.map((d: any) => d.name),
cancerType: ba.cancerType.mainType,
Copy link
Member

Choose a reason for hiding this comment

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

We only use the main type?

@@ -0,0 +1,28 @@
import React from 'react';
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is new since last review

@@ -928,3 +928,12 @@ export const convertObjectArrayToDelimitedString = (
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is new

@calvinlu3 calvinlu3 force-pushed the cdx-page branch 2 times, most recently from 1be4b6e to 312b0ec Compare March 7, 2024 23:54
@@ -912,3 +913,10 @@ export const DEFAULT_REFERENCE_GENOME = REFERENCE_GENOME.GRCh37;
export const DEFAULT_FEEDBACK_ANNOTATION: Feedback = {
type: FeedbackType.ANNOTATION,
};

export const FDA_SUBMISSION_URL_SUFFIX = {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is new

@@ -0,0 +1,633 @@
import OncoKBTable, {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There are many changes to this file, so needs to be re-reviewed

@calvinlu3 calvinlu3 requested a review from zhx828 March 7, 2024 23:56
Copy link
Member

@zhx828 zhx828 left a comment

Choose a reason for hiding this comment

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

LGTM, only two minor comments.

const headers = [
'Gene',
'Alteration(s)',
'Cancer Type',
Copy link
Member

Choose a reason for hiding this comment

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

Should this be Cancer Type(s) as well?


useEffect(() => {
const filterPresent =
!!relevantCancerTypeSearchKeyword ||
Copy link
Member

Choose a reason for hiding this comment

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

The purpose of adding double exclamation mark seems redundant

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Its to convert the value to a boolean. Otherwise if the search keyword was "example", then filterPresent = 'example'

@calvinlu3 calvinlu3 force-pushed the cdx-page branch 2 times, most recently from 21debc5 to 4feabb3 Compare April 10, 2024 14:55
@calvinlu3 calvinlu3 changed the base branch from master to rc April 29, 2024 15:32
@calvinlu3 calvinlu3 force-pushed the cdx-page branch 2 times, most recently from 1ac5f25 to ab02493 Compare April 30, 2024 18:18
Release of the{' '}
<Link to={PAGE_ROUTE.CDX}>
"FDA Cleared or Approved Companion Diagnostic Devices"
</Link>
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe a nit, but I'd add a space between ... Devices and the open parenthesis

tissue: '',
tumorForm: 'LIQUID',
},
];
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did we make the decision to hardcode the cancer types into the frontend?

Copy link
Collaborator Author

@calvinlu3 calvinlu3 Apr 30, 2024

Choose a reason for hiding this comment

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

Thanks for catch. Thought I removed this before commit. It was purely for testing purposes.

@@ -0,0 +1,16753 @@
[
Copy link
Contributor

Choose a reason for hiding this comment

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

Same question as cancer types

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We don't have an API client that connects to oncokb-curation (which is where the CDx data is). We are using a static json file for now.

Copy link
Contributor

@bprize15 bprize15 left a comment

Choose a reason for hiding this comment

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

Approved with minor comment. Also just hoping to get some clarification on all the hard coding we're doing here.

@calvinlu3 calvinlu3 merged commit 5153d68 into oncokb:rc Apr 30, 2024
3 checks passed
@calvinlu3 calvinlu3 deleted the cdx-page branch April 30, 2024 20:18
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.

3 participants