ordered chromosome position or ordered
integer vector
group
logical vector separating two groups
kvals
integer vector of window widths
nperm
number of permutations for FDR calculation
pruneFun
a function like prune.loglik.
...
other args
cutpt.filter.expr
(optional) R object or call (or
variable naming a call) with (optional) var x (window
widths in base pairs) to filter windows. It must evaluate
to mode "double". If not specified,
as.double(apply(x,2,median,na.rm=TRUE)) is used.
If an atomic vector of length one is supplied it is
expanded to the proper length and coerced to double. If
this arg is the name of a variable provided in
tmp.env, it must be protected with
quote(...).
cutpt.tail.expr
R object or call (or variable
naming a call) with (optional) vars: k,n, and x (as
above). Returns list like critVal.target. k is a
vector of the number of sites in a collection of windows,
and n is a vector of counts or proportions for the two
classes of insertion. If not supplied,
critVal.target(k,n,target=5,posdiff=x) is used.
If this arg is the name of a variable provided in
tmp.env, it must be protected with
quote(...).
tmp.env
(optional) environment to use in
evaluation of cutpt.* expressions. This is usually needed
for critVal.power, which is first
calculated and placed in the environment, and the
supplied object is used in the expression for
cutpt.filter.expr.
sample.id
(optional) integer vector indexing cells
in sample.tab to be looked up to determine
group under permutation. A factor can be used,
too, but will be coerced to integer.
sample.tab
(optional) integer vector containing 0
or 1 in each cell. Its length is the same as
max(sample.id). Both or neither sample.id
and sample.tab should be supplied. When supplied
sample.tab[sample.id] must equal group. If
the arguments are supplied, permutations are of the form
sample(sample.tab)[sample.id]. Otherwise they are
of the form sample(group).
Value
a GRanges object with a special metadata slot, see
gRxCluster-object