readJASPARMatrix {TFBSTools} | R Documentation

## Read JASPAR format matrix

### Description

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

### Usage

      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

      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")

[Package TFBSTools version 1.26.0 Index]