ggmotif

Xiang Li

2022-06-30

ggmotif: An R Package for the extraction and visualization of motifs from MEME software

MEME Suit is a most used tool to identify motifs within deoxyribonucleic acid (DNA) or protein sequences. However, the results generated by the MEME Suit are saved using file formats, .xml and .txt, that are difficult to read, visualize or integrate with other wide used phylogenetic tree packages such as ggtree. To overcome this problem, we developed the ggmotif R package that provides a set of easy-to-use functions that can be used to facilitate the extraction and visualization of motifs from the results files generated by the MEME Suit. ggmotif can extract the information of the location of motif(s) on the corresponding sequence(s) from the .xml format file and visualize it. Additionally, the data extracted by ggmotif can be easily integrated with the phylogenetic data generated by ggtree. On the other hand, ggmotif can get the sequence of each motif from the .txt format file and draw the sequence logo with the function ggseqlogo from ggseqlogo R package.

Authors

Xiang LI

College of Plant Protection, Yunnan Agricultural University

https://www.web4xiang.top/

Identification of motifs

The demo data, the AP2 gene family of Arabidopsis thaliana, was downloaded from Plant Transcription Factor Database. The latest version MEME, v5.4.1, was used search motifs from the demo data using the fellow code:

meme ara.fa -protein -o meme_out -mod zoops -nmotifs 10 -minw 4 -maxw 7 -objfun classic -markov_order 0

The output files, htmlfile, txt file and xml file, can be found at GitHub.

Construction of phylogenetic tree

clustalo (V1.2.4) and FastTree (V2.1.10) were used to align the sequences and construct the phylogenetic tree.

clustalo -i ara.fa > ara.aligned.fa
FastTree ara.aligned.fa > ara.twk

The output files can be found at GitHub.

Installation and loading

if(!require(devtools)) install.packages("devtools")
devtools::install_github("lixiang117423/ggmotif")
install.packages("ggmotif")
library(ggmotif)
## Registered S3 method overwritten by 'ggtree':
##   method      from 
##   identify.gg ggfun

Parse motif information from MEME results

The results generated by MEME Suit include a lot of files, including figures of each motif and three other files, a htmlfile, a txtfile and a xml file. The html file contain some figures of motifs. The txt file is for the sequences’ information and the xml for other information including position, length, p-value and so on.

The main function of ggmotif is to parse the information and plot the position of each motif on the corresponding sequences.

Parse information

information of sequences of motifs

filepath <- system.file("examples", "meme.txt", package = "ggmotif")
motif.info <- getMotifFromMEME(data = filepath, format="txt")

information of other detail information of motifs

filepath <- system.file("examples", "meme.xml", package="ggmotif")
motif.info.2 <- getMotifFromMEME(data = filepath, format="xml")

Plot location

The figures from MEME only contain the location. It is difficult to combine the location figure to the corresponding phylogenetic tree. In ggmotif, the function motifLocation can visualize the location of each motif on its corresponding sequences, almost same as the html file. If user have the corresponding phylogenetic tree, the function can combine the tree and the location.

Without tree

filepath <- system.file("examples", "meme.xml", package = "ggmotif")
motif_extract <- getMotifFromMEME(data = filepath, format="xml")
motif_plot <- motifLocation(data = motif_extract)
motif_plot +
  ggsci::scale_fill_aaas()

ggplot2::ggsave(filename = "1.png", width = 6, height = 6, dpi = 300)

With tree

filepath <- system.file("examples", "meme.xml", package = "ggmotif")
treepath <- system.file("examples", "ara.nwk", package="ggmotif")
motif_extract <- getMotifFromMEME(data = filepath, format="xml")
motif_plot <- motifLocation(data = motif_extract, tree = treepath)
motif_plot +
  ggsci::scale_fill_aaas()

ggplot2::ggsave(filename = "2.png", width = 8, height = 6, dpi = 300)

If other information of phylogenetic tree is available, the parameter tree.anno can be used to plot the tip_point of phylogenetic tree.

library(tidyverse)
## -- Attaching packages --------------------------------------- tidyverse 1.3.2 --
## v ggplot2 3.3.6     v purrr   0.3.4
## v tibble  3.1.8     v dplyr   1.0.9
## v tidyr   1.2.0     v stringr 1.4.0
## v readr   2.1.2     v forcats 0.5.1
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
filepath <- system.file("examples", "meme.xml", package = "ggmotif")
treepath <- system.file("examples", "ara.nwk", package="ggmotif")

motif_extract <- getMotifFromMEME(data = filepath, format="xml")
tree.anno.path <- system.file("examples", "tree.anno.txt", package="ggmotif")
tree.anno = data.table::fread(tree.anno.path) %>% 
  dplyr::mutate(Group = as.character(Group))

motif_plot <- motifLocation(data = motif_extract, tree = treepath, tree.anno = tree.anno)
motif_plot +
  ggsci::scale_fill_aaas()

show motif(s)

library(tidyverse)
library(ggseqlogo)

filepath <- system.file("examples", "meme.txt", package = "ggmotif")
motif.info <- getMotifFromMEME(data = filepath, format = "txt")

# show one motif
motif.info %>%
  dplyr::select(2, 4) %>%
  dplyr::filter(motif.num == "Motif.2") %>%
  dplyr::select(2) %>%
  ggseqlogo::ggseqlogo() +
  theme_bw()

filepath <- system.file("examples", "meme.txt", package = "ggmotif")
motif.info <- getMotifFromMEME(data = filepath, format = "txt")

# show all motif
plot.list <- NULL

