roblanf / sangeranalyseR

functions to analyse sanger sequencing reads in R
MIT License
95 stars 24 forks source link

Manual colour selection for colourblind users #58

Closed lesserof2weevils closed 3 years ago

lesserof2weevils commented 3 years ago

Hi Rob,

I was wondering whether support for manually editing the colours in sequence chromatograms could be implemented? I'm red-green colour blind which can sometimes be an issue when interpreting and checking sequences. Other variations of colour-blindness is out there too, and they may need other combinations as well.

For red-green CB users, I imagine black, grey, blue, and red may be a good combination.

Good breakdown of colourblind friendly palettes in R can be found in Desi Quintas's Pebble-safe R studio themes: https://github.com/DesiQuintans/Pebble-safe?files=1

Cheers, James

Kuanhao-Chao commented 3 years ago

Hi James,

Thank you so much for your feedback. I've added colors parameter in generateReport() and launchApp() functions. Users can now set their own color theme of Shiny applications and final HTML reports. There are three options for users to choose from.

  1. default: (green, blue, black, red, purple).
  2. cb_friendly: ((0, 0, 0), (199, 199, 199), (0, 114, 178), (213, 94, 0), (204, 121, 167)).
  3. Users can set their own colors with a vector with five elements.

Here is the result of the chromatogram and the sequences in the shiny applications.

Screen Shot 2020-09-06 at 2 34 20 am Screen Shot 2020-09-06 at 2 34 31 am

Please let me know whether the color theme is colourblind friendly. Thank you so much!

cheers,

Howard