Currently, we have to check both case list and gene panel data to determine whether a gene is sequenced in a sample. Can we develop an API to combine that?
input: a list of samples, a list of genes.
output: a matrix to indicate whether a gene is sequenced in a sample.
... so that we can have a simple way to address this: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/cbioportal/Hoj3PVj4hGI/8qy865P_AQAJ
From @ersinciftci : "isn't http://www.cbioportal.org/api/swagger-ui.html#!/Gene_Panels/getGenePanelDataUsingPOST already doing https://github.com/cBioPortal/cbioportal/issues/3351? If it is, then do you want basically the same thing as @adama wants in https://github.com/cBioPortal/cbioportal/issues/3628?"
@ersinciftci Currently, we have to use three end points (Mutations, Gene_Panel, and sample list) to know whether a sample is (mutated, wildtype, or not sequenced) in a gene (based on a profile). I think we need a simpler end point to achieve that. I think that will also solve @adamabeshouse's #3628. We don't have to do exact the one I proposed above though.
@jjgao so basically an endpoint that returns data for each sample and gene combination, and specify the gene panel id if exists, or return a keyword like "Whole Exome" if whole exome, or return something like "NA" if not sequenced?
How about: a new projection for the samples endpoint? Query parameters: samples, genes. Because it could be thought of as properties of a sample.
A samples endpoint having genes parameter doesn't sound right, because samples and genes are two independent entities in the system. This property doesn't belong to samples(because it's meaningless without a gene) or genes, it's a property of their combination in a genetic profile, so I can just make /gene-panel-data/fetch more verbose, i.e. return data for whole exome and not sequenced combinations too.
That's a good point
@ersinciftci yes.
"so basically an endpoint that returns data for each sample and gene combination, and specify the gene panel id if exists, or return a keyword like "Whole Exome" if whole exome, or return something like "NA" if not sequenced?"
I was also thinking of returning NA vs WT from mutations end point. Currently, mutations end point only return mut cases, but we could return NA and WT too.
@jjgao so we will add a property to Mutation model (mutationType or something), and that property will have values like NA for not sequenced, WT for wildtype and MUT for normal mutations? And for NA and WT cases, all other Mutation model properties besides mandatory ones (entrezGeneId, sampleId, molecularProfileId) will be null?
And I talked to @priti88 and @tmazor and they stated that Genel Panel Data API should still return the Gene Panel Id even if it's not sequenced, so I'll add something like isSequenced which will always be true for Whole Exome, and I'll set the Gene Panel Id even if the queried gene is not in the panel but the sample has panel information for that genetic profile.
So I'll change those 2 APIs and it will resolve both this issue and #3628 , right?
@ersinciftci thanks! I think that should be sufficient. About the first one (adding NA/WT), could you make it optional, e.g. add a parameter "return_wt_na"?
@adamabeshouse @zhx828 thoughts?
@jjgao sure, should it be false by default? And is it possible to name it more clearly, possibly not using abbreviations like WT NA? something like includeNonMutated?
I'm not sure I entirely understand what you're saying, regarding how you'd denote WXS, and what you meant about setting the gene panel id even if the queried gene is not in the panel. Our current system suffers from a lot of ambiguity which the caller must know convention to resolve - the upcoming change should please make it completely explicit what are whole exome sequenced, and if a gene is in the gene panel and not sequenced or if its not in the gene panel.
@adamabeshouse 2 properties will be used to denote all combinations, genePanelId and isSequenced, genePanelId will be either wxs (or some other special string) or the real gene panel id of the sample, and isSequenced will be false if the gene is not in the panel. If a special string as genePanelId for Whole Exome doesn't sound good, we can also add a isWholeExome property and set it to true and leave the genePanelId as null if it's Whole Exome.
it seems conceptually cleaner to me to add the isWholeExome(Sequenced?) property, leave genePanelId as null. That all sounds clear enough to me :+1:
Cool, then I'll apply the same logic to Mutations API too, so instead of adding mutationType parameter and setting special strings like NA WT MUT, I'll add isSequenced and isWildtype to Mutation model.
includeNonMutated sounds good 馃憤 I am not sure if we should default it to false or true. Any thoughts?
isSequenced and isWildtype seem intuitive.
Most helpful comment
@jjgao so basically an endpoint that returns data for each sample and gene combination, and specify the gene panel id if exists, or return a keyword like "Whole Exome" if whole exome, or return something like "NA" if not sequenced?