caravagnalab / revolver

REVOLVER - Repeated Evolution in Cancer
https://caravagnalab.github.io/revolver/
64 stars 25 forks source link

Crash txtProgressBar #19

Closed danro9685 closed 3 years ago

danro9685 commented 6 years ago

The function revolver_compute_CLtrees can crash due to txtProgressBar: Error in txtProgressBar(min = 0, max = length(TREES), style = 3) : must have 'max' > 'min'

To reproduce the error, see the attached RData cohort.RData.zip and the following block of code:

library("revolver")
load("cohort.RData")
cohort = revolver_compute_CLtrees(
    cohort, 
   "TCGA-C8-A26V", 
    options = list(sspace.cutoff = 10000,
                   n.sampling = 5000,
                   store.max = 200,
                   overwrite = FALSE))
caravagn commented 6 years ago

I think I just need to change all txt progress bar initializers to -1 and not 0.

luca-dex commented 6 years ago

if the max is 0 we can avoid to draw the bar, can't we?