thackl / gggenomes

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

! Required column(s) missing: • length #153

Closed jeffreyblanchard closed 1 year ago

jeffreyblanchard commented 1 year ago

I get the following error at the start of the vignette running

p <- gggenomes( genes=emale_genes, # a gene track, added as first feat track seqs=emale_seqs, # a seq track feats=list(emale_tirs, emale_ngaros), # multiple feat tracks links=emale_ava # a link track )

Error in require_vars(): ! Required column(s) missing: • length Backtrace:

  1. gggenomes::gggenomes(...)
  2. gggenomes:::add_seqs.gggenomes_layout(., seqs, ...)

    1. gggenomes:::as_seqs.tbl_df(seqs, ...)
    2. gggenomes::require_vars(x, vars)

    Error in require_vars(x, vars) :

jeffreyblanchard commented 1 year ago

Also a similar error in the example

emale_seqs <- read_fai("emales/emales.fna") %>% extract(seq_desc, into = c("emale_type", "is_typespecies"), "=(\S+) \S+=(\S+)", remove=F, convert=T) %>% arrange(emale_type, length)

Warning: Too many col_names, ignoring extra onesError in arrange(): ℹ In argument: ..2 = length. Caused by error: ! ..2 must be a vector, not a primitive function.

jeffreyblanchard commented 1 year ago

I believe this was caused by a conflict with tidyverse (which I had loaded). When I quit the session and restarted I was able to run the second chunk of code fine (but still not the first)