This function will do smooth for given resolution (tile) for inputs and it is important step to prepare the inputs for create3dGenomicSignals and view3dStructure.
smooth3dPoints(obj, resolution = 30, ...)
GRanges object with mcols x, y, and z
number of points at which to evaluate the smooth curve.
parameters passed to splinefun
GRanges object with smoothed points of x0, y0, z0, x1, y1, and z1.
library(GenomicRanges)
obj <- GRanges("1", IRanges(seq.int(5) * 10, width = 10),
x = seq.int(5), y = seq.int(5), z = seq.int(5)
)
smooth3dPoints(obj, 5)
#> GRanges object with 25 ranges and 6 metadata columns:
#> seqnames ranges strand | x0 y0 z0 x1
#> <Rle> <IRanges> <Rle> | <numeric> <numeric> <numeric> <numeric>
#> [1] 1 10-11 * | 1.00 1.00 1.00 1.16
#> [2] 1 12-13 * | 1.16 1.16 1.16 1.32
#> [3] 1 14-15 * | 1.32 1.32 1.32 1.48
#> [4] 1 16-17 * | 1.48 1.48 1.48 1.64
#> [5] 1 18-19 * | 1.64 1.64 1.64 1.80
#> ... ... ... ... . ... ... ... ...
#> [21] 1 50-51 * | 4.20 4.20 4.20 4.36
#> [22] 1 52-53 * | 4.36 4.36 4.36 4.52
#> [23] 1 54-55 * | 4.52 4.52 4.52 4.68
#> [24] 1 56-57 * | 4.68 4.68 4.68 4.84
#> [25] 1 58-59 * | 4.84 4.84 4.84 5.00
#> y1 z1
#> <numeric> <numeric>
#> [1] 1.16 1.16
#> [2] 1.32 1.32
#> [3] 1.48 1.48
#> [4] 1.64 1.64
#> [5] 1.80 1.80
#> ... ... ...
#> [21] 4.36 4.36
#> [22] 4.52 4.52
#> [23] 4.68 4.68
#> [24] 4.84 4.84
#> [25] 5.00 5.00
#> -------
#> seqinfo: 1 sequence from an unspecified genome; no seqlengths