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

Introduction

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 December 2021, version 5.4.1 is the most recent MEME-Suite version
# Please check the install guide (linked above) for more recent information
version=5.4.1
wget http://meme-suite.org/meme-software/$version/meme-$version.tar.gz
tar zxf meme-$version.tar.gz
cd meme-$version
./configure --prefix=$HOME/meme --with-url=http://meme-suite.org/ --enable-build-libxml2 --enable-build-libxslt
make
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.

library(memes)

# Verify that memes detects your meme install
# (returns all green checks if so)
check_meme_install()
#> 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

FAQS

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

sessionInfo()
#> R version 4.1.0 (2021-05-18)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: Ubuntu 20.04.3 LTS
#> 
#> Matrix products: default
#> BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.8.so
#> 
#> 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            
#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> other attached packages:
#> [1] memes_1.3.2
#> 
#> loaded via a namespace (and not attached):
#>  [1] tidyr_1.1.4            Biostrings_2.62.0      ggseqlogo_0.1         
#>  [4] rprojroot_2.0.2        digest_0.6.29          utf8_1.2.2            
#>  [7] R6_2.5.1               GenomeInfoDb_1.30.0    stats4_4.1.0          
#> [10] evaluate_0.14          ggplot2_3.3.5          pillar_1.6.4          
#> [13] zlibbioc_1.40.0        rlang_0.4.12           jquerylib_0.1.4       
#> [16] R.oo_1.24.0            R.utils_2.11.0         S4Vectors_0.32.3      
#> [19] rmarkdown_2.11         pkgdown_2.0.1.9000     textshaping_0.3.6     
#> [22] desc_1.4.0             readr_2.1.1            stringr_1.4.0         
#> [25] cmdfun_1.0.2           RCurl_1.98-1.5         munsell_0.5.0         
#> [28] compiler_4.1.0         xfun_0.28              pkgconfig_2.0.3       
#> [31] systemfonts_1.0.3      BiocGenerics_0.40.0    htmltools_0.5.2       
#> [34] tidyselect_1.1.1       tibble_3.1.6           GenomeInfoDbData_1.2.7
#> [37] IRanges_2.28.0         matrixStats_0.61.0     fansi_0.5.0           
#> [40] crayon_1.4.2           dplyr_1.0.7            tzdb_0.2.0            
#> [43] withr_2.4.3            R.methodsS3_1.8.1      bitops_1.0-7          
#> [46] waldo_0.3.1            grid_4.1.0             jsonlite_1.7.2        
#> [49] gtable_0.3.0           lifecycle_1.0.1        magrittr_2.0.1        
#> [52] scales_1.1.1           cli_3.1.0              stringi_1.7.6         
#> [55] cachem_1.0.6           XVector_0.34.0         fs_1.5.1              
#> [58] testthat_3.1.0         bslib_0.3.1            ellipsis_0.3.2        
#> [61] ragg_1.2.0             generics_0.1.1         vctrs_0.3.8           
#> [64] tools_4.1.0            glue_1.5.1             purrr_0.3.4           
#> [67] hms_1.1.1              pkgload_1.2.4          fastmap_1.1.0         
#> [70] yaml_2.2.1             colorspace_2.0-2       GenomicRanges_1.46.1  
#> [73] memoise_2.0.1          knitr_1.36             usethis_2.1.3         
#> [76] sass_0.4.0