omarwagih/ggseqlogo

Strange `custom` behaviour when dimensions are not matched.

Closed this issue · 1 comments

Hello!

Thank you for an excellent package.

I have stumbled on a strange behaviour while using method="custom" with an unexpected number of elements. Here is an example:

set.seed(123)
silly <- list(c("T","C","G","A", "A"))
matrix( rexp(5 * 3), nrow = 5, dimnames=silly) %>% 
ggseqlogo(seq_type='dna', method='custom')

wut

I know this is a strange example, since the dimensions are mismatched. Should there be an input check, or perhaps a group option?

Thanks for pointing this out. Duplicate row names shouldn't be allowed. I've added an input check in the latest commit.