bartongroup / RATS

Relative Abundance of Transcripts: An R package for the detection of Differential Transcript isoform Usage.
MIT License
32 stars 1 forks source link

Error in if (threads > parallel::detectCores(logical = TRUE)) return(list(error = TRUE, : missing value where TRUE/FALSE needed #59

Closed brettvanderwerff closed 5 years ago

brettvanderwerff commented 5 years ago

Hi is this is a bug?:

  myannot <- annot2ids("my_annotation_file.gtf")

  samples_A <- c("your/path/SAMPLE1", "your/path/SAMPLE4","your/path/SAMPLE5")
  samples_B <- c("your/path/SAMPLE2", "your/path/SAMPLE3","your/path/SAMPLE7", 
                 "your/path/SAMPLE10")

  mydata <- fish4rodents(A_paths= samples_A, B_paths= samples_B, 
                         annot= myannot, scaleto=100000000)

  mydtu <- call_DTU(annot= myannot, boot_data_A= mydata$boot_data_A, 
                    boot_data_B= mydata$boot_data_B, verbose= FALSE, 
                    scaling=c(25, 26, 23, 50, 45, 48, 52))

Produces:

Error in if (threads > parallel::detectCores(logical = TRUE)) return(list(error = TRUE,  : 
  missing value where TRUE/FALSE needed

I am still looking at this but it seems parts of my problem is when I run:

parallel::detectCores(logical= TRUE) I get: N/A

if I run: install.packages('parallel') It goes, but every time I restart R I have to do that again. This may just be a "me" problem, but thought I would raise the issue just in case it's not.

fruce-ki commented 5 years ago

Hi Brett,

I will look into it. It could be a package/R version thing. I've noticed some other problems with a newer installation of R...

Can I have your session info?

Cheers

fruce-ki commented 5 years ago

Also, the code you posted is example code from the vignette and is not meant to run verbatim, since none of these paths and files exist anywhere.

Can you try with some real paths and files and tell me if that works?

brettvanderwerff commented 5 years ago

Ill get you the session info as soon as I can. I am running with real paths, I just posted those as dummy paths. I have gotten past this bug, but I have to run install.packages("parallel") everytime I run the script for some reason. Thanks!

fruce-ki commented 5 years ago

In that case the issue has nothing to do with RATs.

Just to make sure though, in a fresh R session with no other packages loaded, are you still unable to execute parallel::detectCores(logical= TRUE) ? What about other functions from the parallel package?

Any chance you have shoehorned together your R installation in some unsupported way? Is the parallel version appropriate for your R version? Are the library paths configured correctly? Do you have multiple R installations that clash? I think I might have encountered issues with installed packages not working at some point and it had something to do with how/where I was installing R packages locally for the system R and a mess of mismatched versions. Basically things were not installing correctly and not talking to each other correctly. If that is the case, your IT support might be able to help you.

fruce-ki commented 5 years ago

Hi @brettvanderwerff ,

Do you have anything more to add to this thread? Did you find/fix the problem? Is it somehow caused by RATs? Otherwise I'll just close the issue.

brettvanderwerff commented 5 years ago

Sorry for the delay, here is the session info after loading rats.

If you don't see anything suspicious at a glance please close this issue. I played around with reinstalling the parallel library and after restarting my computer I don't get an error now it was probably just my environment. I got a little side tracked but am still looking to use this library. Thanks for making it!

R version 3.5.2 (2018-12-20)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.1 LTS

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] rats_0.6.4        data.table_1.12.0

loaded via a namespace (and not attached):
[1] compiler_3.5.2     parallel_3.5.2     tools_3.5.2        yaml_2.2.0         matrixStats_0.54.0
fruce-ki commented 5 years ago

Ok, cool. Thanks!