readJuicerFragmentSites(file, chromosomes, verbose = TRUE)
file | Filename can be a local path or remote path. The remote path full list can be obtained from http://aidenlab.org/data.html. |
---|---|
chromosomes | A vector contains all the chromosomes. For example c('chr1', 'chr2') |
verbose | A logical value, indicate whether print message |
A list contains all the chromosomes and their fragment sites.
This function is heavily adopted from both java version juicebox Dump function and c++ version straw.
The restriction site file is required for juicer to provide a hic file with fragment level resolution.
library(FreeHiCLite) ## Remote file location. The reomte file include downloading, it may take a while remoteFilePath = 'https://hicfiles.s3.amazonaws.com/hiseq/gm12878/in-situ/combined.hic' ## Local file location localFilePath = system.file('extdata', 'example.hic', package = 'FreeHiCLite') # \donttest{ fragSites <- readJuicerFragmentSites(remoteFilePath, c('chr1', 'chr2'))#>#>#>str(fragSites)#> List of 2 #> $ 1: int [1:576357] 11160 12411 12461 12686 12829 13315 13420 13566 13698 13915 ... #> $ 2: int [1:578290] 11514 11874 12160 12371 12600 12678 13547 13774 14180 15635 ...# }