snystrom / memes

An R interface to the MEME Suite
https://snystrom.github.io/memes/
Other
43 stars 5 forks source link

Error in to_df(.) : could not find function "to_df" #88

Closed mdozmorov closed 2 years ago

mdozmorov commented 2 years ago

Hi @snystrom, thanks for the package. I'm running it from a Docker container, going through the integrative_analysis.Rmd vignette. I cannot seem to find the to_df() function, with "Error in to_df(.) : could not find function "to_df"". Googling it is not easy. I tried something like the below, but, apparently, it won't work because I'm getting another error at the database filtering step, "Error: Can't transform a data frame with duplicate names." Any advice?

to_df <- function(x) {
  class(x) <- "data.frame"
  attr(x, "row.names") <- .set_row_names(length(x[[1]]))
  x
}
snystrom commented 2 years ago

Oh interesting... That function is exported from universalmotif (ie. universalmotif::to_df()), so maybe load that library.

snystrom commented 2 years ago

Also, are you doing this on your own data, or are you just repeating verbatim the analysis in the vignette? If you're using your own data, and using universalmotif::to_df() doesn't fix the issue, could you check whether length(names(your_motifs)) == length(unique(names(your_motifs))) is TRUE?

mdozmorov commented 2 years ago

Yes, just found that in my local installation of universalmotif v.1.10.1 I have to_df() and to_list(). Seems like the issue is with the Docker image, it installs universalmotif v.1.8.5, which doesn't have those functions. Updating universalmotif within the container solves the error.

snystrom commented 2 years ago

Great! Was this with the memes_docker container? I can fix that issue if so.

mdozmorov commented 2 years ago

Yes, I ran snystrom/memes_docker:devel

snystrom commented 2 years ago

Ah, I think the autobuilds have failed since Dockerhub changed their policy! I'll push up a new build & try to get those back on schedule.