BradyAJohnston / plasmapR

Creating plasmid maps inside ggplot.
https://bradyajohnston.github.io/plasmapR/
Other
79 stars 8 forks source link

Short #2

Open SmalJonni opened 1 year ago

SmalJonni commented 1 year ago

Hi,

I am currently getting an exeption Error in FUN(X[[i]], ...) : object 'name' not found when trying to plot a plasmid containing only short features/arrows.

You should be able to replicate the error with your own test file test.gb in this repository:

library(plasmapR)
plasmid <- parse_plasmid("test.gb")
plasmid$features<-plasmid$features[1,] #Extract one short features
p <- render_plasmap(plasmid,
                    rotation = 45)
p

The error is produced in the _plasmidplot function, calling ggfittext::geom_fit_text that is unable to handle an empty labels$curved object

Thank you for your work on this package. Regards

BradyAJohnston commented 1 year ago

Hello! Thanks for the error report. I don't know if I'll have time to look into this over the coming month or so, but I'll certainly look into it!