-
Notifications
You must be signed in to change notification settings - Fork 271
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
Oql upstream downstream fusions in oncoprint #4494
Conversation
@@ -5537,6 +5553,14 @@ export default class CBioPortalAPIInternal { | |||
'sampleMolecularIdentifiers0MolecularProfileId' ? : string, | |||
'sampleMolecularIdentifiers0SampleId' ? : string, | |||
'structuralVariantFilter': StructuralVariantFilter, | |||
'structuralVariantQueries0Gene1ContainingOnlyOneIdentifierOrSpecialValue' ? : boolean, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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 && |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still seems not done?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
src/shared/lib/oql/oqlfilter.ts
Outdated
@@ -1205,6 +1242,23 @@ const getGeneFromAlterations = (q: SingleGeneQuery) => { | |||
return (q.alterations as FUSIONCommandOrientationBase[])[0].gene; | |||
}; | |||
|
|||
export function fusionsInOQLQuery(oql_query: string): SingleGeneQuery[] { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comments
46af2c2
to
f6791a4
Compare
a675540
to
d00bc74
Compare
86f89ed
to
c8efbd8
Compare
c8efbd8
to
8996651
Compare
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.