griffithlab / GenVisR

Genome data visualizations
Creative Commons Zero v1.0 Universal
209 stars 62 forks source link

waterfall - clinical variable sort? #292

Open mattiyeh opened 7 years ago

mattiyeh commented 7 years ago

I have a large number of samples and I have a clinical variable that i have added to the waterfall plot. however, the ordering of the samples is still based on the hierarchical mutations. I tried doing a sort on the samples by clinical variable (using sampOrder) which seems to work but then the mutations within each group are not vertically sorted. Is there a way to set the sort order of a clinical variable, but let GenVisR determine the sort order of the samples WITHIN each group?

Thanks Marc

zlskidmore commented 7 years ago

Hi Marc,

Unfortunately it is not possible at this time. A work around would be to subset your samples to plot each group individually, and use the out="data" parameter that will give a list of data frames with the underlying data. Then you just have to grab the levels of the samples for the main plot. once you loop through all your groups you will then be able to concatenate the samples in the proper order and pass them to the final plot.

I will look into adding linear formulas to waterfalll() so in the future you could do something like ~variable, however I am unsure when this feature would be implemented.

Zach

mattiyeh commented 7 years ago

ok, thanks for the response! great tool overall.

apuhegde commented 5 years ago

Hello, just checking in to see if this is implemented yet. This feature would be super helpful!