File: XMatrixList-methods.r

package info (click to toggle)
r-bioc-tfbstools 1.20.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 920 kB
  • sloc: xml: 1,137; ansic: 590; asm: 54; sh: 13; makefile: 2
file content (21 lines) | stat: -rw-r--r-- 998 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
### -----------------------------------------------------------------
### Getters
### 
setMethod("name", "XMatrixList", function(x) sapply(x, name))
setMethod("ID", "XMatrixList", function(x) sapply(x, ID))
setMethod("matrixClass", "XMatrixList", function(x) sapply(x, matrixClass))
setMethod("Matrix", "XMatrixList", function(x) lapply(x, Matrix))
setMethod("strand", "XMatrixList", function(x) sapply(x, strand))
setMethod("bg", "XMatrixList", function(x) lapply(x, bg))
setMethod("matrixType", "XMatrixList", function(x) sapply(x, matrixType))
setMethod("pseudocounts", "PWMatrixList", function(x) sapply(x, pseudocounts))
setMethod("schneider", "ICMatrixList", function(x) sapply(x, schneider))
setMethod("tags", "XMatrixList", function(x) lapply(x, tags))

### -----------------------------------------------------------------
### showAsCell
### 
setMethod("showAsCell", "XMatrixList", function(object){
  ans <- paste(ID(object), name(object), matrixClass(object), sep="; ")
  return(ans)
})