for (i in unique(motif.info$motif.num)) {
  motif.info %>%
    dplyr::select(2, 4) %>%
    dplyr::filter(motif.num == i) %>%
    dplyr::select(2) %>%
    ggseqlogo::ggseqlogo() +
    labs(title = i) +
    theme_bw() -> plot.list[[i]]
}

cowplot::plot_grid(plotlist = plot.list, ncol = 2)

Compare with other tools

The widely used R packages memes and universalmotif can process .txt files generated by MEME, but the extracted information does not have the location information of motifs.

library(tidyverse)
library(memes)

meme.res = memes::importMeme("meme.txt",combined_sites = TRUE)
## Could not find strand info, assuming +.
# table from memes::importMeme function
meme.res[["meme_data"]] %>% 
  dplyr::select_if(~ !any(is.na(.))) %>% 
  dplyr::select(-bkg,-motif)
##       name altname consensus alphabet strand  icscore nsites     eval type
## 1  RYEAHJW  MEME-1   RYEAHJW       AA      + 24.53271     30 2.6e-138  PPM
## 2  YRGVTRH  MEME-2   YRGVTRH       AA      + 25.34900     30 1.3e-124  PPM
## 3  GKQVYLG  MEME-3   GKQVYLG       AA      + 25.46267     30 1.2e-115  PPM
## 4  AYDIAAI  MEME-4   AYDIAAI       AA      + 25.14833     30 1.6e-114  PPM
## 5  RRKSSGF  MEME-5   RRKSSGF       AA      + 24.54460     30  1.6e-87  PPM
## 6  AAJKYWG  MEME-6   AALKYWG       AA      + 22.19454     28  8.1e-84  PPM
## 7  GRWZARI  MEME-7   GRWEARI       AA      + 22.76200     26  4.3e-82  PPM
## 8  NFDISDY  MEME-8   NFDISDY       AA      + 20.53382     30  2.5e-75  PPM
## 9  YRGVTRH  MEME-9   YRGVTRH       AA      + 22.15030     27  5.4e-73  PPM
## 10 LTKZEFV MEME-10   LTKEEFV       AA      + 20.36477     30  1.3e-69  PPM
##    pseudocount width
## 1            1     7
## 2            1     7
## 3            1     7
## 4            1     7
## 5            1     7
## 6            1     7
## 7            1     7
## 8            1     7
## 9            1     7
## 10           1     7
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    sites_hits
## 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               AT5G67180.1, AT5G65510.1, AT5G60120.2, AT5G60120.1, AT5G57390.1, AT5G17430.1, AT5G10510.3, AT5G10510.2, AT5G10510.1, AT4G37750.1, AT4G36920.2, AT4G36920.1, AT3G54990.2, AT3G54990.1, AT3G20840.1, AT2G41710.3, AT2G41710.2, AT2G41710.1, AT2G39250.1, AT2G28550.3, AT2G28550.2, AT2G28550.1, AT1G79700.2, AT1G79700.1, AT1G72570.1, AT1G51190.1, AT1G16060.1, AT3G54320.3, AT3G54320.1, AT1G16060.2, 108, 243, 172, 172, 215, 222, 280, 280, 265, 295, 143, 143, 134, 134, 193, 117, 82, 82, 120, 165, 165, 165, 64, 64, 235, 202, 70, 77, 77, 102, 7.32e-10, 7.32e-10, 7.32e-10, 7.32e-10, 7.32e-10, 7.32e-10, 7.32e-10, 7.32e-10, 7.32e-10, 7.32e-10, 7.32e-10, 7.32e-10, 7.32e-10, 7.32e-10, 7.32e-10, 7.32e-10, 7.32e-10, 7.32e-10, 7.32e-10, 7.32e-10, 7.32e-10, 7.32e-10, 7.32e-10, 7.32e-10, 7.32e-10, 7.32e-10, 7.32e-10, 2.07e-09, 2.07e-09, 3.33e-07, RWESHIW, RYEAHLW, RWESHIW, RWESHIW, RYEAHLW, RYEAHLW, RYEAHLW, RYEAHLW, RYEAHLW, RYEAHLW, RWESHIW, RWESHIW, RWESHIW, RWESHIW, RYEAHLW, RYEAHLW, RYEAHLW, RYEAHLW, RWESHIW, RWESHIW, RWESHIW, RWESHIW, RYEAHLW, RYEAHLW, RYEAHLW, RYEAHLW, RYEAHLW, RFEAHLW, RFEAHLW, RWEARIG
## 2  AT5G65510.1, AT5G57390.1, AT5G17430.1, AT5G10510.3, AT5G10510.2, AT5G10510.1, AT4G37750.1, AT3G54320.3, AT3G54320.1, AT3G20840.1, AT2G41710.2, AT2G41710.1, AT1G79700.2, AT1G79700.1, AT1G72570.1, AT1G51190.1, AT5G67180.1, AT4G36920.2, AT4G36920.1, AT2G28550.3, AT2G28550.2, AT2G28550.1, AT5G60120.2, AT5G60120.1, AT3G54990.2, AT3G54990.1, AT2G39250.1, AT2G41710.3, AT1G16060.1, AT1G16060.2, AT5G65510.1, AT5G57390.1, AT5G17430.1, AT5G10510.3, AT5G10510.2, AT5G10510.1, AT4G37750.1, AT3G20840.1, AT1G72570.1, AT1G51190.1, AT3G54320.3, AT3G54320.1, AT1G79700.2, AT1G79700.1, AT5G67180.1, AT4G36920.2, AT4G36920.1, AT2G28550.3, AT2G28550.2, AT2G28550.1, AT1G16060.1, AT2G41710.3, AT2G41710.2, AT2G41710.1, AT5G60120.2, AT5G60120.1, AT3G54990.1, 334, 306, 211, 391, 368, 356, 386, 66, 66, 284, 71, 71, 53, 53, 326, 293, 189, 224, 224, 246, 246, 246, 161, 161, 123, 123, 109, 71, 59, 91, 232, 204, 313, 269, 269, 254, 284, 182, 224, 191, 168, 168, 155, 155, 97, 132, 132, 154, 154, 154, 161, 202, 172, 167, 253, 253, 292, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 2.4e-09, 2.4e-09, 2.4e-09, 2.4e-09, 2.4e-09, 2.4e-09, 4.85e-09, 4.85e-09, 4.85e-09, 4.85e-09, 4.85e-09, 7.83e-09, 7.83e-09, 3.33e-08, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 2.65e-09, 2.65e-09, 2.65e-09, 2.65e-09, 6.56e-09, 6.56e-09, 6.56e-09, 6.56e-09, 6.56e-09, 6.56e-09, 7.5e-09, 7.75e-07, 7.75e-07, 7.75e-07, 1.95e-06, 1.95e-06, 1.31e-05, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTLH, YRGVTLH, YRGVTLH, YRGVTLH, YRGVTLH, YRGVTLH, YRGVTFY, YRGVTFY, YRGVTFY, YRGVTFY, YRGVTFY, YRGVTRF, HRGVTRH, YRGVAKH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVARH, YRGVARH, YRGVARH, YRGVARH, YRGVTFY, YRGVTFY, YRGVTFY, YRGVTFY, YRGVTFY, YRGVTFY, YRGVAKH, SRGIAKY, SRGIAKY, SRGIAKY, YQGVALQ, YQGVALQ, YKGINRS
## 3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              AT5G67180.1, AT5G60120.2, AT5G60120.1, AT4G36920.2, AT4G36920.1, AT3G54990.2, AT3G54990.1, AT3G54320.3, AT3G54320.1, AT2G41710.3, AT2G41710.2, AT2G41710.1, AT2G39250.1, AT2G28550.3, AT2G28550.2, AT2G28550.1, AT5G65510.1, AT5G57390.1, AT5G17430.1, AT5G10510.1, AT4G37750.1, AT3G20840.1, AT1G79700.2, AT1G79700.1, AT1G72570.1, AT1G51190.1, AT1G16060.1, AT1G16060.2, AT5G10510.3, AT5G10510.2, 117, 181, 181, 152, 152, 143, 143, 96, 96, 136, 101, 101, 129, 174, 174, 174, 262, 234, 241, 284, 314, 212, 83, 83, 254, 221, 89, 19, 299, 390, 1.48e-09, 1.48e-09, 1.48e-09, 1.48e-09, 1.48e-09, 1.48e-09, 1.48e-09, 1.48e-09, 1.48e-09, 1.48e-09, 1.48e-09, 1.48e-09, 1.48e-09, 1.48e-09, 1.48e-09, 1.48e-09, 3.34e-09, 3.34e-09, 3.34e-09, 3.34e-09, 3.34e-09, 3.34e-09, 3.34e-09, 3.34e-09, 3.34e-09, 3.34e-09, 3.34e-09, 9.19e-07, 3.52e-06, 5.63e-06, GKQVYLG, GKQVYLG, GKQVYLG, GKQVYLG, GKQVYLG, GKQVYLG, GKQVYLG, GKQVYLG, GKQVYLG, GKQVYLG, GKQVYLG, GKQVYLG, GKQVYLG, GKQVYLG, GKQVYLG, GKQVYLG, GRQVYLG, GRQVYLG, GRQVYLG, GRQVYLG, GRQVYLG, GRQVYLG, GRQVYLG, GRQVYLG, GRQVYLG, GRQVYLG, GRQVYLG, SRAVYLG, GRQVFYS, NKDLYLG
## 4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        AT5G65510.1, AT5G57390.1, AT5G17430.1, AT5G10510.3, AT5G10510.2, AT5G10510.1, AT3G20840.1, AT1G79700.2, AT1G79700.1, AT1G72570.1, AT1G51190.1, AT1G16060.2, AT1G16060.1, AT5G67180.1, AT4G36920.2, AT4G36920.1, AT2G28550.3, AT2G28550.2, AT2G28550.1, AT3G54320.3, AT3G54320.1, AT3G54990.2, AT3G54990.1, AT2G39250.1, AT4G37750.1, AT5G60120.2, AT5G60120.1, AT2G41710.3, AT2G41710.2, AT2G41710.1, 373, 345, 352, 430, 407, 395, 323, 194, 184, 365, 332, 130, 200, 227, 262, 262, 284, 269, 269, 207, 207, 160, 160, 146, 425, 198, 198, 153, 118, 118, 1.12e-09, 1.12e-09, 1.12e-09, 1.12e-09, 1.12e-09, 1.12e-09, 1.12e-09, 1.12e-09, 1.12e-09, 1.12e-09, 1.12e-09, 1.12e-09, 1.12e-09, 2.68e-09, 2.68e-09, 2.68e-09, 2.68e-09, 2.68e-09, 2.68e-09, 3.31e-09, 3.31e-09, 5.28e-09, 5.28e-09, 5.28e-09, 1.03e-08, 2.08e-08, 2.08e-08, 3.64e-08, 3.64e-08, 3.64e-08, AYDIAAI, AYDIAAI, AYDIAAI, AYDIAAI, AYDIAAI, AYDIAAI, AYDIAAI, AYDIAAI, AYDIAAI, AYDIAAI, AYDIAAI, AYDIAAI, AYDIAAI, AYDKAAI, AYDKAAI, AYDKAAI, AYDKAAI, AYDKAAI, AYDKAAI, AYDMAAI, AYDMAAI, AYDRAAI, AYDRAAI, AYDRAAI, AYDVAAI, AYDRAAV, AYDRAAV, AYDLAAL, AYDLAAL, AYDLAAL
## 5                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         AT5G65510.1, AT5G57390.1, AT5G17430.1, AT5G10510.3, AT5G10510.2, AT5G10510.1, AT4G37750.1, AT3G20840.1, AT2G41710.3, AT2G41710.1, AT1G79700.2, AT1G79700.1, AT1G51190.1, AT1G16060.2, AT1G16060.1, AT5G60120.2, AT5G60120.1, AT3G54320.3, AT3G54320.1, AT5G67180.1, AT4G36920.2, AT4G36920.1, AT2G28550.3, AT2G28550.2, AT2G28550.1, AT1G72570.1, AT2G41710.2, AT3G54990.2, AT3G54990.1, AT2G39250.1, 321, 293, 300, 378, 355, 343, 373, 271, 195, 160, 142, 142, 280, 78, 148, 240, 240, 155, 155, 176, 211, 211, 233, 233, 233, 313, 165, 202, 202, 301, 6.57e-09, 6.57e-09, 6.57e-09, 6.57e-09, 6.57e-09, 6.57e-09, 6.57e-09, 6.57e-09, 6.57e-09, 6.57e-09, 6.57e-09, 6.57e-09, 6.57e-09, 6.57e-09, 6.57e-09, 1.29e-08, 1.29e-08, 1.29e-08, 1.29e-08, 1.95e-08, 1.95e-08, 1.95e-08, 1.95e-08, 1.95e-08, 1.95e-08, 5.08e-08, 2.07e-07, 2.43e-06, 2.43e-06, 2.29e-05, RRKSSGF, RRKSSGF, RRKSSGF, RRKSSGF, RRKSSGF, RRKSSGF, RRKSSGF, RRKSSGF, RRKSSGF, RRKSSGF, RRKSSGF, RRKSSGF, RRKSSGF, RRKSSGF, RRKSSGF, RRQSSGF, RRQSSGF, RRQSSGF, RRQSSGF, RRQSTGF, RRQSTGF, RRQSTGF, RRQSTGF, RRQSTGF, RRQSTGF, RRNSSGF, GRKSSGF, RRESASF, RRESASF, VVASSGF
## 6                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   AT5G65510.1, AT5G57390.1, AT5G17430.1, AT4G37750.1, AT3G54320.3, AT3G54320.1, AT3G20840.1, AT1G79700.2, AT1G79700.1, AT1G72570.1, AT1G51190.1, AT1G16060.2, AT1G16060.1, AT5G10510.3, AT5G10510.2, AT5G10510.1, AT5G67180.1, AT4G36920.2, AT4G36920.1, AT2G28550.3, AT2G28550.2, AT2G28550.1, AT2G41710.3, AT2G41710.2, AT2G41710.1, AT3G54990.1, AT5G60120.2, AT5G60120.1, 283, 255, 262, 335, 117, 117, 233, 104, 104, 275, 242, 40, 110, 340, 317, 305, 138, 173, 173, 195, 195, 195, 259, 229, 224, 243, 280, 280, 1.26e-09, 1.26e-09, 1.26e-09, 1.26e-09, 1.26e-09, 1.26e-09, 1.26e-09, 1.26e-09, 1.26e-09, 1.26e-09, 1.26e-09, 1.26e-09, 1.26e-09, 9.58e-09, 9.58e-09, 9.58e-09, 2.59e-08, 2.59e-08, 2.59e-08, 2.59e-08, 2.59e-08, 2.59e-08, 2.77e-08, 2.77e-08, 2.77e-08, 7.87e-07, 9.53e-07, 9.53e-07, AALKYWG, AALKYWG, AALKYWG, AALKYWG, AALKYWG, AALKYWG, AALKYWG, AALKYWG, AALKYWG, AALKYWG, AALKYWG, AALKYWG, AALKYWG, AALKYWN, AALKYWN, AALKYWN, AAIKFRG, AAIKFRG, AAIKFRG, AAIKFRG, AAIKFRG, AAIKFRG, GYIKWWG, GYIKWWG, GYIKWWG, AAIKYNE, AAVQWKG, AAVQWKG
## 7                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            AT5G65510.1, AT5G57390.1, AT5G17430.1, AT5G10510.3, AT5G10510.2, AT5G10510.1, AT4G37750.1, AT3G20840.1, AT1G72570.1, AT1G51190.1, AT3G54320.3, AT3G54320.1, AT1G79700.2, AT1G79700.1, AT1G16060.1, AT4G36920.2, AT4G36920.1, AT2G28550.3, AT2G28550.2, AT2G28550.1, AT5G67180.1, AT5G60120.2, AT5G60120.1, AT2G41710.3, AT2G41710.2, AT2G41710.1, 344, 316, 323, 401, 378, 366, 396, 294, 336, 303, 178, 178, 165, 165, 171, 233, 233, 255, 255, 255, 198, 262, 262, 213, 183, 178, 4.76e-10, 4.76e-10, 4.76e-10, 4.76e-10, 4.76e-10, 4.76e-10, 4.76e-10, 4.76e-10, 4.76e-10, 4.76e-10, 1.12e-09, 1.12e-09, 1.12e-09, 1.12e-09, 1.12e-09, 1.75e-09, 1.75e-09, 1.75e-09, 1.75e-09, 1.75e-09, 1.81e-07, 7.57e-07, 7.57e-07, 2.11e-06, 2.11e-06, 2.11e-06, GRWQARI, GRWQARI, GRWQARI, GRWQARI, GRWQARI, GRWQARI, GRWQARI, GRWQARI, GRWQARI, GRWQARI, GRWEARI, GRWEARI, GRWEARI, GRWEARI, GRWEARI, GRWEARM, GRWEARM, GRWEARM, GRWEARM, GRWEARM, GRWESRL, GGWGAQM, GGWGAQM, SRWDASA, SRWDASA, SRWDASA
## 8                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  AT4G37750.1, AT1G16060.2, AT1G16060.1, AT1G72570.1, AT5G10510.3, AT5G10510.2, AT5G10510.1, AT3G54320.3, AT3G54320.1, AT3G20840.1, AT1G51190.1, AT5G57390.1, AT2G41710.3, AT2G41710.2, AT2G41710.1, AT5G17430.1, AT1G79700.2, AT1G79700.1, AT5G67180.1, AT5G65510.1, AT4G36920.2, AT4G36920.1, AT3G54990.2, AT3G54990.1, AT5G60120.2, AT5G60120.1, AT2G39250.1, AT2G28550.3, AT2G28550.2, AT2G28550.1, 441, 146, 216, 381, 352, 329, 317, 223, 223, 339, 348, 267, 169, 134, 134, 368, 210, 200, 150, 389, 185, 185, 176, 176, 214, 214, 162, 300, 285, 285, 3.24e-09, 8.18e-09, 8.18e-09, 9.4e-09, 2.2e-08, 2.2e-08, 2.2e-08, 2.2e-08, 2.2e-08, 2.89e-08, 2.89e-08, 3.59e-08, 3.59e-08, 3.59e-08, 3.59e-08, 3.9e-08, 5.16e-08, 5.16e-08, 6.98e-08, 7.6e-08, 7.6e-08, 7.6e-08, 8.46e-08, 8.46e-08, 1.11e-07, 1.11e-07, 1.86e-07, 2.26e-07, 2.26e-07, 2.26e-07, NFDITRY, NFDISRY, NFDISRY, NFDINRY, NFPITNY, NFPITNY, NFPITNY, NFDISNY, NFDISNY, NFEINRY, NFEINRY, NFPISNY, NFPVTDY, NFPVTDY, NFPVTDY, NFDMNRY, NFDVSRY, NFDVSRY, NFDIEDY, NFEMNRY, NFNIDDY, NFNIDDY, NFVVDDY, NFVVDDY, NFVIGDY, NFVIGDY, NFIVDDY, NFEMSSY, NFEMSSY, NFEMSSY
## 9  AT5G65510.1, AT5G57390.1, AT5G17430.1, AT5G10510.3, AT5G10510.2, AT5G10510.1, AT4G37750.1, AT3G54320.3, AT3G54320.1, AT3G20840.1, AT2G41710.2, AT2G41710.1, AT1G79700.2, AT1G79700.1, AT1G72570.1, AT1G51190.1, AT5G67180.1, AT4G36920.2, AT4G36920.1, AT2G28550.3, AT2G28550.2, AT2G28550.1, AT5G60120.2, AT5G60120.1, AT3G54990.2, AT3G54990.1, AT2G39250.1, AT2G41710.3, AT1G16060.1, AT1G16060.2, AT5G65510.1, AT5G57390.1, AT5G17430.1, AT5G10510.3, AT5G10510.2, AT5G10510.1, AT4G37750.1, AT3G20840.1, AT1G72570.1, AT1G51190.1, AT3G54320.3, AT3G54320.1, AT1G79700.2, AT1G79700.1, AT5G67180.1, AT4G36920.2, AT4G36920.1, AT2G28550.3, AT2G28550.2, AT2G28550.1, AT1G16060.1, AT2G41710.3, AT2G41710.2, AT2G41710.1, AT5G60120.2, AT5G60120.1, AT3G54990.1, 334, 306, 211, 391, 368, 356, 386, 66, 66, 284, 71, 71, 53, 53, 326, 293, 189, 224, 224, 246, 246, 246, 161, 161, 123, 123, 109, 71, 59, 91, 232, 204, 313, 269, 269, 254, 284, 182, 224, 191, 168, 168, 155, 155, 97, 132, 132, 154, 154, 154, 161, 202, 172, 167, 253, 253, 292, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 2.4e-09, 2.4e-09, 2.4e-09, 2.4e-09, 2.4e-09, 2.4e-09, 4.85e-09, 4.85e-09, 4.85e-09, 4.85e-09, 4.85e-09, 7.83e-09, 7.83e-09, 3.33e-08, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 8.81e-10, 2.65e-09, 2.65e-09, 2.65e-09, 2.65e-09, 6.56e-09, 6.56e-09, 6.56e-09, 6.56e-09, 6.56e-09, 6.56e-09, 7.5e-09, 7.75e-07, 7.75e-07, 7.75e-07, 1.95e-06, 1.95e-06, 1.31e-05, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTLH, YRGVTLH, YRGVTLH, YRGVTLH, YRGVTLH, YRGVTLH, YRGVTFY, YRGVTFY, YRGVTFY, YRGVTFY, YRGVTFY, YRGVTRF, HRGVTRH, YRGVAKH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVTRH, YRGVARH, YRGVARH, YRGVARH, YRGVARH, YRGVTFY, YRGVTFY, YRGVTFY, YRGVTFY, YRGVTFY, YRGVTFY, YRGVAKH, SRGIAKY, SRGIAKY, SRGIAKY, YQGVALQ, YQGVALQ, YKGINRS
## 10                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          AT5G65510.1, AT5G10510.3, AT5G10510.2, AT5G10510.1, AT4G36920.2, AT4G36920.1, AT5G57390.1, AT3G20840.1, AT1G51190.1, AT5G17430.1, AT4G37750.1, AT2G39250.1, AT2G28550.3, AT2G28550.2, AT2G28550.1, AT5G67180.1, AT1G72570.1, AT1G79700.2, AT1G79700.1, AT1G16060.2, AT1G16060.1, AT5G60120.2, AT5G60120.1, AT3G54320.3, AT3G54320.1, AT2G41710.3, AT2G41710.2, AT2G41710.1, AT3G54990.2, AT3G54990.1, 311, 368, 345, 333, 201, 201, 283, 261, 270, 290, 363, 178, 223, 223, 223, 166, 303, 132, 132, 68, 138, 230, 230, 145, 145, 185, 150, 150, 192, 192, 3.3e-09, 3.3e-09, 3.3e-09, 3.3e-09, 3.3e-09, 3.3e-09, 1.04e-08, 1.04e-08, 1.04e-08, 1.8e-08, 1.8e-08, 1.8e-08, 1.8e-08, 1.8e-08, 1.8e-08, 6.34e-08, 1.19e-07, 1.49e-07, 1.49e-07, 1.49e-07, 1.49e-07, 2e-07, 2e-07, 2.47e-07, 2.47e-07, 3.08e-07, 3.08e-07, 3.08e-07, 3.23e-07, 3.23e-07, MTKQEFI, MTKQEFI, MTKQEFI, MTKQEFI, LTKEEFV, LTKEEFV, MTRQEFV, MTRQEFV, MTRQEFV, MTRQEYV, MTRQEYV, LSKEEFV, LSKEEFV, LSKEEFV, LSKEEFV, LTKEEFM, MNRQEFV, QSKEEYI, QSKEEYI, QSKEEYI, QSKEEYI, LSKEEVV, LSKEEVV, VTKEEYL, VTKEEYL, LSREEYL, LSREEYL, LSREEYL, LNKVEFV, LNKVEFV
## 
## [Note: incomplete universalmotif_df object.]
meme.res[["combined_sites"]]
##       sequence combined_pvalue
## 1  AT1G16060.1        1.57e-45
## 2  AT1G16060.2        3.90e-41
## 3  AT1G51190.1        2.91e-46
## 4  AT1G72570.1        4.45e-46
## 5  AT1G79700.1        4.48e-47
## 6  AT1G79700.2        6.11e-47
## 7  AT2G28550.1        1.25e-42
## 8  AT2G28550.2        2.65e-43
## 9  AT2G28550.3        1.70e-42
## 10 AT2G39250.1        4.58e-37
## 11 AT2G41710.1        1.99e-41
## 12 AT2G41710.2        5.46e-40
## 13 AT2G41710.3        1.67e-38
## 14 AT3G20840.1        3.21e-46
## 15 AT3G54320.1        6.78e-45
## 16 AT3G54320.3        5.70e-45
## 17 AT3G54990.1        4.28e-38
## 18 AT3G54990.2        1.78e-39
## 19 AT4G36920.1        6.50e-44
## 20 AT4G36920.2        6.50e-44
## 21 AT4G37750.1        5.20e-46
## 22 AT5G10510.1        6.73e-46
## 23 AT5G10510.2        8.32e-43
## 24 AT5G10510.3        7.74e-43
## 25 AT5G17430.1        1.08e-45
## 26 AT5G57390.1        9.77e-47
## 27 AT5G60120.1        8.26e-38
## 28 AT5G60120.2        1.25e-37
## 29 AT5G65510.1        9.17e-47
## 30 AT5G67180.1        1.01e-41
##                                                                                                     diagram
## 1    58_[2(7.83e-09)]_4_[1(7.32e-10)]_12_[3(3.34e-09)]_14_[6(1.26e-09)]_5_[8(1.31e-05)]_9_[10(1.49e-07)]_3_
## 2     18_[3(9.19e-07)]_14_[6(1.26e-09)]_5_[8(1.31e-05)]_9_[10(1.49e-07)]_3_[5(6.57e-09)]_6_[9(7.50e-09)]_3_
## 3   190_[2(8.81e-10)]_4_[1(7.32e-10)]_12_[3(3.34e-09)]_14_[6(1.26e-09)]_5_[8(2.20e-08)]_9_[10(1.04e-08)]_3_
## 4   223_[2(8.81e-10)]_4_[1(7.32e-10)]_12_[3(3.34e-09)]_14_[6(1.26e-09)]_5_[8(9.00e-07)]_9_[10(1.19e-07)]_3_
## 5    52_[2(8.81e-10)]_4_[1(7.32e-10)]_12_[3(3.34e-09)]_14_[6(1.26e-09)]_5_[8(2.72e-05)]_9_[10(1.49e-07)]_3_
## 6    52_[2(8.81e-10)]_4_[1(7.32e-10)]_12_[3(3.34e-09)]_14_[6(1.26e-09)]_5_[8(2.72e-05)]_9_[10(1.49e-07)]_3_
## 7    153_[2(4.85e-09)]_4_[1(7.32e-10)]_2_[3(1.48e-09)]_10_[4(5.28e-09)]_9_[8(1.86e-05)]_9_[10(1.80e-08)]_3_
## 8    153_[2(4.85e-09)]_4_[1(7.32e-10)]_2_[3(1.48e-09)]_10_[4(5.28e-09)]_9_[8(1.86e-05)]_9_[10(1.80e-08)]_3_
## 9    153_[2(4.85e-09)]_4_[1(7.32e-10)]_2_[3(1.48e-09)]_10_[4(5.28e-09)]_9_[8(1.86e-05)]_9_[10(1.80e-08)]_3_
## 10 108_[2(4.85e-09)]_4_[1(7.32e-10)]_2_[3(1.48e-09)]_10_[4(5.28e-09)]_9_[8(1.86e-07)]_9_[10(1.80e-08)]_116_
## 11   70_[2(8.81e-10)]_4_[1(7.32e-10)]_12_[3(1.48e-09)]_14_[6(1.26e-09)]_5_[8(3.59e-08)]_9_[10(3.08e-07)]_3_
## 12   70_[2(8.81e-10)]_4_[1(7.32e-10)]_12_[3(1.48e-09)]_14_[6(1.26e-09)]_5_[8(3.59e-08)]_9_[10(3.08e-07)]_8_
## 13  70_[2(7.83e-09)]_39_[1(7.32e-10)]_12_[3(1.48e-09)]_14_[6(1.26e-09)]_5_[8(3.59e-08)]_9_[10(3.08e-07)]_3_
## 14  181_[2(8.81e-10)]_4_[1(7.32e-10)]_12_[3(3.34e-09)]_14_[6(1.26e-09)]_5_[8(2.20e-08)]_9_[10(1.04e-08)]_3_
## 15   65_[2(8.81e-10)]_4_[1(2.07e-09)]_12_[3(1.48e-09)]_14_[6(1.26e-09)]_5_[8(4.35e-05)]_9_[10(2.47e-07)]_3_
## 16   65_[2(8.81e-10)]_4_[1(2.07e-09)]_12_[3(1.48e-09)]_14_[6(1.26e-09)]_5_[8(4.35e-05)]_9_[10(2.47e-07)]_3_
## 17   122_[2(4.85e-09)]_4_[1(7.32e-10)]_2_[3(1.48e-09)]_10_[4(5.28e-09)]_9_[8(8.46e-08)]_9_[10(3.23e-07)]_3_
## 18   122_[2(4.85e-09)]_4_[1(7.32e-10)]_2_[3(1.48e-09)]_10_[4(5.28e-09)]_9_[8(8.46e-08)]_9_[10(3.23e-07)]_3_
## 19   131_[2(4.85e-09)]_4_[1(7.32e-10)]_2_[3(1.48e-09)]_10_[4(5.28e-09)]_9_[8(7.60e-08)]_9_[10(3.30e-09)]_3_
## 20   131_[2(4.85e-09)]_4_[1(7.32e-10)]_2_[3(1.48e-09)]_10_[4(5.28e-09)]_9_[8(7.60e-08)]_9_[10(3.30e-09)]_3_
## 21  283_[2(8.81e-10)]_4_[1(7.32e-10)]_12_[3(3.34e-09)]_14_[6(1.26e-09)]_5_[8(6.65e-05)]_9_[10(1.80e-08)]_3_
## 22  253_[2(8.81e-10)]_4_[1(7.32e-10)]_12_[3(3.34e-09)]_14_[6(9.58e-09)]_5_[8(2.20e-08)]_9_[10(3.30e-09)]_3_
## 23   268_[2(8.81e-10)]_4_[1(7.32e-10)]_30_[6(9.58e-09)]_5_[8(2.20e-08)]_9_[10(3.30e-09)]_3_[5(6.57e-09)]_6_
## 24  268_[2(8.81e-10)]_4_[1(7.32e-10)]_12_[3(3.52e-06)]_34_[6(9.58e-09)]_5_[8(2.20e-08)]_9_[10(3.30e-09)]_3_
## 25  210_[2(8.81e-10)]_4_[1(7.32e-10)]_12_[3(3.34e-09)]_14_[6(1.26e-09)]_5_[8(8.68e-06)]_9_[10(1.80e-08)]_3_
## 26  203_[2(8.81e-10)]_4_[1(7.32e-10)]_12_[3(3.34e-09)]_14_[6(1.26e-09)]_5_[8(3.59e-08)]_9_[10(1.04e-08)]_3_
## 27   160_[2(4.85e-09)]_4_[1(7.32e-10)]_2_[3(1.48e-09)]_10_[4(2.08e-08)]_9_[8(1.11e-07)]_9_[10(2.00e-07)]_3_
## 28   160_[2(4.85e-09)]_4_[1(7.32e-10)]_2_[3(1.48e-09)]_10_[4(2.08e-08)]_9_[8(1.11e-07)]_9_[10(2.00e-07)]_3_
## 29  231_[2(8.81e-10)]_4_[1(7.32e-10)]_12_[3(3.34e-09)]_14_[6(1.26e-09)]_5_[8(2.26e-07)]_9_[10(3.30e-09)]_3_
## 30    96_[2(4.85e-09)]_4_[1(7.32e-10)]_2_[3(1.48e-09)]_10_[4(5.28e-09)]_9_[8(6.98e-08)]_9_[10(6.34e-08)]_3_
uni.res = universalmotif::read_meme("meme.txt")
## Could not find strand info, assuming +.
uni.res[[1]]
## 
##        Motif name:   RYEAHJW
##    Alternate name:   MEME-1
##          Alphabet:   AA
##              Type:   PPM
##          Total IC:   24.53
##       Pseudocount:   1
##         Consensus:   RYEAHJW
##      Target sites:   30
##           E-value:   2.6e-138
##        Extra info:   [eval.string] 2.6e-138 
## 
##   R    Y E    A    H   J    W
## A 0 0.00 0 0.63 0.00 0.0 0.00
## C 0 0.00 0 0.00 0.00 0.0 0.00
## D 0 0.00 0 0.00 0.00 0.0 0.00
## E 0 0.00 1 0.00 0.00 0.0 0.00
## F 0 0.07 0 0.00 0.00 0.0 0.00
## G 0 0.00 0 0.00 0.00 0.0 0.03
## H 0 0.00 0 0.00 0.97 0.0 0.00
## I 0 0.00 0 0.00 0.00 0.4 0.00
## K 0 0.00 0 0.00 0.00 0.0 0.00
## L 0 0.00 0 0.00 0.00 0.6 0.00
## M 0 0.00 0 0.00 0.00 0.0 0.00
## N 0 0.00 0 0.00 0.00 0.0 0.00
## P 0 0.00 0 0.00 0.00 0.0 0.00
## Q 0 0.00 0 0.00 0.00 0.0 0.00
## R 1 0.00 0 0.00 0.03 0.0 0.00
## S 0 0.00 0 0.37 0.00 0.0 0.00
## T 0 0.00 0 0.00 0.00 0.0 0.00
## V 0 0.00 0 0.00 0.00 0.0 0.00
## W 0 0.40 0 0.00 0.00 0.0 0.97
## Y 0 0.53 0 0.00 0.00 0.0 0.00

