You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I was wondering if it would be possible to render a valid result with the custom_color = ... argument when also setting consensus_views = TRUE. Currently, you can render custom colors if the consensus view is set to FALSE, but not if TRUE.
As I show below, it appears you can currently generate alternative color schemes while also passing consensus_view = TRUE provided those alternatives are the built-in set of colors, however, I can not find a way to pass the custom_color argument and get the expected custom palette to render (it always defaults back to the default color palette).
Thanks for any tips you can offer
# reproducing using https://github.com/YuLab-SMU/ggmsa/issues/32
# custom palette labeled 'my_cutstom', though see: https://github.com/YuLab-SMU/ggmsa/issues/21
protein_sequences <- system.file("extdata", "sample.fasta", package = "ggmsa")
p1 <- ggmsa(protein_sequences, 300, 345)
custom_color = my_cutstom,
char_width = 0.5,
show.legend = FALSE)
my_cutstom <- data.frame(names = c(LETTERS[1:26],"-"),
color = "#FFFFFF",
stringsAsFactors = FALSE)
# default color works
ggmsa(protein_sequences, 300, 350, char_width = 0.5, seq_name = TRUE, consensus_views = TRUE, disagreement = FALSE, use_dot = TRUE)
# custom color can work if not requiring consensus_views to be TRUE:
ggmsa(protein_sequences, 300, 350, char_width = 0.5, seq_name = TRUE, custom_color = my_cutstom)
# alternate built-in color works
ggmsa(protein_sequences, 300, 350, char_width = 0.5, seq_name = TRUE, consensus_views = TRUE, disagreement = FALSE, use_dot = TRUE, color = 'Taylor_AA')
# custom color does not work
ggmsa(protein_sequences, 300, 350, char_width = 0.5, seq_name = TRUE, consensus_views = TRUE, disagreement = FALSE, use_dot = TRUE, custom_color = my_cutstom)
The text was updated successfully, but these errors were encountered:
Hi,
I was wondering if it would be possible to render a valid result with the
custom_color = ...
argument when also settingconsensus_views = TRUE
. Currently, you can render custom colors if the consensus view is set to FALSE, but not if TRUE.As I show below, it appears you can currently generate alternative color schemes while also passing
consensus_view = TRUE
provided those alternatives are the built-in set of colors, however, I can not find a way to pass thecustom_color
argument and get the expected custom palette to render (it always defaults back to the default color palette).Thanks for any tips you can offer
The text was updated successfully, but these errors were encountered: