readJASPARMatrix: Read JASPAR format matrix

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/JASPAR.R

Description

Read a JASPAR format matrix file with ‘individual’ matrix or ‘all’ matrices in one file.

Usage

1
  readJASPARMatrix(fn, matrixClass=c("PFM", "PWM", "PWMProb"))

Arguments

fn

character(1): The filename of JASPAR format matrix file.

matrixClass

character(1): the matrices in the files are ‘PFM’, ‘PWM’ or ‘PFM’ in probability.

Details

An example of ‘individual’ format matrix file is available at http://jaspar.genereg.net/html/DOWNLOAD/JASPAR_CORE/pfm/individual/MA0001.1.pfm

An exmaple of ‘all’ format matrix file is available at http://jaspar.genereg.net/html/DOWNLOAD/JASPAR_CORE/pfm/nonredundant/pfm_all.txt

Value

A PFMatrixList or PWMatrixList object is returned, depending on the matrix class.

Author(s)

Ge Tan

See Also

makeFlatFileDir

Examples

1
2
3
4
5
6
  fn <- file.path(system.file("extdata", package="TFBSTools"),
                  "MA0001.1.pfm")
  readJASPARMatrix(fn, matrixClass="PFM")
  fn <- file.path(system.file("extdata", package="TFBSTools"),
                  "pfm_all_example.txt")
  readJASPARMatrix(fn, matrixClass="PFM")

TFBSTools documentation built on Nov. 8, 2020, 8:14 p.m.