And the above functions can not handle .xml file.

memes::importMeme("meme.xml")
Error in convert_motifs(motifs) : Input is an empty list
universalmotif::read_meme("meme.xml")
## Warning: Could not find MEME version. Note that this is considered a requirement
##   by MEME programs.
## Could not find alphabet, assuming DNA.
## Could not find strand info, assuming +.
## Could not find background, assuming uniform frequencies.
## list()

Session Info

sessionInfo()
## R version 4.1.3 (2022-03-10)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 10 x64 (build 22000)
## 
## Matrix products: default
## 
## locale:
## [1] LC_COLLATE=C                              
## [2] LC_CTYPE=Chinese (Simplified)_China.936   
## [3] LC_MONETARY=Chinese (Simplified)_China.936
## [4] LC_NUMERIC=C                              
## [5] LC_TIME=Chinese (Simplified)_China.936    
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
##  [1] memes_1.2.5     ggseqlogo_0.1   forcats_0.5.1   stringr_1.4.0  
##  [5] dplyr_1.0.9     purrr_0.3.4     readr_2.1.2     tidyr_1.2.0    
##  [9] tibble_3.1.8    ggplot2_3.3.6   tidyverse_1.3.2 ggmotif_0.2.1  
## 
## loaded via a namespace (and not attached):
##  [1] nlme_3.1-158           matrixStats_0.62.0     bitops_1.0-7          
##  [4] fs_1.5.2               ggtree_3.2.1           lubridate_1.8.0       
##  [7] httr_1.4.3             GenomeInfoDb_1.30.1    ggsci_2.9             
## [10] tools_4.1.3            backports_1.4.1        bslib_0.4.0           
## [13] utf8_1.2.2             R6_2.5.1               BiocGenerics_0.40.0   
## [16] DBI_1.1.3              lazyeval_0.2.2         colorspace_2.0-3      
## [19] withr_2.5.0            tidyselect_1.1.2       compiler_4.1.3        
## [22] textshaping_0.3.6      cli_3.3.0              rvest_1.0.2           
## [25] xml2_1.3.3             labeling_0.4.2         sass_0.4.2            
## [28] scales_1.2.0           systemfonts_1.0.4      digest_0.6.29         
## [31] yulab.utils_0.0.5      rmarkdown_2.14         XVector_0.34.0        
## [34] pkgconfig_2.0.3        htmltools_0.5.3        dbplyr_2.2.1          
## [37] fastmap_1.1.0          highr_0.9              rlang_1.0.4           
## [40] readxl_1.4.0           rstudioapi_0.13        gridGraphics_0.5-1    
## [43] jquerylib_0.1.4        generics_0.1.3         farver_2.1.1          
## [46] jsonlite_1.8.0         googlesheets4_1.0.0    RCurl_1.98-1.7        
## [49] magrittr_2.0.3         GenomeInfoDbData_1.2.7 ggplotify_0.1.0       
## [52] patchwork_1.1.1        S4Vectors_0.32.4       Rcpp_1.0.9            
## [55] munsell_0.5.0          fansi_1.0.3            ape_5.6-2             
## [58] lifecycle_1.0.1        stringi_1.7.6          yaml_2.3.5            
## [61] MASS_7.3-58            zlibbioc_1.40.0        grid_4.1.3            
## [64] parallel_4.1.3         crayon_1.5.1           lattice_0.20-45       
## [67] Biostrings_2.62.0      cowplot_1.1.1          haven_2.5.0           
## [70] hms_1.1.1              knitr_1.39             pillar_1.8.0          
## [73] GenomicRanges_1.46.1   stats4_4.1.3           reprex_2.0.1          
## [76] XML_3.99-0.10          glue_1.6.2             evaluate_0.15         
## [79] universalmotif_1.12.4  ggfun_0.0.6            data.table_1.14.2     
## [82] modelr_0.1.8           vctrs_0.4.1            treeio_1.18.1         
## [85] tzdb_0.3.0             cellranger_1.1.0       gtable_0.3.0          
## [88] assertthat_0.2.1       cachem_1.0.6           xfun_0.31             
## [91] broom_1.0.0            tidytree_0.3.9         ragg_1.2.2            
## [94] googledrive_2.0.0      gargle_1.2.0           aplot_0.1.6           
## [97] IRanges_2.28.0         ellipsis_0.3.2

Contributing

We welcome any contributions!