getInteractionMatrix | R Documentation |
getInteractionMatrix
construct interaction matrix between two Granges
objects. Names of object a
became row names and names of b
column names.
getInteractionMatrix(a, b, ext = 500, count = FALSE)
a |
GRanges object. |
b |
GRanges object. |
ext |
Integer specifying number of base pairs the |
count |
Logical indicating if matrix should hold number of overlaps
between |
Sparse matrix of class dgCMatrix, with rows corresponding to
a
and columns to b
. Each cell holds a number indicating
how many times a
and b
overlapped.
a <- GenomicRanges::GRanges(
seqnames = c("chr20", "chr4"),
ranges = IRanges::IRanges(
start = c(62475984L, 173530220L),
end = c(62476001L, 173530236L)),
strand = c("-", "-"),
name = c("hg19::chr20:61051039..61051057,-;hg_188273.1",
"hg19::chr4:174451370..174451387,-;hg_54881.1"))
b <- GenomicRanges::GRanges(
seqnames = c("chr4", "chr20"),
ranges = IRanges::IRanges(
start = c(173530229L, 63864270L),
end = c(173530236L, 63864273L)),
strand = c("-", "-"),
name = c("HAND2", "GATA5"))
getInteractionMatrix(a, b)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.