hi Martin,
thanks for the explanation, it makes, i got confused because i was using
'bpiterate()' to parallelize calculations through the slices of rows of
a matrix as you described in this post:
https://support.bioconductor.org/p/123104
where this was the recommended option for parallelizing calculations
through rows of a matrix. in such a case, i know how many iterations i
have to do because is the number of row-chunks of the matrix. is there
any alternative to use 'bpiterate()' in such case or is there a way to
pass to 'bpiterate()' the number of iterations so that progress could be
shown in %?
robert.
On 27/11/2019 19:16, Martin Morgan wrote:
The rationale is that bpiterate() is used when the number of iterations is
unknown (hence the length of the progress bar indeterminate...), whereas
bplapply() is a more natural candidate for iteration when the length of the
iteration is known... is bpiterate() providing functionality (REDUCE, maybe?
that bplapply() does not?
Martin
On 11/27/19, 1:11 PM, "Bioc-devel on behalf of Robert Castelo"
<bioc-devel-boun...@r-project.org on behalf of robert.cast...@upf.edu> wrote:
hi,
the 'BiocParallel::bpiterate()' method shows progress through the
following call:
setMethod("bpiterate", c("ANY", "ANY", "SerialParam"),
function(ITER, FUN, ..., REDUCE, init, reduce.in.order = FALSE,
BPPARAM=bpparam())
{
[...]
progress <- .progress(active=bpprogressbar(BPPARAM), iterate=TRUE)
[...]
}
where the argument 'iterate=TRUE' when calling '.progress()' leads this
function to show progress by a message
"iteration: x"
where 'x' is a number from 0 to 'ntasks' within its code. i'd like to
know whether there is a particular reason why 'bpiterate' should show
progress in such a way and whether it would be possible to parametrize
it to show progress in the same way other 'BiocParallel' methods do,
such as 'bplapply()', 'bpvec()', etc..., i.e., doing
|========== | X%
thanks!!!
robert.
_______________________________________________
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel
_______________________________________________
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel