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

Oql upstream downstream fusions in oncoprint #4494

Conversation

pvannierop
Copy link
Contributor

This PR continues from #4413.
This PR depends on backend PR cBioPortal/cbioportal#9949

The new OQL syntax for SVs/fusions uses '::' notation. With this PR the OQL will show relevant tracks in Oncoprint.

image

image

@@ -5537,6 +5553,14 @@ export default class CBioPortalAPIInternal {
'sampleMolecularIdentifiers0MolecularProfileId' ? : string,
'sampleMolecularIdentifiers0SampleId' ? : string,
'structuralVariantFilter': StructuralVariantFilter,
'structuralVariantQueries0Gene1ContainingOnlyOneIdentifierOrSpecialValue' ? : boolean,
Copy link
Collaborator

Choose a reason for hiding this comment

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

seems kinda strange that there's index in this property name?

Copy link
Contributor Author

@pvannierop pvannierop Feb 6, 2023

Choose a reason for hiding this comment

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

This appears to be how Swagger exposes the docs for a list/array. The docs for the corresponding section look ok to me:
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This fixed with merge of the backend PR.

*/
@computed get singleHugoGeneSymbols() {
if (
this.urlWrapper.query.gene_list &&
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can now use optional chaining to write this condition this.urlWrapper.query?.gene_list.length
it will evaluate falsy if gene_list is undefined

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix at all three places that his was done.

Copy link
Collaborator

Choose a reason for hiding this comment

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

still seems not done?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it is done.

return [];
} else {
const entrezGeneIds = genes
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think genes is, like 20k long, so perhaps we should have a computed lookup which is symbol to gene and then you can just iterate through structVarHugoGeneSymbols

Copy link
Contributor Author

@pvannierop pvannierop Feb 6, 2023

Choose a reason for hiding this comment

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

I think that genes is the genes that are derived from the query. There is a structure called referenceGenes that appears to represent all genes in the reference genome (~20k). However, I have I agree that this mapping would be more efficient with a looup. I have created a hugoGeneSymbol => Gene lookup and mapped from there.

@@ -1205,6 +1242,23 @@ const getGeneFromAlterations = (q: SingleGeneQuery) => {
return (q.alterations as FUSIONCommandOrientationBase[])[0].gene;
};

export function fusionsInOQLQuery(oql_query: string): SingleGeneQuery[] {
Copy link
Collaborator

Choose a reason for hiding this comment

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

curious why you switched to "fusion" here when everything else in PR is structural variant

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah good point, I have renamed these methods to the SV equivalent.

Copy link
Collaborator

@alisman alisman left a comment

Choose a reason for hiding this comment

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

see comments

@pvannierop
Copy link
Contributor Author

SV in Oncoprint

@pvannierop pvannierop force-pushed the oql_upstream_downstream_fusions_in_oncoprint branch from 46af2c2 to f6791a4 Compare February 27, 2023 14:54
@pvannierop pvannierop changed the base branch from oql_upstream_downstream_fusions to master February 27, 2023 15:00
@pvannierop pvannierop force-pushed the oql_upstream_downstream_fusions_in_oncoprint branch 4 times, most recently from a675540 to d00bc74 Compare March 17, 2023 08:27
@pvannierop pvannierop force-pushed the oql_upstream_downstream_fusions_in_oncoprint branch 3 times, most recently from 86f89ed to c8efbd8 Compare April 3, 2023 12:36
@pvannierop pvannierop force-pushed the oql_upstream_downstream_fusions_in_oncoprint branch from c8efbd8 to 8996651 Compare April 3, 2023 13:36
@alisman alisman merged commit c31c2cd into cBioPortal:master Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants