saezlab / decoupleR

R package to infer biological activities from omics data using a collection of methods.
https://saezlab.github.io/decoupleR/
GNU General Public License v3.0
190 stars 24 forks source link

Subscript out of bounds error #130

Open savagesr opened 3 months ago

savagesr commented 3 months ago

Hello,

I am trying to run decoupleR but have just encountered an error after updating to the most recent version today when using run_ulm or run_mlm:

sample_acts <- run_ulm(mat=counts, net=net, .source='source', .target='target', .mor='mor', minsize = 5)
Error in mor_mat[[.target, .source]] <- .weight : 
  [[ ]] subscript out of bounds

I first encountered the error on my data but it also occurred for me when exactly following the tutorial on "Transcription factor activity inference in bulk RNA-seq".

I am using OmnipathR version 3.13.5 and decoupleR 2.9.7.

PauBadiaM commented 3 months ago

Hi @savagesr,

Thanks for opening this issue. I've checked and this error is because of a new bug from OmnipathR that introduces NAs in the network when calling get_collectri. @deeenes, something went wrong with the new update and now all sources that come from a complex return NAs, could you have a look?

Sigmatilde commented 3 months ago

I encountered the same error, after removing the rows of net with NA the command run_ulm is working. thank you!

PauBadiaM commented 3 months ago

@deeenes any update on this issue? I've checked and it is only the R version of omnipath, the python version works fine.

JenMcKey commented 3 months ago

Hi! I'm encountering the same error, but removing NAs from net (using drop_na()) doesn't solve it for me. Any ideas what I can try? I'm also using OmnipathR 3.13.5 and decoupleR 2.9.7. Thank you!

thekingofall commented 3 months ago

thank you net2 <- subset(net, !is.na(source) & !is.na(target)) acts <- run_ulm(mat=mat, net=net2, .source='source', .target='target', .mor='mor', minsize = 5)

it works

JenMcKey commented 3 months ago

Yes, that worked. Thank you so much @thekingofall!

PauBadiaM commented 3 months ago

@deeenes any update on this error?

PauBadiaM commented 2 months ago

@deeenes has this been fixed?

PauBadiaM commented 2 months ago

@deeenes any update?

deeenes commented 2 months ago

Hi all, apologies for the late reply!

With OmnipathR 3.13.8 this issue should be fixed. Please update from our git repo:

library(remotes)
remotes::install_github('saezlab/OmnipathR')

Sorry in advance if anything else got broken, there are quite some updates in this release. If you see any error, ping me here and I'll fix it quickly.