cBioPortal / icebox

very low priority issues
0 stars 0 forks source link

Study View Age Histogram should have finer granularity at the low range #125

Open schultzn opened 8 years ago

schultzn commented 8 years ago

To select pediatric patients, it would be good if the age histogram would show patients under 20 in a separate graph.

image

jjgao commented 7 years ago

@zhx828 is it possible to zoom in?

zhx828 commented 7 years ago

@jjgao in the current implementation, no. But we could include an additional chart, similar what James did for the line chart.

pieterlukasse commented 7 years ago

+1 at The Hyve we also would like to have this feature for one of the projects. I think zoom in should be relatively easy to implement. See my findings in comment below. @zhx828 please let me know your comments.

pieterlukasse commented 7 years ago

Binning is controlled by content.getDcConfig = function(data, logScale) in /cbioportal/portal/src/main/webapp/js/src/dashboard/iviz.js Simple changes in this file already produce some useful results (all figures below taken from study view after code or data adjustments, brca_tcga study):

image (numOfGroups = 100; final gutter/2)

image (numOfGroups = 100; final gutter/3)

image (numOfGroups = 100; final gutter/MAX_INT)

image (numOfGroups = 100; final gutter/MAXINT; adjusted chartInst.xAxis().tickValues([...]) to get readable x axis labels)

Zoom should be easy to achieve by splitting the data list and rerendering the plot. This can be done by finding the sample ids that match the zoom region (in this examle by matching on age attribute) and using the sample ids list to restrict the rendering (in a similar way to what is now already done when filtering on attributes, although here we are not filtering):

image

(numOfGroups = 100; final gutter / MAX_INT; data filtered for samples where age > 72)

schultzn commented 7 years ago

I think the main problem is not the overall bin size - it is the fact that samples at the low range of the age (which are usually rare) are binned into a category such as <30. <20 would be more useful, as this class would contain more of the pediatric samples, for example.

On Aug 22, 2017, at 11:50 AM, pieterlukasse notifications@github.com wrote:

Binning is controlled by content.getDcConfig = function(data, logScale) in /cbioportal/portal/src/main/webapp/js/src/dashboard/iviz.js Simple changes in this file already produce some useful results (all figures below taken from study view after code or data adjustments):

https://user-images.githubusercontent.com/2900303/29559446-6dce6e4c-872f-11e7-9ba6-25fe6dc976ee.png (numOfGroups = 100; final gutter / 2)

https://user-images.githubusercontent.com/2900303/29559431-61c4a062-872f-11e7-8088-6a90366e8790.png (numOfGroups = 100; final gutter / 3)

https://user-images.githubusercontent.com/2900303/29559456-768b9762-872f-11e7-8382-b47ca42fca19.png (numOfGroups = 100; final gutter / MAX_INT)

https://user-images.githubusercontent.com/2900303/29559472-7ee37ca4-872f-11e7-820b-09ffbd99d60f.png (numOfGroups = 100; final gutter / MAXINT; adjusted chartInst.xAxis().tickValues([...]) to get readable x axis labels)

Zoom should be easy to achieve by splitting the data list and rerendering the plot. This can be done by finding the sample ids that match the zoom region (in this examle by matching on age attribute) and using the sample ids list to restrict the rendering (in a similar way to what is now already done when filtering on attributes, although here we are not filtering):

https://user-images.githubusercontent.com/2900303/29559497-8e1967ce-872f-11e7-9f85-fb7e7b077826.png (numOfGroups = 100; final gutter / MAX_INT; data filtered for samples where age > 72)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cBioPortal/cbioportal/issues/1765#issuecomment-323977256, or mute the thread https://github.com/notifications/unsubscribe-auth/ALV34OywP26BQmqYCOSC2uphYoEwOHbFks5saqRMgaJpZM4KP__Q.

pieterlukasse commented 7 years ago

@schultzn Ok, thanks for the details. I just meant to add some technical details I found while looking at the code when assessing whether it should be easy to add zoom capabilities. Do you think I should log the zoom feature request as a separate issue?

One more thought: selecting and zooming could be combined into the same action. I.e. when selecting a region of the histogram such as <=30, it could automatically "zoom in" and render the histogram just for that region. The user could then refine his selection by selecting a new region (e.g. all values below 20). I think this could satisfy your use case while at the same time be a general solution for other use cases. Let me know what you think.

schultzn commented 7 years ago

Not sure how to best implement this. Zooming would definitely be good, so that a user can see the distribution in a smaller region. For example, are the samples below 30 mostly also below 20?

On Aug 22, 2017, at 12:08 PM, pieterlukasse notifications@github.com wrote:

@schultzn https://github.com/schultzn Ok, thanks for the details. I just added some technical details I found looking at the code while assessing whether it should be easy to add zoom capabilities. Do you think I should log the zoom feature request as a separate issue?

One more thought: selecting and zooming could be combined into the same action. I.e. when selecting a region of the histogram such as <=30, it could automatically "zoom in" and render the histogram just for that region. The user could then refine his selection by selecting a new region (e.g. all values below 20). I think this could satisfy your use case while at the same time be a general solution for other use cases. Let me know what you think.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cBioPortal/cbioportal/issues/1765#issuecomment-323981819, or mute the thread https://github.com/notifications/unsubscribe-auth/ALV34BA44pQiY3svaDT32WFxwrTKsoagks5saqiZgaJpZM4KP__Q.

jjgao commented 7 years ago

There is an implementation underway for zooming.

zhx828 commented 7 years ago

@schultzn @pieterlukasse Please see the following proposal to solve this issue and cBioPortal/cbioportal#2423

When a user initially loads the page, the full range will be selected(figure one). The user is able to select a subset of data on the bottom bar chart, then the bar chart on the top will be regenerated based on the selection(figure two).

Figure One: full_selection

Figure Two: partial_selection

pieterlukasse commented 7 years ago

Thanks @zhx828, I like this solution :+1:

jjgao commented 6 years ago

@zhx828 let's do this after refactoring is done.

schultzn commented 6 years ago

Wow… JJ is digging deep.. this is from last year. :-)

On Jun 28, 2018, at 5:06 PM, JianJiong Gao notifications@github.com wrote:

@zhx828 https://github.com/zhx828 let's do this after refactoring is done.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cBioPortal/cbioportal/issues/1765#issuecomment-401173296, or mute the thread https://github.com/notifications/unsubscribe-auth/ALV34IUST4YgVoLZJflPK2rIZsXmO9-3ks5uBUU7gaJpZM4KP__Q.

jjgao commented 6 years ago

@schultzn two years ago actually...

zhx828 commented 5 years ago

@jjgao should this be included in https://github.com/cBioPortal/GSoC/issues/59?

jjgao commented 5 years ago

@zhx828 good idea. Could you add that?

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

jjgao commented 4 years ago

this is still needed.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

jjgao commented 3 years ago

moving this to icebox for now.