Description Usage Arguments Details Value Author(s) See Also Examples
Merge index files for multiple Hi-C libraries into a single output file.
1 | mergePairs(files, file.out)
|
files |
a character vector containing the paths to the index files to be merged |
file.out |
a character string specifying the path to the output index file |
Hi-C libraries are often split into technical replicates.
This function facilitates the merging of said replicates into a single library for downstream processing.
Index files listed in files
should be produced by preparePairs
, with or without pruning by prunePairs
.
A merged index file is produced at the specified location.
A NULL
object is invisibly returned.
Aaron Lun
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | hic.file <- system.file("exdata", "hic_sort.bam", package="diffHic")
cuts <-readRDS(system.file("exdata", "cuts.rds", package="diffHic"))
param <- pairParam(cuts)
fout <- tempfile(fileext=".h5")
fout2 <- tempfile(fileext=".h5")
fout3 <- tempfile(fileext=".h5")
invisible(preparePairs(hic.file, param, fout))
invisible(prunePairs(fout, param, fout2))
invisible(prunePairs(fout, param, fout3, max.frag=50))
# Note: don't save to a temporary file for actual data.
mout <- tempfile(fileext=".h5")
mergePairs(c(fout2, fout3), mout)
require(rhdf5)
h5read(fout2, "chrA/chrA")
h5read(fout3, "chrA/chrA")
h5read(mout, "chrA/chrA")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.