Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/neighborCounts.R
Collate count combinations for interactions between pairs of bins across multiple Hi-C libraries.
1 |
files |
a character vector containing paths to the index files generated from each Hi-C library |
param |
a |
width |
an integer scalar specifying the width of each square in base pairs |
filter |
an integer scalar specifying the minimum count for each square |
flank |
an integer scalar, specifying the number of bins to consider as the local neighborhood |
exclude |
an integer scalar, specifying the number of bins to exclude from the neighborhood |
This function combines the functionality of squareCounts
and enrichedPairs
.
The idea is to allow counting of neighborhoods when there is insufficient memory to load all bin pairs with filter=1L
in squareCounts
.
Here, the interaction space around each bin pair is examined as the counts are loaded for that bin pair, avoiding the need to hold the entire interaction space at once.
Only the counts and local enrichment values for those bin pairs with row sums above filter
are reported to save memory.
The returned assay
matrices are equivalent to that computed with enrichedPairs
with the default settings.
An InteractionSet object is returned with the number of read pairs for each bin pair across all libraries.
For each bin pair, the number of read pairs in each neighborhood region is also returned in separate assay
fields.
mcols
contains the size of each neighborhood in terms of the number of bin pairs.
Aaron Lun
Rao S et al. (2014). A 3D map of the human genome at kilobase resolution reveals principles of chromatin looping. Cell. 159, 1665-1690.
1 2 3 4 5 6 7 8 9 10 11 | hic.file <- system.file("exdata", "hic_sort.bam", package="diffHic")
cuts <- readRDS(system.file("exdata", "cuts.rds", package="diffHic"))
param <- pairParam(fragments=cuts)
# Setting up the parameters
fout <- tempfile(fileext=".h5")
invisible(preparePairs(hic.file, param, file=fout))
# Collating to count combinations.
y <- neighborCounts(fout, param, width=50, filter=2, flank=5)
y
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.