YuLab-SMU/ggmsa

non-numeric argument to binary operator

Opened this issue · 1 comments

I want to show all sequence in one page, but the following code will not work

nt_seq<- system.file("extdata", "LeaderRepeat_All.fa", package = "ggmsa")
ggmsa(nt_seq, color = "Chemistry_NT", font = NULL) + 
  geom_msaBar() +
  facet_msa(field = 120)

The error is shown blow

Coordinate system already present. Adding new coordinate system, which will replace the existing one.
Error in ggmsa(nt_seq, color = "Chemistry_NT", font = NULL) + geom_msaBar() +  : 
  non-numeric argument to binary operator

Is it possible to combine the geom_msaBar and face_msa function.

I encountered the same bug.
The code works fine.

protein_sequences <- system.file("extdata", "sample.fasta", package = "ggmsa")
ggmsa(protein_sequences, start = 221, end = 280, char_width = 0.5, seq_name = TRUE) + geom_seqlogo() + geom_msaBar()

But, when geom_msaBar() is added firstly, Error in ggmsa(protein_sequences, start = 221, end = 280, char_width = 0.5, : non-numeric argument to binary operator

protein_sequences <- system.file("extdata", "sample.fasta", package = "ggmsa")
ggmsa(protein_sequences, start = 221, end = 280, char_width = 0.5, seq_name = TRUE)  + geom_msaBar()+ geom_seqlogo()

My environment:
Windows 10
R 4.2.1
Rstudio 2022.07.1
ggmsa 1.2.3