Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to download annotation resource PROGENy from OmniPath #148

Open
Urja25 opened this issue Dec 6, 2024 · 2 comments
Open

Failed to download annotation resource PROGENy from OmniPath #148

Urja25 opened this issue Dec 6, 2024 · 2 comments
Assignees

Comments

@Urja25
Copy link

Urja25 commented Dec 6, 2024

Hi,

I am unable to retrieve Progeny data through OmnipathR. Here is the error:

> remotes::install_github('saezlab/OmnipathR')
> library(OmnipathR)
> packageVersion(OmnipathR)
Error: object 'OmnipathR' not found
> net <- decoupleR::get_progeny(organism = 'human', top = 500)
[2024-12-06 10:34:48] [TRACE]   [OmnipathR] Reading JSON from `https://omnipathdb.org/resources` (encoding: UTF-8).
[2024-12-06 10:34:48] [TRACE]   [OmnipathR] JSON validation successful: TRUE
[2024-12-06 10:34:48] [INFO]    [OmnipathR] Loading database `Ensembl and OMA organism names`.
[2024-12-06 10:34:48] [INFO]    [OmnipathR] Looking up in cache `https://www.ensembl.org/info/about/species.html`: key=7332486db7400730697234bad76ca0c8e4d00799, latest version=1.
[2024-12-06 10:34:48] [TRACE]   [OmnipathR] Cache file path: /home/u855h/.cache/OmnipathR/7332486db7400730697234bad76ca0c8e4d00799-1.html
[2024-12-06 10:34:49] [INFO]    [OmnipathR] Loading database `Ensembl and OMA organism names`.
[2024-12-06 10:34:49] [INFO]    [OmnipathR] Looking up in cache `https://www.ensembl.org/info/about/species.html`: key=7332486db7400730697234bad76ca0c8e4d00799, latest version=1.
[2024-12-06 10:34:49] [TRACE]   [OmnipathR] Cache file path: /home/u855h/.cache/OmnipathR/7332486db7400730697234bad76ca0c8e4d00799-1.html
[2024-12-06 10:34:49] [WARN]    [OmnipathR] Accessing `PROGENy` as a static table: this is not the recommended way to access OmniPath data; it is only a backup plan for situations when our server or your computer is experiencing issues.
[2024-12-06 10:34:49] [TRACE]   [OmnipathR] Looking up in cache: `http://no-tls.static.omnipathdb.org/resources/annotations_PROGENy_9606.tsv.gz`
[2024-12-06 10:34:49] [TRACE]   [OmnipathR] Loaded data from RDS `/home/u855h/.cache/OmnipathR/103f85125e0134e3d65e4e63d22c339270d103e8-1.rds`.
[2024-12-06 10:34:49] [INFO]    [OmnipathR] Loaded from cache: `http://no-tls.static.omnipathdb.org/resources/annotations_PROGENy_9606.tsv.gz`
[2024-12-06 10:34:49] [SUCCESS] [OmnipathR] Loaded 2 annotation records from cache.
[2024-12-06 10:34:49] [ERROR]   [OmnipathR] [decoupleR] Failed to download annotation resource `PROGENy` from OmniPath. For more information, see the OmnipathR log.
Error in value[[3L]](cond) : 
  [decoupleR] Failed to download annotation resource `PROGENy` from OmniPath. For more information, see the OmnipathR log.

I am using R 4.4.0.

@deeenes deeenes self-assigned this Dec 6, 2024
@deeenes
Copy link
Member

deeenes commented Dec 6, 2024

There is a download error happening, which is hidden, but it also not covered by the log trace above, I'm missing the lines where the first attempt happens:

[2024-12-06 11:09:46] [TRACE]   [OmnipathR] Reading JSON from `https://omnipathdb.org/resources` (encoding: UTF-8).
[2024-12-06 11:09:46] [TRACE]   [OmnipathR] JSON validation successful: TRUE
[2024-12-06 11:09:46] [TRACE]   [OmnipathR] Arguments for OmniPath query: [wide=TRUE,resources=PROGENy,query_type=annotations]
[2024-12-06 11:09:46] [TRACE]   [OmnipathR] Organism(s): 9606
[2024-12-06 11:09:46] [TRACE]   [OmnipathR] Orthology targets: 
[2024-12-06 11:09:47] [TRACE]   [OmnipathR] Reading JSON from `https://omnipathdb.org/resources` (encoding: UTF-8).
[2024-12-06 11:09:47] [TRACE]   [OmnipathR] JSON validation successful: TRUE
[2024-12-06 11:09:47] [TRACE]   [OmnipathR] Looking up in cache: `https://omnipathdb.org/annotations?resources=PROGENy&license=academic`

To test out what's the original error, you can call this directly:

library(readr)
p <- read_tsv('https://omnipathdb.org/annotations?resources=PROGENy&license=academic')

@Urja25
Copy link
Author

Urja25 commented Dec 6, 2024

Thanks for the quick response. I installed PROGENy and did the following:

## We load the required packages
library(Seurat)
library(decoupleR)
library(OmnipathR)
packageVersion("decoupleR")
packageVersion("OmnipathR")

# interactions <- omnipath(
#   resources = c('SignaLink3', 'PhosphoSite', 'SIGNOR')
# )

# BiocManager::install("progeny")
# library(progeny)

# Only needed for data handling and plotting
library(dplyr)
library(tibble)
library(tidyr)
library(patchwork)
library(ggplot2)
library(pheatmap)

p <- Seurat::DimPlot(seurat_obj, 
                     reduction = "umap", 
                     label = TRUE, 
                     pt.size = 0.5) + 
  Seurat::NoLegend()
p


# omnipath_cache_wipe()
# omnipath_set_console_loglevel('trace')
# options(OmnipathR.static = TRUE)
# options(OmnipathR.server = "https://omnipathdb.org")
# OmnipathR::clear_cache()

net <- data("model_human_full", package = "progeny")
net
library(dplyr)

net_prepared <- model_human_full %>%
  rename(
    source = pathway,
    target = gene,
    weight = weight
  )
net_prepared
colnames(net_prepared)
net_prepared <- subset(net_prepared, !is.na(source) & !is.na(target))

mat <- as.matrix(seurat_obj@assays$RNA$data)

acts <- decoupleR::run_mlm(mat = mat, 
                           net = net_prepared, 
                           .source = 'source', 
                           .target = 'target',
                           .mor = 'weight', 
                           minsize = 5)

I get the following error:

> acts <- decoupleR::run_mlm(mat = mat, 
+                            net = net_prepared, 
+                            .source = 'source', 
+                            .target = 'target',
+                            .mor = 'weight', 
+                            minsize = 5)
Error in mor_mat[[.target, .source]] <- .weight : 
  [[ ]] subscript out of bounds

packageVersion("decoupleR")
[1] ‘2.9.7’
packageVersion("OmnipathR")
[1] ‘3.15.1’
packageVersion("progeny")
[1] ‘1.26.0’

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants