readMotifs: Read in motifs in JASPAR or TRANSFAC format

Description Usage Arguments Value Examples

View source: R/readData.R

Description

The format is autodetected based on file format. If the autodetection fail then the file cannot be read.

Usage

1
readMotifs(file, remove.acc = FALSE)

Arguments

file

the filename

remove.acc

if to remove accession numbers. If TRUE, the AC entry in TRANSFAC files is ignored, and the accession is stripped from JASPAR, e.g. motif with name "MA0211.1 bap" would become just "bap". If FALSE, botht he AC and ID are used to generate the TRANSFAC name and the original motif names are preserved in JASPAR files.

Value

a list of 4xL matrices representing motifs (four nucleotides as rows)

Examples

1
2
3
4
5
6
7
# read in example TRANSFAC motifs without accession codes (just IDs)
readMotifs(system.file(package = "PWMEnrich", dir = "extdata", file = "example.transfac"), 
  remove.acc = TRUE)

# read in the JASPAR insects motifs provided as example
readMotifs(system.file(package = "PWMEnrich", dir = "extdata", file = "jaspar-insecta.jaspar"), 
  remove.acc = TRUE)

PWMEnrich documentation built on Nov. 8, 2020, 7:45 p.m.