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

Summary view filtering bug #5853

Closed
priti88 opened this issue Mar 11, 2019 · 22 comments · Fixed by cBioPortal/cbioportal-frontend#2995
Closed

Summary view filtering bug #5853

priti88 opened this issue Mar 11, 2019 · 22 comments · Fixed by cBioPortal/cbioportal-frontend#2995

Comments

@priti88
Copy link
Contributor

priti88 commented Mar 11, 2019

Grouping of samples in the pie chart is not case sensitive, but if we apply filter then the code does exact string match.
Example: Local Recurrence = 11 samples, If I apply the filter only 10 samples get selected because one of the sample had a typo: 'Local recurrence' (R is in lower case).

@zhx828
Copy link
Member

zhx828 commented Mar 11, 2019

@jjgao this is the issue Adam and I saw last week. Basically this is a mysql group by issue. Since the pie chart gets the category from data directly. Should we make the frontend case insensitive?

@jjgao
Copy link
Member

jjgao commented Mar 11, 2019

Yes, please make frontend case insensitive.

@zhx828
Copy link
Member

zhx828 commented Mar 12, 2019

@onursumer this is related to backend as well. Probably I should start to take a look?

@zhx828 zhx828 assigned khzhu and unassigned zhx828 Apr 23, 2019
@khzhu
Copy link
Contributor

khzhu commented Apr 23, 2019

@zhx828 , which study in public portal should I use to reproduce the error? Thanks!

@khzhu
Copy link
Contributor

khzhu commented Apr 24, 2019

Hi @priti88 , I am looking at the issue. Could you please let me know how to reproduce the issue? For instance, which study you were looking at, the type of chart used for grouping/filtering samples? Thanks!

@zhx828
Copy link
Member

zhx828 commented Apr 24, 2019

@khzhu I'm trying to reproduce the issue. But seems the all public studies with Local Recurrence all have been fixed. But one thing you can do is making the study view filtering insensitive. For instance, http://www.cbioportal.org/study?id=lgg_tcga&filterAttributeId=ONCOTREE_CODE&filterValues=OAST works but not http://www.cbioportal.org/study?id=lgg_tcga&filterAttributeId=ONCOTREE_CODE&filterValues=oast We want to make it case insensitive.

@khzhu
Copy link
Contributor

khzhu commented Apr 24, 2019

I see, thanks @zhx828 , will do some debugging.

@khzhu
Copy link
Contributor

khzhu commented Apr 29, 2019

Hi @zhx828 , after some debugging, I would say it is no longer an issue. First of all, the backend queries the clinical data by clinical attributes Ids and sample Ids only. And, there isn't any filters applied to the clinical attribute values being pulled out from the database. The frontend, on the other hand, does a filter only on a user selected option from the Oncotree pie chart.
Screen Shot 2019-04-29 at 3 37 30 PM

The request URL no longer has filterValues appended to the query string which also eliminates any chances the query string to be modified.
Screen Shot 2019-04-29 at 3 37 51 PM

@priti88
Copy link
Contributor Author

priti88 commented Apr 29, 2019

@khzhu I don't think we can use the public data to debug this. You might have to to create some fake data and upload the study to your local instance to verify if this works.

@priti88
Copy link
Contributor Author

priti88 commented Apr 29, 2019

I would recommend using any tcga study and changing the values for one of the clinical field. Example: make it all lower case or upper case.

@khzhu
Copy link
Contributor

khzhu commented Apr 29, 2019

@priti88 , no worries, please. I was debugging using my local develop instance with the same public dataset downloaded.

@jjgao
Copy link
Member

jjgao commented Jun 12, 2019

@khzhu any update on this?

@khzhu
Copy link
Contributor

khzhu commented Jun 12, 2019

@jjgao , I do not think this is a problem any more. Repaste my comments on April 29.

after some debugging, I would say this is no longer an issue. First of all, the backend queries the clinical data by clinical attributes Ids and sample Ids only. And, there isn't any filters applied to the clinical attribute values being pulled out from the database. The frontend, on the other hand, is filtering based on the user selection on the Oncotree pie chart. filterAttributeId=ONCOTREE_CODE&filterValues=OAST no longer being appended to the URL query string so that the user will not be able by any chance to alter the filterValues.

@jjgao
Copy link
Member

jjgao commented Jun 13, 2019

@khzhu I don't think I got it.

So when we have both Local Recurrence and Local recurrence, is our API pull both samples out when we query for Local Recurrence, ie. case insensitive? @khzhu @zhx828

@khzhu
Copy link
Contributor

khzhu commented Jun 14, 2019

@jjgao , the API will only return those Local Recurrence samples. Is that a desirable behavior? If we have both Local Recurrence and Local recurrence samples, then we would have two different sample types/sites listed on the pie chart. So, If we want to think "Local Recurrence" as the same thing as "Local recurrence", then we should do the correction/mapping before importing/loading into the database.
Could you please show me how do you submit your query, since I cannot see any places you can enter your search text other than select a sample list from the dropdown box or from a pie chart.

@jjgao
Copy link
Member

jjgao commented Jun 14, 2019

@jjgao
Copy link
Member

jjgao commented Jun 14, 2019

Another reason we should make filter case insensitive is b/c the API for counting (pie chart) is case insensitive.

@jjgao
Copy link
Member

jjgao commented Jun 14, 2019

@khzhu
Copy link
Contributor

khzhu commented Jun 14, 2019

@jjgao , but all queries are based on clinicalAttribute IDs sent from the view not text (clinical attributes)

<select id="getClinicalAttribute" resultType="org.cbioportal.model.ClinicalAttribute">
        SELECT
        <include refid="select">
            <property name="prefix" value=""/>
        </include>
        FROM clinical_attribute_meta
        INNER JOIN cancer_study ON clinical_attribute_meta.CANCER_STUDY_ID = cancer_study.CANCER_STUDY_ID
        WHERE clinical_attribute_meta.ATTR_ID = #{clinicalAttributeId}
        AND cancer_study.CANCER_STUDY_IDENTIFIER = #{studyId}
    </select>

@jjgao
Copy link
Member

jjgao commented Jun 18, 2019

@khzhu what is the query when you click a slice on the pie?

@khzhu
Copy link
Contributor

khzhu commented Sep 17, 2019

Hi @JJ, @hongxing, finally got the bug fixed 🙂 . Can give a quick demo tomorrow at our standup.

@inodb
Copy link
Member

inodb commented Jan 17, 2020

There is still an issue that on the frontend that attribute values are not case insensitive. There are PRs that fixed other parts of this issue e.g. this frontend PR fixed case insensitive attribute ids: cBioPortal/cbioportal-frontend#2716 & other related backend fixes: cBioPortal/cbioportal-frontend#2716.

But this still needs to be fixed:

See MALE in URL

https://www.cbioportal.org/study/summary?filterAttributeId=SEX&filterValues=MALE&id=acc_tcga_pan_can_atlas_2018

Screen Shot 2020-01-17 at 12 35 21 PM

vs

Male in URL

https://www.cbioportal.org/study/summary?filterAttributeId=SEX&filterValues=Male&id=acc_tcga_pan_can_atlas_2018

Screen Shot 2020-01-17 at 12 36 04 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants