Skip to contents

The CoolFile class describes a BiocFile object, pointing to the location of an Hi-C matrix file (cool, mcool, hic, hicpro, ...) and containing additional slots:

  1. resolution: at which resolution the associated mcool file should be parsed

  2. pairsFile: the path (in plain character) to an optional pairs file (stored as a PairsFile object);

  3. metadata: a list. If the CoolFile is created by HiCool, it will contain two elements: log (path to HiCool processing log file) and stats (aggregating some stats from HiCool mapping).

CoolFile methods.

Arguments

path

String; path to a (m)cool file

resolution

numeric; resolution to use with mcool file

pairsFile

String; path to a pairs file

metadata

list; if the CoolFile object was generated by HiCool::HiCool, this list contains the path to log file, some statistics regarding the number of pairs obtained by hicstuff as well as the arguments and the hash ID used by HiCool.

object

A CoolFile object.

Examples

mcoolPath <- HiContactsData::HiContactsData('yeast_wt', 'mcool')
#> see ?HiContactsData and browseVignettes('HiContactsData') for documentation
#> loading from cache
pairsPath <- HiContactsData::HiContactsData('yeast_wt', 'pairs.gz')
#> see ?HiContactsData and browseVignettes('HiContactsData') for documentation
#> loading from cache
cf <- CoolFile(
  mcoolPath, 
  resolution = 2000, 
  pairsFile = pairsPath, 
  metadata = list(info = 'Yeast WT Hi-C exp.')
)
cf
#> CoolFile object
#> .mcool file: /github/home/.cache/R/ExperimentHub/190530f4def5_7752 
#> resolution: 2000 
#> pairs file: /github/home/.cache/R/ExperimentHub/190524de862e_7753 
#> metadata(1): info
resolution(cf)
#> [1] 2000
pairsFile(cf)
#>                                                  EH7703 
#> "/github/home/.cache/R/ExperimentHub/190524de862e_7753" 
metadata(cf)
#> $info
#> [1] "Yeast WT Hi-C exp."
#>