ContactGroup-class | R Documentation |
"ContactGroup"
The ContactGroup class represents a collection of contact matrices which are observations from different samples on the same set of genomic loci.
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
.
signature(x = "ContactGroup")
: Get
sample-level information about samples in x
signature(x = "ContactGroup", value =
"DataFrame")
: Set sample-level information about samples in x
.
value
is expected to be a DataFrame
object.
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.
signature(x = "ContactGroup")
: Get the
GenomicRanges object describing the loci in the ContactGroup.
value
is expected to be a GenomicRanges object.
signature(x = "ContactGroup")
: Set the
GenomicRanges object describing the bins in the ContactGroup.
value
is expected to be a GenomicRanges object.
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.
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.
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.
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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1186/gb-2014-15-2-r29")}.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.