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

Replace legacy tracks with IGV #4188

Merged
merged 2 commits into from
May 5, 2022
Merged

Conversation

onursumer
Copy link
Member

@onursumer onursumer commented Feb 23, 2022

Fix cBioPortal/cbioportal#9311

Need to fix these before merging:

Checks

  • Has tests or has a separate issue that describes the types of test that should be created. If no test is included it should explicitly be mentioned in the PR why there is no test.
  • The commit log is comprehensible. It follows 7 rules of great commit messages. For most PRs a single commit should suffice, in some cases multiple topical commits can be useful. During review it is ok to see tiny commits (e.g. Fix reviewer comments), but right before the code gets merged to master or rc branch, any such commits should be squashed since they are useless to the other developers. Definitely avoid merge commits, use rebase instead.
  • Is this PR adding logic based on one or more clinical attributes? If yes, please make sure validation for this attribute is also present in the data validation / data loading layers (in backend repo) and documented in File-Formats Clinical data section!

@onursumer onursumer force-pushed the patient-view-igv branch 5 times, most recently from 352912f to 38c875e Compare March 1, 2022 15:36
@onursumer onursumer force-pushed the patient-view-igv branch 4 times, most recently from 3c33cc4 to 554e750 Compare March 14, 2022 23:16
@onursumer onursumer force-pushed the patient-view-igv branch 4 times, most recently from c2c16e8 to 6b11b77 Compare March 22, 2022 18:52
@onursumer onursumer force-pushed the patient-view-igv branch 4 times, most recently from e5c176d to 75c40f9 Compare March 25, 2022 21:42
@onursumer onursumer marked this pull request as ready for review March 25, 2022 23:05
@onursumer onursumer requested review from alisman and inodb March 25, 2022 23:06
return (
this.props.containerWidth - (this.shouldShowVAFPlot() ? 140 : 40)
);
}

private computeMutationFrequencyBySample(
Copy link
Member Author

Choose a reason for hiding this comment

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

moved to GenomicOverviewUtils

@@ -198,4 +200,236 @@ describe('GenomicOverviewUtils', () => {
);
});
});

describe('computeMutationFrequencyBySample()', () => {
Copy link
Member Author

Choose a reason for hiding this comment

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

tests moved from GenomicOverview.spec.tsx

@@ -92,3 +95,32 @@ export function sampleIdToIconData(

return lookupTable;
}

export function computeMutationFrequencyBySample(
Copy link
Member Author

Choose a reason for hiding this comment

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

moved from GenomicOverview.tsx

@@ -118,6 +385,12 @@ export default class GenomicOverview extends React.Component<
);
}

componentWillReceiveProps(nextProps: Readonly<IGenomicOverviewProps>) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is so it doesn't render if locus hasn't actually changed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Right. This is to prevent resetting zoom state on window resize. Hopefully this didn't introduce some unknown side effects.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We should put a comment on this to explain

Copy link
Member

@inodb inodb left a comment

Choose a reason for hiding this comment

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

Looks awesome! I think the main thing I noticed is:

  • There's a short time where the component just shows up as blank. I'm guessing this is in the IGV component itself so might be hard to fix. It happens both when loading the page the first time and when clicking on a mutation
  • There's a lot of whitespace: (1) between the first track and the chromosome track and (2) the chromosome track has a lot. Old representation was better about space use. Not sure if we can tweak this much more

@onursumer
Copy link
Member Author

onursumer commented Apr 27, 2022

Looks like sample mutation data do not always get sorted properly. e2e tests actually caught this problem. Here is an example where sample mutation data don't match the sample order: https://deploy-preview-4188--cbioportalfrontend.netlify.app/patient?caseId=P04&studyId=lgg_ucsf_2014. Click on any mutation and you will see that sample id displayed in the tooltip doesn't match the sample icon/number shown on the left for that specific sample.

This needs further debugging. The problem might be in the compareFn defined here:

const compareFn = (a: { sampleId: string }, b: { sampleId: string }) =>

We should not merge the PR before fixing the sorting issue.

@onursumer
Copy link
Member Author

The sort function seems working fine. Looks like IGV does not always keep the sample order intact. Need to investigate further to see if it is possible to force the sample order in IGV.

@onursumer
Copy link
Member Author

Looks like this is a know igv.js issue. I have left a comment there as well. Let's see if we can get a quick fix. igvteam/igv.js#1480 (comment)

@onursumer
Copy link
Member Author

Sorting issue should be fixed now.

@alisman alisman force-pushed the patient-view-igv branch 2 times, most recently from 65d8cbb to dc34ffa Compare May 5, 2022 15:26
Update screenshots

Fix vaf tests

Update circleci cache keys

Fix another IGV track test

Update cn segments tab screenshot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Patient view: refactoring genomic overview with igv.js
4 participants