subset: [<-

[<-R Documentation

[<-

Description

ffTrack data populator

Takes as input only a GRanges object "i" and vector or list "value" of length(i) which is interpreted as follows (1) if vector, then each value[j] corresponds is assigned to (entire) range i[j] (2)if list of vectors, then length(value[[j]]) must be equal to length(i[j])

vmode of values must be also compatible or coercible to vmode(x)

Will throw a warning if ranges in "i" are out of the "universe" of the ffTrack object.

If raw = TRUE and fft has .levels, then will populate entries directly (without factorizing)

if vmode is numeric op can equal "+", "-", "*", "/" .. and results in an update of the current entries in the ffTrack with op and value eg ff[i, op="+"] = value is same as ff[i, full = TRUE] = ff[i] + rep(value, width(i)) ff[i, op="-"] = value is same as ff[i, full = TRUE] = ff[i] + rep(value, width(i)) and so on.

Usage

## S4 replacement method for signature 'ffTrack,ANY,ANY,ANY'
x[i, op = NULL, raw = TRUE,
  full = FALSE] <- value

Arguments

i

GRanges specifying intervals of ffTrack to populate

value

if i is GRanges then value is length(i) vector of data values, if i is GRangesList then value[[i]] is length (width(i)), but if full = TRUE, then value is a length(sum(width(i))) vector of data values, or if i is a GRangesList, then values[[j]] is a sum(width(i[[j]])) vector.

op

operation can be either "+", "-", "*", "/", and only for numeric ffTrack

raw

output raw integer data for factor as opposed to character

full

logical flag whether the replacement value is a single vector whose sum is the summed width of the ranges "i"

Author(s)

Marcin Imielinski


mskilab/ffTrack documentation built on Feb. 6, 2023, 2:47 a.m.