This function creates a new virtual track named 'vtrack' with the given
source, function and parameters. 'src' can be either a track or intervals
(1D or 2D). Use the following table for a reference of all valid source,
function and parameters combinations:
src = [Track], func = "avg", params = NULL
Average track value in
iterator interval.
src = [Track], func = "max", params = NULL
Maximal track value in
iterator interval.
src = [Track], func = "min", params = NULL
Minimal track value in
iterator interval.
src = ['Dense' / 'Sparse' / 'Array' track], func = "nearest", params =
NULL
Mean track value in iterator interval. If there are no track
values covered by an iterator interator (can occur only in 'Sparse' track),
the nearest track value is returned.
src = ['Dense' / 'Sparse' / 'Array' track], func = "stddev", params =
NULL
Unbiased standard deviation of track values in iterator interval.
src = ['Dense' / 'Sparse' / 'Array' track], func = "sum", params =
NULL
Sum of track values in iterator interval.
src = ['Dense' / 'Sparse' / 'Array' track], func = "quantile", params
= [Percentile in the range of [0, 1]]
Quantile of track values in
iterator interval.
src = ['Dense' track], func = "global.percentile", params = NULL
Percentile of an average track value in iterator interval relatively to all
values of the track.
src = ['Dense' track], func = "global.percentile.max", params = NULL
Percentile of a maximal track value in iterator interval relatively to
all values of the track.
src = ['Dense' track], func = "global.percentile.min", params = NULL
Percentile of a minimal track value in iterator interval relatively to
all values of the track.
src = [2D track], func = "area", params = NULL
Area covered by
iterator interval.
src = [2D track], func = "weighted.sum", params = NULL
Weighted
sum of values where each weight equals to the intersection area between the
iterator interval and the rectangle containing the value.
src = [1D intervals], func = "distance", params = [Minimal distance
from center (default: 0)]
Given the center 'C' of the current iterator
interval returns 'DC * X/2', where 'DC' is the normalized distance to the
center of the interval that contains 'C', and 'X' is the value of the
parameter. If no interval contains 'C' the resulted value is 'D + XXX/2'
where 'D' is the distance between 'C' and the edge of the closest interval.
Distance can be positive or negative depending on the position of the
coordinate relative to the interval and the strand (-1 or 1) of the
interval. Distance is always positive if 'strand' is '0' or if 'strand'
column is missing. Distance is 'NA' if no intervals exist for the current
chromosome.
src = [1D intervals], func = "distance.center", params = NULL
Given the center 'C' of the current iterator interval returns 'NaN' if 'C'
is outside of the intervals, otherwise returns the distance between 'C' and
the center of the closest interval. Distance can be positive or negative
depending on the position of the coordinate relative to the interval and the
strand (-1 or 1) of the interval. Distance is always positive if 'strand' is
'0' or if 'strand' column is missing.
Once a virtual track is created one can modify its iterator behavior by
calling 'gvtrack.iterator' or 'gvtrack.iterator.2d'.