Custom colors for option Biostrings.coloring
Hello,
any chance to add an option to assign custom colors for nucleotide/AA coloring in XString/XStringSets?
Thanks for considering, Kemal
Sorry for the slow response. This should be easily doable. I have a relatively long task list to get through for the next Bioc release, but I'll see if I can fit this in. Happy to review a PR as well if you get to it before me.
Notes for myself for later so I don't forget how to fix this when I get back to it
colors are built in make_AA_COLORED_LETTERS and make_DNA_COLORED_LETTERS. Add a function update_DNA_COLORED_LETTERS, update_AA_COLORED_LETTERS that takes as input color codes with names in the alphabet set and replaces the entries in DNA_AND_RNA_COLORED_LETTERS,AA_COLORED_LETTERS with the requested other colors. Accept no argument (or maybe also 'default') to reset to default. Should support input as a list too so that users can change foreground and background colors, e.g.:
# option 1
update_DNA_COLORED_LETTERS <- function(foreground=character(), background=character()) {
...
}
# option 2
update_DNA_COLORED_LETTERS <- function(list(foreground=character(), background=character())){
...
}
This won't persist across sessions but I don't think that's a major issue.
Fixed in PR #123