Arcadia-Science / sourmashconsumr

Working with the outputs of sourmash in R
https://arcadia-science.github.io/sourmashconsumr/
Other
21 stars 3 forks source link

add color to the compare plots #34

Closed taylorreiter closed 1 year ago

taylorreiter commented 1 year ago

Right now, the compare plot looks like this:

comp <- read_compare_csv("tests/testthat/comp_k31.csv")
mds <- make_compare_mds(compare_df = comp)
plt <- plot_compare_mds(mds)
plt

image

It might be nice to have this plot accept colors optionally: image

I went to implement this, but it wasn't clear to me what the best way to do this would be. I decided to leave this as-is for now, and then as I use the functions, i think it will become clear how I interact with this and then I'll add it to the function.

Similarly, it would be cool to color the axis labels or something by sample type or group for the heatmap: image

Again, don't know how to do this in a way that will be intuitive to downstream users yet, so will do later!

taylorreiter commented 1 year ago

18 shows how to add color, and I kinda like this solution -- plugging into the ggplot2 ecosystem. I'm going to close this issue for now.