getMatrixByID-methods: Basic JASPAR database search functionis 'getMatrixByID',...

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

Description

This method fetches matrix data under the given ID or name from the database and returns a XMatrix object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
  ## S4 method for signature 'character'
getMatrixByID(x, ID)
  ## S4 method for signature 'SQLiteConnection'
getMatrixByID(x, ID)
  ## S4 method for signature 'JASPAR2014'
getMatrixByID(x, ID)
  ## S4 method for signature 'character'
getMatrixByName(x, name)
  ## S4 method for signature 'SQLiteConnection'
getMatrixByName(x, name)
  ## S4 method for signature 'JASPAR2014'
getMatrixByName(x, name)

Arguments

x

character(1) for the path of JASPAR SQLite file, a SQLiteConnection object, a JASPAR2014, or a JASPAR2016object.

ID

character() of JASPAR stable ID(s). See more details below.

name

character() of JASPAR stable name(s).

Details

For getMatrixByID, ID is a string which refers to the stable JASPAR ID (usually something like "MA0001") with or without version numbers. "MA0001" will give the latest version on MA0001, while "MA0001.2" will give the second version, if existing.

For getMatrixByName, according to the current JASPAR data model, name is not necessarily a unique identifier. Also, names change over time. In the case where there are several matrices with the same name in the database, the function fetches the first one and prints a warning. You've been warned. Some matrices have multiple versions. The function will return the latest version. For specific versions, use getMatrixByID(ID.version)

Value

A PFMMatrix object is returned when input ID or name is length 1. Otherwise, PFMMatrixList is returned.

Author(s)

Ge Tan

See Also

getMatrixSet

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
    library(JASPAR2014)
    db <- file.path(system.file("extdata", package="JASPAR2014"), 
                    "JASPAR2014.sqlite")
                    
    ## character and ID
    pfm <- getMatrixByID(db, ID="MA0003")
    
    ## character and IDs
    pfmList <- getMatrixByID(db, ID=c("MA0003", "MA0004"))
    
    ## character and name
    pfm <- getMatrixByName(db, name="TFAP2A")
    
    ##
    ## character and name
    pfmList <- getMatrixByName(db, name=c("TFAP2A", "Arnt"))
    
    ## JASPAR2014 and ID
    pfm <- getMatrixByID(JASPAR2014, ID="MA0003")

ge11232002/TFBSTools documentation built on Sept. 12, 2021, 12:07 p.m.