From a (m)cool pre-imported in memory, computes a 4C profile using a user-specified viewpoint.

virtual4C(x, viewpoint, use.scores = "balanced")

Arguments

x

a HiCExperiment object

viewpoint

viewpoint, defined as a GRanges

use.scores

use.scores

Value

A tibble with the contact frequency of the viewpoint, per bin along the imported genomic range.

Examples

library(HiContacts)
contacts_yeast <- contacts_yeast()
#> see ?HiContactsData and browseVignettes('HiContactsData') for documentation
#> loading from cache
v4C <- virtual4C(contacts_yeast, GenomicRanges::GRanges('II:490001-510000'))
v4C
#> GRanges object with 763 ranges and 4 metadata columns:
#>         seqnames        ranges strand |      score    center in_viewpoint
#>            <Rle>     <IRanges>  <Rle> |  <numeric> <numeric>    <logical>
#>     [1]        I       1-16000      * | 0.00359351    8000.5        FALSE
#>     [2]        I   16001-32000      * | 0.00222557   24000.5        FALSE
#>     [3]        I   32001-48000      * | 0.00422662   40000.5        FALSE
#>     [4]        I   48001-64000      * | 0.00248154   56000.5        FALSE
#>     [5]        I   64001-80000      * | 0.00260842   72000.5        FALSE
#>     ...      ...           ...    ... .        ...       ...          ...
#>   [759]      XVI 880001-896000      * | 0.00301663    888000        FALSE
#>   [760]      XVI 896001-912000      * | 0.00397464    904000        FALSE
#>   [761]      XVI 912001-928000      * | 0.00546521    920000        FALSE
#>   [762]      XVI 928001-944000      * | 0.00501920    936000        FALSE
#>   [763]      XVI 944001-948066      * | 0.00000000    946034        FALSE
#>                viewpoint
#>              <character>
#>     [1] II:490001-510000
#>     [2] II:490001-510000
#>     [3] II:490001-510000
#>     [4] II:490001-510000
#>     [5] II:490001-510000
#>     ...              ...
#>   [759] II:490001-510000
#>   [760] II:490001-510000
#>   [761] II:490001-510000
#>   [762] II:490001-510000
#>   [763] II:490001-510000
#>   -------
#>   seqinfo: 16 sequences from an unspecified genome; no seqlengths