griffithlab / pVACtools

http://www.pvactools.org
BSD 3-Clause Clear License
138 stars 59 forks source link

fixing rounding issue in min-max slider #1116

Closed evelyn-schmidt closed 2 months ago

evelyn-schmidt commented 3 months ago

@mhoang22 encountered a problem where the dynamic scatter doesn't show all candidates for the custom module. In her pvacsplice output, there were 5 candidate groups (corresponding to 5 genes associated with the neoantigens). She expected to see 5 dots corresponding to the 5 candidate groups. However, only saw 3 candidates. When examining the ‘Overview of Neoantigen Features’ board again, it looks like the 2 candidate groups with extreme VAF values (1st candidate: gene ATG12: tumor DNA VAF 0.432 , tumor RNA VAF 0.387; 5th candidate: gene TP53: tumor DNA VAF 0.852, tumor RNA VAF 0.998) are the missing candidates. If she natural-logged transformed both x and y axis, then she could see 5 candidates. She concluded that there was a reason that candidates with edge values were being excluded.

I found that these edge cases were being missed because of the rounding that happens to create the min-max slider. The range used for the min-max slider was originally rounded and now is just set as the dataset min/max.

https://github.com/griffithlab/pVACtools/blob/efc101fa732262979f38edbadfb3c1060b6e6c2a/pvactools/tools/pvacview/server.R#L2120-L2121

So the change looks like this: https://github.com/griffithlab/pVACtools/blob/ef27b63b9f209881e367e8de4d8d87b746620888/pvactools/tools/pvacview/server.R#L2117-L2118

evelyn-schmidt commented 3 months ago

Yeah, @susannasiebert , I like the floor/ceiling suggestion because it looks a little cleaner on the slider.

However, is the most clear option for users to set the max/min value to the actual min/max value in the dataset? So you can see the maximum and minimum values on the slider?

susannasiebert commented 3 months ago

I personally don't think they need to match. They can always retrieve the actual min max value by hovering over the appropriate datapoint, right?