View source: R/filter_motifs.R
filter_motifs | R Documentation |
Filter motifs based on the contents of available universalmotif
slots. If the input motifs are not of universalmotif, then
they will be converted for the duration of the filter_motifs()
operation.
filter_motifs(motifs, name, altname, family, organism, width, alphabet, type,
icscore, nsites, strand, pval, qval, eval, extrainfo)
motifs |
|
name |
|
altname |
|
family |
|
organism |
|
width |
|
alphabet |
|
type |
|
icscore |
|
nsites |
|
strand |
|
pval |
|
qval |
|
eval |
|
extrainfo |
|
list
Motifs. An attempt will be made to preserve the original
class, see convert_motifs()
for limitations.
Benjamin Jean-Marie Tremblay, benjamin.tremblay@uwaterloo.ca
## By minimum IC:
jaspar <- read_jaspar(system.file("extdata", "jaspar.txt",
package = "universalmotif"))
jaspar.ic3 <- filter_motifs(jaspar, icscore = 3)
## Starting from version 1.10.0 of the universalmotif package, one
## could instead make use of the universalmotif_df structure:
jaspar.ic3 <- jaspar |> to_df() |> subset(icscore > 3) |> to_list()
## By organism:
## Not run:
library(MotifDb)
motifs <- convert_motifs(MotifDb)
motifs <- filter_motifs(motifs, organism = c("Athaliana", "Mmusculus"),
extrainfo = c("dataSource" = "cisbp_1.02"))
## Or:
motifs <- convert_motifs(MotifDb) |> to_df() |>
subset(organism %in% c("Athaliana", "Mmusculus") &
dataSource == "cisbp_1.02") |> to_list()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.