See package website for full vignette

The Bioconductor build system does not have the MEME Suite installed, therefore these vignettes will not contain any R output. To view the full vignette, visit this article page on the memes website at this link


memes is an R interface to the MEME Suite family of tools, which provides several utilities for performing motif analysis on DNA, RNA, and protein sequences. It works by detecting a local install of the MEME suite, running the commands, then importing the results directly into R.

Installing the MEME Suite

memes relies on a local install of the MEME Suite. For installation instructions for the MEME suite, see the MEME Suite Installation Guide.

Briefly, the MEME suite can be installed to a default location (~/meme/) on Linux, MacOS, Cygwin, and Windows Linux Subsystem using the following shell commands:

# As of May 2020, version 5.1.1 is the most recent MEME-Suite version
# Please check the install guide (linked above) for more recent information
tar zxf meme-$version.tar.gz
cd meme-$version
./configure --prefix=$HOME/meme --with-url= --enable-build-libxml2 --enable-build-libxslt
make test
make install

For additional troubleshooting or to learn more about install configuration, please see the Installation Guide.

Detecting the MEME Suite

memes needs to know the location of the meme/bin/ directory on your local machine. You can tell memes the location of your MEME suite install in 4 ways. memes will always prefer the more specific definition if it is a valid path. Here they are ranked from most- to least-specific:

  1. Manually passing the install path to the meme_path argument of all memes functions
  2. Setting the path using options(meme_bin = "/path/to/meme/bin/") inside your R script
  3. Setting MEME_BIN=/path/to/meme/bin/ in your .Renviron file, or export MEME_BIN=/path/to/meme/bin in your ~/.bashrc
  4. memes will try the default MEME install location ~/meme/bin/

If memes fails to detect your install at the specified location, it will fall back to the next option.

To verify memes can detect your MEME install, use check_meme_install() which uses the search herirarchy above to find a valid MEME install. It will report whether any tools are missing, and print the path to MEME that it sees. This can be useful for troubleshooting issues with your install.


# Verify that memes detects your meme install
# (returns all green checks if so)
#> checking main install
#> ✔ /opt/meme/bin
#> checking util installs
#> ✔ /opt/meme/bin/dreme
#> ✔ /opt/meme/bin/ame
#> ✔ /opt/meme/bin/fimo
#> ✔ /opt/meme/bin/tomtom
#> ✔ /opt/meme/bin/meme
#> ✔ /opt/meme/bin/streme
# You can manually input a path to meme_path
# If no meme/bin is detected, will return a red X
check_meme_install(meme_path = "bad/path")
#> checking main install
#> ✖ bad/path


I get the following error: installation of package ‘R.oo’ had non-zero exit status

  • Problem: Your R installation likely lacks the R.css file
  • Solution: when installing the package, set remotes::install_github("snystrom/memes", INSTALL_opts = c("--no-html"))
  • NOTE: all help documents for memes will be parsed as plain-text so will lack links or other formatting.

Session Info

#> R version 4.1.0 (2021-05-18)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: Ubuntu 20.04.2 LTS
#> Matrix products: default
#> BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/
#> locale:
#>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
#>  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
#>  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=C             
#>  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
#>  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> other attached packages:
#> [1] memes_1.1.4
#> loaded via a namespace (and not attached):
#>  [1] tidyr_1.1.3            Biostrings_2.61.2      ggseqlogo_0.1         
#>  [4] rprojroot_2.0.2        digest_0.6.27          utf8_1.2.2            
#>  [7] R6_2.5.0               GenomeInfoDb_1.29.3    stats4_4.1.0          
#> [10] evaluate_0.14          ggplot2_3.3.5          pillar_1.6.2          
#> [13] zlibbioc_1.39.0        rlang_0.4.11           jquerylib_0.1.4       
#> [16] R.oo_1.24.0            R.utils_2.10.1         S4Vectors_0.31.0      
#> [19] rmarkdown_2.9          pkgdown_1.6.1.9001     textshaping_0.3.5     
#> [22] desc_1.3.0             readr_2.0.0            stringr_1.4.0         
#> [25] cmdfun_1.0.2           RCurl_1.98-1.3         munsell_0.5.0         
#> [28] compiler_4.1.0         xfun_0.24              pkgconfig_2.0.3       
#> [31] systemfonts_1.0.2      BiocGenerics_0.39.1    htmltools_0.5.1.1     
#> [34] tidyselect_1.1.1       tibble_3.1.3           GenomeInfoDbData_1.2.6
#> [37] IRanges_2.27.0         matrixStats_0.60.0     fansi_0.5.0           
#> [40] crayon_1.4.1           dplyr_1.0.7            tzdb_0.1.2            
#> [43] withr_2.4.2            R.methodsS3_1.8.1      bitops_1.0-7          
#> [46] waldo_0.2.5            grid_4.1.0             jsonlite_1.7.2        
#> [49] gtable_0.3.0           lifecycle_1.0.0        magrittr_2.0.1        
#> [52] scales_1.1.1           cli_3.0.1              stringi_1.7.3         
#> [55] cachem_1.0.5           XVector_0.33.0         diffobj_0.3.4         
#> [58] fs_1.5.0               testthat_3.0.4         bslib_0.2.5.1         
#> [61] ellipsis_0.3.2         ragg_1.1.3             generics_0.1.0        
#> [64] vctrs_0.3.8            rematch2_2.1.2         tools_4.1.0           
#> [67] glue_1.4.2             purrr_0.3.4            hms_1.1.0             
#> [70] pkgload_1.2.1          fastmap_1.1.0          yaml_2.2.1            
#> [73] colorspace_2.0-2       GenomicRanges_1.45.0   memoise_2.0.0         
#> [76] knitr_1.33             usethis_2.0.1          sass_0.4.0