overlapScores {TopDom} | R Documentation |
Calculates Overlap Scores Between Two Sets of Topological Domains
Description
Calculates Overlap Scores Between Two Sets of Topological Domains
Usage
overlapScores(a, reference, debug = getOption("TopDom.debug", FALSE))
Arguments
a , reference |
Topological domain (TD) set |
debug |
If |
Details
The overlap score, , represents how well a
consecutive subset
of topological domains (TDs) in
overlap with topological domain
in reference set
.
For each reference TD
, the best match
is
identified, that is, the
subset that maximize
.
For exact definitions, see Page 8 in Shin et al. (2016).
Note that the overlap score is an asymmetric score, which means that
overlapScores(a, b) != overlapScores(b, a)
.
Value
Returns a named list of class TopDomOverlapScores
, where the names
correspond to the chromosomes in domain reference set .
Each of these chromosome elements contains a data.frame with fields:
-
chromosome
-character strings
-
best_score
-numerics in
-
best_length
-positive integers
-
best_set
- list ofindex vectors
where is the number of TDs in reference set
on
chromosome
. If a TD in reference
is not a
"domain"
,
then the corresponding best_score
and best_length
values are
NA_real_
and NA_integer_
, respectively, while best_set
is an empty
list.
Warning - This might differ not be the correct implementation
The original TopDom scripts do not provide an implementation for
calculating overlap scores. Instead, the implementation of
TopDom::overlapScores()
is based on the textual description of
overlap scores provided in Shin et al. (2016). It is not known if this
is the exact same algorithm and implementation as the authors of the
TopDom article used.
Author(s)
Henrik Bengtsson - based on the description in Shin et al. (2016).
References
Shin et al., TopDom: an efficient and deterministic method for identifying topological domains in genomes, Nucleic Acids Research, 44(7): e70, April 2016. doi: 10.1093/nar/gkv1505, PMCID: PMC4838359, PMID: 26704975
See Also
Examples
library(tibble)
path <- system.file("exdata", package = "TopDom", mustWork = TRUE)
## Original count data (on a subset of the bins to speed up example)
chr <- "chr19"
pathname <- file.path(path, sprintf("nij.%s.gz", chr))
data <- readHiC(pathname, chr = chr, binSize = 40e3, bins = 1:500)
print(data)
## Find topological domains using TopDom method for two window sizes
tds_5 <- TopDom(data, window.size = 5L)
tds_6 <- TopDom(data, window.size = 6L)
## Overlap scores (in both directions)
overlap_56 <- overlapScores(tds_6, reference = tds_5)
print(overlap_56)
print(as_tibble(overlap_56))
overlap_65 <- overlapScores(tds_5, reference = tds_6)
print(overlap_65)
print(as_tibble(overlap_65))