VCCRI / Sierra

Discover differential transcript usage from polyA-captured single cell RNA-seq data
GNU General Public License v3.0
49 stars 17 forks source link

multithreading is not working for apply_DEXSeq_test_seurat module #42

Closed AidenSb closed 2 years ago

AidenSb commented 3 years ago

Hi Ralph, Hope everything is well, It seems there multithreading is not working for functions that use the apply_DEXSeq_test_seurat. (only happens when trying multithreading) here is an example of the error I'm getting. Would appreciate it if you have any comments as I need to speed up the process as I'm running hundreds of this test. Thanks. '''

> apa.res <- DetectAEU(peaks.object = peaks_so, 
+                      gtf_gr = gtf_gr,
+                      gtf_TxDb = gtf_TxDb,
+                      do.MAPlot = T,
+                      population.1 = cell1,
+                      population.2 = cell2,
                        ncores = 20)
[1] "10082 expressed peaks in feature types UTR3"
[1] "2232 genes detected with multiple peak sites expressed"
[1] "6803 individual peak sites to test"
converting counts to integer mode
[1] "Running DEXSeq test..."
Error: $ operator is invalid for atomic vectors
In addition: Warning message:
In DESeqDataSet(rse, design, ignoreRank = TRUE) :

 Error: $ operator is invalid for atomic vectors

'''

rj-patrick commented 3 years ago

Hi @AidenSb,

It could be a memory issue - are you able to run the function on a subset of the data and/or a smaller numbers of cores?

Also, depending on the size of your dataset, the multithreading functionality that gets passed to DEXSeq may not be beneficial. I've found at least for a standard scRNA-seq experiment size (few thousand to few 10s of thousand cells) using multithreading doesn't seem to outweigh the cost of setting up the workers. In the case of running hundreds of tests it could be better to wrap a parallel function around the call to the DU functions.

Hope that's helpful.

Cheers, Ralph

AidenSb commented 3 years ago

Hi Ralph thanks for the reply. Yes, indeed I ended up making a parallel function to run. Thanks