thackl / gggenomes

A grammar of graphics for comparative genomics
https://thackl.github.io/gggenomes/
Other
581 stars 64 forks source link

Bug in focus() when supplying loci #74

Closed johnomics closed 3 years ago

johnomics commented 3 years ago

Thanks for writing gggenomes, it's great. There is a bug in focus(): https://github.com/thackl/gggenomes/blob/a3b92d8934011a7aacd636df860dc4f35f1afa87/R/focus.R#L113

I think this should be has_name(loci, "locus_id"). Without it, I am getting the following error when using focus(.loci = loci) with a tibble loci with bin_id, seq_id, start and end columns:

Error : argument "name" is missing, with no default
thackl commented 3 years ago

Oh, yes, it most certainly is a bug. In fact, the entire conditional code chunk is bs :see_no_evil:. Will push a fix asap.