Error with custom color
atm44 opened this issue · 1 comments
atm44 commented
Hi, i have found that using custom color produced the next error:
Error in color_scheme(y, color, custom_color) :
object 'my_cutstom' not found
I have found that if my custom color dataframe is named as "'my_cutstom" (as you example) the error is fixed. I look at the code and i found that in:
https://github.com/YuLab-SMU/ggmsa/blob/master/R/color_else.R
there is what i think an error with variables names...and it should be:
if (!is.null(custom_color)){
custom_color[["names"]] <- as.character(custom_color[["names"]]) #Elimination factor interference
custom_color[["color"]] <- as.character(custom_color$col) #Fuzzy matching the string "colors" or "colours"
row.names(custom_color) <- custom_color[["names"]]
scheme_AA$custom_color <- custom_color[row.names(scheme_AA), "color"] %>% as.character()
y$color <- scheme_AA[y$character, "custom_color"]
}else{
Thanks for this great package!!
nyzhoulang commented
Hi, @atm44
Sorry for the late reply. Thank you for taking the time to fix this bug and helping to make ggmsa
better.
We are incredibly grateful for you as a customer.
Sincerely,
The YuLab Team