Description Usage Arguments Details Value Methods Utilities References Examples

The ContactGroup class represents a collection of contact matrices which are observations from different samples on the same set of genomic loci.

1 | ```
ContactGroup(rowData, contacts, colData)
``` |

`rowData` |
Object of class |

`contacts` |
Object of class |

`colData` |
Object of class |

The ContactGroup class contains a set of contact matrices in the slot 'contacts'. All matrices are required to be of the same dimensionality. 'ContactGroup()' expects a list of symmetric matrices to be passed to the contstructor. Data about these contact matrices is held in two other slots. Data about the genomic loci represented in the ContactGroup is found in the 'rowData' slot as a GenomicRanges objects, and sample-level information is located in the 'colData' slot as a DataFrame.

A ContactGroup object.

In the code snippets below, `x`

is a ContactGroup object.

- [
`signature(x = "ContactGroup", i = "ANY", j = "ANY", drop = "ANY")`

: Allows for subsetting the contact matrices through use of`i`

or of samples through`j`

.- colData
`signature(x = "ContactGroup")`

: Get sample-level information about samples in`x`

- colData<-
`signature(x = "ContactGroup", value = "DataFrame")`

: Set sample-level information about samples in`x`

.`value`

is expected to be a`DataFrame`

object.- dim
`signature(x = "ContactGroup")`

: Obtain the dimensions of a ContactGroup. Returns 2 values: one representing the number of bins in the contact matrices and another representing the number of samples.- rowData
`signature(x = "ContactGroup")`

: Get the GenomicRanges object describing the loci in the ContactGroup.`value`

is expected to be a GenomicRanges object.- rowData<-
`signature(x = "ContactGroup")`

: Set the GenomicRanges object describing the bins in the ContactGroup.`value`

is expected to be a GenomicRanges object.- show
`signature(object = "ContactGroup")`

: Method to display summary information about a ContactGroup: the number of bins, the width of the bins and the number of samples.- librarySize
`signature(x = "ContactGroup")`

: Method to compute the library size of each contact matrix in`x`

. Library size is defined to be the sum of the upper triangle of a contact matrix.- logCPM
`signature(x = "ContactGroup")`

: Method to transform each contact matrix to logCPM scale.

`contacts(x)`

,`contacts(x) <- value`

: Method to extract the list of contact matrices from a ContactGroup.`value`

is expected to be a list object.- distanceIdx
`signature(cg = "ContactGroup", threshold="ANY", step="ANY")`

: Method to identify which matrix bands are no more than`threshold`

bins apart, where each bin represents`step`

base pairs.

Law, C.W., Chen, Y., Shi, W. and Smyth G.K.
*voom: Precision weights unlock linear model analysis tools for RNA-seq read counts.*
Genome Biology 2014, 15:R29. doi: 10.1186/gb-2014-15-2-r29.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | ```
data(cgEx)
cgEx[1,]
cgEx[,1]
cd <- colData(cgEx)
colData(cgEx) <- cd
gr <- rowData(cgEx)
rowData(cgEx) <- gr
cgEx
cl <- contacts(cgEx)
contacts(cgEx) <- cl
d.idx <- distanceIdx(cgEx, 1e7, 4e4)
libs <- librarySize(cgEx)
cgEx.cpm <- logCPM(cgEx)
## below, upper.mats.list is a list of upper triangular matrices
## SampleData is a DataFrame of sample data and LociData is a GenomicRanges objec
## Not run:
MatsList <- lapply(upper.mats.list, function(M) M[lower.tri(M)] = M[upper.tri(M)])
cg <- ContactGroup(LociData, MatsList, SampleData)
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.