Closed lwaldron closed 7 years ago
Actually here's a much simpler dataset to reproduce the error:
> library(RaggedExperiment)
> example("RaggedExperiment")
> re <- RaggedExperiment(sample1=sample1, sample2=sample2)
> qreduceAssay(re, query = sample1, simplify=mean)
Error: isTRUEorFALSE(na.rm) is not TRUE
> qreduceAssay(re, query = sample1, simplify=function(x, y, z, ...) max(x, y, z, ...), i="x")
Error in .local(x, ..., na.rm) :
unused arguments (<S4 object of class "GRanges">, na.rm)
>
from the docs ?qreduceAssay
, describing the argument simplify
qreduceAssay: A 'function' accepting arguments 'score',
'range', and 'qrange':
• 'score' A '*List', where each list element corresponds to
a cell in the matrix to be returned by 'qreduceAssay'.
Vector elements correspond to ranges overlapping query.
The '*List' objects support many vectorized mathematical
operations, so 'simplify' can be implemented efficiently.
• 'range' A 'GRangesList' instance, 'parallel' to 'score'.
Each element of the list corresponds to a cell in the
matrix to be returned by 'qreduceAssay'. Each range in
the element corresponds to the range for which the
'score' element applies.
• 'qrange' A 'GRanges' instance with the same length as
'score', providing the query range to which the
corresponding scores apply.
and mean
and the lambda don't satisfy this.
That has been clarified by distinguishing between simplifyDisjoin
and simplifyReduce
.
When accordingly applying it with a suitable simplifyReduce
function, the error no longer occurs.
I guess, the issue can thus be closed.
Thanks Ludwig @lgeistlinger
Is this an expected error (RaggedExperiment_1.1.1 and 1.1.2)?
Since GH doesn't allow .rda: re.rda.zip