Load read pair data and chromosome names from a HDF5 index file.
a character string containing a path to a index file
a character string, specifying the name of the chromosomes in a pair
The purpose of these function is to allow users to perform custom analyses by extracting the data manually from each index file.
This may be desirable, e.g., when preparing data for input into other tools.
To extract all data, users are advised to run
loadData iteratively on each pair of chromosomes as obtained with
loadData will successfully operate even if the anchor1/anchor2 specification is permuted.
In this case, it will return a warning to inform the user that the names should be switched.
loadChromos function will return a dataframe with character fields
Each row represents a pair of chromosomes, the names of which are stored in the fields.
The presence of a row indicates that the data for the corresponding pair exists in the
loadData function will return a dataframe where each row contains information for one read pair.
preparePairs for more details on the type of fields that are included.
1 2 3 4 5 6 7 8 9 10 11 12
hic.file <- system.file("exdata", "hic_sort.bam", package="diffHic") cuts <- readRDS(system.file("exdata", "cuts.rds", package="diffHic")) param <- pairParam(cuts) tmpf <- tempfile(fileext=".h5") preparePairs(hic.file, param, tmpf) loadChromos(tmpf) loadData(tmpf, "chrA", "chrA") loadData(tmpf, "chrB", "chrA") loadData(tmpf, "chrA", "chrB") try(loadData(tmpf, "chrA2", "chrB2"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.