ggmsa icon indicating copy to clipboard operation
ggmsa copied to clipboard

Seq names are not shown

Open Dobrokhotov1989 opened this issue 1 year ago • 0 comments

Hi there,

I think I've spotted a bug:

suppressPackageStartupMessages({
  library(ggmsa)
  library(Biostrings)
})
my_letters <- c('A', 'T', 'C', 'G')

(seq_1 <- paste0(sample(my_letters, size = 10, replace = TRUE), collapse = ''))
#> [1] "TTATCAAGGT"
  
(seq_2 <- paste0(sample(my_letters, size = 10, replace = TRUE), collapse = ''))
#> [1] "CGATTCAGTA"

alignment <- DNAStringSet(x = c(seq_1 = seq_1,
                                seq_2 = seq_2))

ggmsa(alignment,
      seq_name = TRUE)


# Seq names are replaced by numbers if none_bg is true
ggmsa(alignment,
      seq_name = TRUE,
      none_bg = TRUE)


# Seq names are replaced by numbers if highlight position is outside of shown region
ggmsa(alignment,
      start = 1,
      end = 8,
      seq_name = TRUE,
      position_highlight = 10)


# but not if highligh position is withing the shown region
ggmsa(alignment,
      start = 1,
      end = 8,
      seq_name = TRUE,
      position_highlight = 7)

Created on 2023-06-22 with reprex v2.0.2

Dobrokhotov1989 avatar Jun 22 '23 13:06 Dobrokhotov1989