OmicsNetR QueryNet Error

Hi there, I am trying to run OmicsNetR to build an integrated network of my proteomic and metabolomic data. My code is shown below:

library(OmicsNetR)
rm(list = ls()) # Clear .GlobalEnv of your R session

# Initiate dataset object. Always do this beforehand
dataSet <- Init.Data()

#  Prepare dataset (this is a small subset)

dataSet <- PrepareInputList(dataSet, 
"#Uniprot logFC
A0A096MIV5 0.109442807
A0A096MIW7 -0.060478153
A0A096MIX1 -0.583380627
A0A096MIX2 0.019019237
A0A096MIZ1 -0.195203233", 
"rno", "protein", "uniprot")

dataSet <- PrepareInputList(dataSet,  
"#KEGG logFC
C00003 -0.046093127
C00004 -0.195827259
C00006 -0.060922113
C00008 -0.149808082
C00009 0.026376618 
C00010 -0.13299999",
 "rno","met","kegg")
# Finding connections
dataSet <- QueryNet(dataSet, "met", "kegg", "protein")
dataSet  <- QueryNet(dataSet, "met", "kegg", "met")

When I get to the β€˜QueryNet’ stage, an error is returned that the webpage cannot be found:


R version 4.3.1 (2023-06-16 ucrt) -- "Beagle Scouts"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(OmicsNetR)
OmicsNetR 1.0.0 initialized Successfully !

> rm(list = ls()) # Clear .GlobalEnv of your R session
> 
> # Initiate dataset object. Always do this beforehand
> dataSet <- Init.Data()
A dataset has been initiated.
> 
> # Reading in data to be integrated
> prot <- read.csv("OmicsNet and OmicsAnalyst Files/OmicsNet_Prot.txt", sep = "\t", header = F)
> met <- read.csv("OmicsNet and OmicsAnalyst Files/OmicsNet_Met.txt", sep = "\t", header = F)
> 
> dataSet <- PrepareInputList(dataSet,
+                             prot,
+                             "rno",
+                             "protein",
+                             "uniprot")
Error in strsplit(geneIDs, "\r|\n|\r\n") : non-character argument
> ?PrepareInputList
> View(prot)
> library(OmicsNetR)
> rm(list = ls()) # Clear .GlobalEnv of your R session
> 
> # Initiate dataset object. Always do this beforehand
> dataSet <- Init.Data()
A dataset has been initiated.
> 
> # Reading in data to be integrated
> prot <- read.csv("OmicsNet and OmicsAnalyst Files/OmicsNet_Prot.txt", sep = "\t", header = F, stringsAsFactors = F)
> met <- read.csv("OmicsNet and OmicsAnalyst Files/OmicsNet_Met.txt", sep = "\t", header = F, stringsAsFactors = F)
> 
> dataSet <- PrepareInputList(dataSet,
+                             prot,
+                             "rno",
+                             "protein",
+                             "uniprot")
Error in strsplit(geneIDs, "\r|\n|\r\n") : non-character argument
> ?read.delim
> a <- "#Entrez  logFC
+ 4495  61.12
+ 4496  51.06
+ 4499  23.79
+ 6354  21.04
+ 6369  19.76"
> 
> library(tidyverse)
── Attaching core tidyverse packages ────────────────────────────────────────────────── tidyverse 2.0.0 ──
βœ” dplyr     1.1.2     βœ” readr     2.1.4
βœ” forcats   1.0.0     βœ” stringr   1.5.0
βœ” ggplot2   3.4.3     βœ” tibble    3.2.1
βœ” lubridate 1.9.2     βœ” tidyr     1.3.0
βœ” purrr     1.0.2     
── Conflicts ──────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
βœ– dplyr::filter() masks stats::filter()
βœ– dplyr::lag()    masks stats::lag()
β„Ή Use the conflicted package to force all conflicts to become errors
> ?format_delim
> a <- format_delim(prot, delim = "\t", na = "NA", appened = F, col_names = F)
Error in format_delim(prot, delim = "\t", na = "NA", appened = F, col_names = F) : 
  unused argument (appened = F)
> a <- format_delim(prot, delim = "\t", na = "NA", append = F, col_names = F)
> b <- "#Entrez  logFC
+ 4495  61.12
+ 4496  51.06
+ 4499  23.79
+ 6354  21.04
+ 6369  19.76"
> a <- format_delim(prot, delim = "\", na = "NA", append = F, col_names = F)
Error: unexpected numeric constant in "a <- format_delim(prot, delim = "\", na = "NA"
> a <- format_delim(prot, delim = "\n", na = "NA", append = F, col_names = F)
> a <- format_delim(prot, delim = "\n", na = "NA", append = F, col_names = T)
> a <- format_delim(prot, delim = "\n", na = "NA", append = F, col_names = F)
> a <- format_delim(prot, delim = " ", na = "NA", append = F, col_names = F)

Restarting R session...

> library(OmicsNetR)
OmicsNetR 1.0.0 initialized Successfully !

> rm(list = ls()) # Clear .GlobalEnv of your R session
> 
> # Initiate dataset object. Always do this beforehand
> dataSet <- Init.Data()
A dataset has been initiated.
> 
> # Reading in data to be integrated
> prot <- read.csv("OmicsNet and OmicsAnalyst Files/OmicsNet_Prot.txt", sep = "\t", header = F)
> prot <- format_delim(prot, delim = " ", na = "NA", appened = F, col_names = F)
Error in format_delim(prot, delim = " ", na = "NA", appened = F, col_names = F) : 
  could not find function "format_delim"

Restarting R session...

> library(tidyverse)
── Attaching core tidyverse packages ────────────────────────────────────────────────── tidyverse 2.0.0 ──
βœ” dplyr     1.1.2     βœ” readr     2.1.4
βœ” forcats   1.0.0     βœ” stringr   1.5.0
βœ” ggplot2   3.4.3     βœ” tibble    3.2.1
βœ” lubridate 1.9.2     βœ” tidyr     1.3.0
βœ” purrr     1.0.2     
── Conflicts ──────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
βœ– dplyr::filter() masks stats::filter()
βœ– dplyr::lag()    masks stats::lag()
β„Ή Use the conflicted package to force all conflicts to become errors
> library(OmicsNetR)
OmicsNetR 1.0.0 initialized Successfully !

> rm(list = ls()) # Clear .GlobalEnv of your R session
> 
> # Initiate dataset object. Always do this beforehand
> dataSet <- Init.Data()
A dataset has been initiated.
> 
> # Reading in data to be integrated
> prot <- read.csv("OmicsNet and OmicsAnalyst Files/OmicsNet_Prot.txt", sep = "\t", header = F)
> prot <- format_delim(prot, delim = " ", na = "NA", appened = F, col_names = F)
Error in format_delim(prot, delim = " ", na = "NA", appened = F, col_names = F) : 
  unused argument (appened = F)
> library(tidyverse)
> library(OmicsNetR)
> rm(list = ls()) # Clear .GlobalEnv of your R session
> 
> # Initiate dataset object. Always do this beforehand
> dataSet <- Init.Data()
A dataset has been initiated.
> 
> # Reading in data to be integrated
> prot <- read.csv("OmicsNet and OmicsAnalyst Files/OmicsNet_Prot.txt", sep = "\t", header = F)
> prot <- format_delim(prot, delim = " ", na = "NA", append = F, col_names = F)
> 
> met <- read.csv("OmicsNet and OmicsAnalyst Files/OmicsNet_Met.txt", sep = "\t", header = F)
> met <- format_delim(met, delim = " ", na = "NA", append = F, col_names = F)
> 
> dataSet <- PrepareInputList(dataSet, prot, "rno", "protein", "uniprot")
trying URL 'https://www.omicsnet.ca/OmicsNet/resources/data/rno/entrez_uniprot.rds'
Content type 'unknown' length 82917 bytes (80 KB)
downloaded 80 KB

Preparing input list with the type of protein completed.
> 
> dataSet <- PrepareInputList(dataSet, met, "rno","met","kegg")
trying URL 'https://www.omicsnet.ca/OmicsNet/resources/data/lib/compound_db.rds'
Content type 'unknown' length 671698 bytes (655 KB)
downloaded 655 KB

Preparing input list with the type of met completed.
> # Finding connections
> dataSet <- QueryNet(dataSet, "met", "kegg", "protein")
protein met kegg TRUE 900 inverse FALSE FALSE 
Loading required package: RJSONIO
Loading required package: RSQLite
trying URL 'https://www.xialab.ca/resources/sqlite/omicsnet_met.sqlite'
Error in download.file(DonwloadLink, sqlite_Path) : 
  cannot open URL 'https://www.xialab.ca/resources/sqlite/omicsnet_met.sqlite'
In addition: Warning messages:
1: In download.file(DonwloadLink, sqlite_Path) :
  downloaded length 0 != reported length 0
2: In download.file(DonwloadLink, sqlite_Path) :
  cannot open URL 'https://www.xialab.ca/resources/sqlite/omicsnet_met.sqlite': HTTP status was '404 Not Found'

I have also tired running the example date here; OmicsNet (specifically case 2) and a similar error is returned:

# Step 2. Map list of miRNA to the application
> dataSet<-PrepareInputList(dataSet,
+                           "hsa-mir-101-3p
+ hsa-mir-133b
+ hsa-mir-147a
+ hsa-mir-3140-3p
+ hsa-mir-361-5p
+ hsa-mir-510-5p", "hsa", "mir", "mir_id");
trying URL 'https://www.xialab.ca/resources/sqlite/mir2gene.sqlite'
Error in download.file(DonwloadLink, sqlite_Path) : 
  cannot open URL 'https://www.xialab.ca/resources/sqlite/mir2gene.sqlite'
In addition: Warning messages:
1: In download.file(DonwloadLink, sqlite_Path) :
  downloaded length 0 != reported length 0
2: In download.file(DonwloadLink, sqlite_Path) :
  cannot open URL 'https://www.xialab.ca/resources/sqlite/mir2gene.sqlite': HTTP status was '404 Not Found'

Is there any way that I can access the page?
Thanks.

Session Info:

R version 4.3.1 (2023-06-16 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default


locale:
[1] LC_COLLATE=English_Australia.utf8  LC_CTYPE=English_Australia.utf8   
[3] LC_MONETARY=English_Australia.utf8 LC_NUMERIC=C                      
[5] LC_TIME=English_Australia.utf8    

time zone: Australia/Sydney
tzcode source: internal

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

other attached packages:
 [1] RSQLite_2.3.1   RJSONIO_1.3-1.8 OmicsNetR_1.0.0 lubridate_1.9.2 forcats_1.0.0   stringr_1.5.0  
 [7] dplyr_1.1.2     purrr_1.0.2     readr_2.1.4     tidyr_1.3.0     tibble_3.2.1    ggplot2_3.4.3  
[13] tidyverse_2.0.0

loaded via a namespace (and not attached):
 [1] bit_4.0.5         gtable_0.3.4      crayon_1.5.2      compiler_4.3.1    tidyselect_1.2.0 
 [6] Rcpp_1.0.11       blob_1.2.4        parallel_4.3.1    scales_1.2.1      fastmap_1.1.1    
[11] R6_2.5.1          generics_0.1.3    Cairo_1.6-1       munsell_0.5.0     DBI_1.1.3        
[16] pillar_1.9.0      tzdb_0.4.0        rlang_1.1.1       utf8_1.2.3        cachem_1.0.8     
[21] stringi_1.7.12    bit64_4.0.5       memoise_2.0.1     timechange_0.2.0  cli_3.6.1        
[26] withr_2.5.0       magrittr_2.0.3    grid_4.3.1        vroom_1.6.3       rstudioapi_0.15.0
[31] hms_1.1.3         lifecycle_1.0.3   vctrs_0.6.3       glue_1.6.2        fansi_1.0.4      
[36] colorspace_2.1-0  tools_4.3.1       pkgconfig_2.0.3 

Seems the data files are relocated in recent update. I just put them back. You can try again.

Thanks Jeff,

The β€˜PrepareInputList’ function is working now for my data. However, when I run QueryNet, it returns error:

dataSet <- QueryNet(dataSet, "met", "kegg", "protein")
protein met kegg TRUE 900 inverse FALSE FALSE 
Loading required package: RJSONIO
Loading required package: RSQLite
trying URL 'https://www.xialab.ca/resources/sqlite/omicsnet_met.sqlite'
Content type 'unknown' length 23232512 bytes (22.2 MB)
downloaded 22.2 MB

Error: database disk image is malformed
In addition: Warning message:
Couldn't set synchronous mode: database disk image is malformed
Use `synchronous` = NULL to turn off this warning. 

Would this be an error on my end? I’ve tried googling the error and it appears it may have something to do with the SQL database.

I’ve also tried re-running the example 2 and the same error shows up:

# Step 2. Map list of miRNA to the application
> dataSet<-PrepareInputList(dataSet,
+                           "hsa-mir-101-3p
+ hsa-mir-133b
+ hsa-mir-147a
+ hsa-mir-3140-3p
+ hsa-mir-361-5p
+ hsa-mir-510-5p", "hsa", "mir", "mir_id")
Loading required package: RSQLite
Error: database disk image is malformed
In addition: Warning message:
Couldn't set synchronous mode: database disk image is malformed
Use `synchronous` = NULL to turn off this warning. 

Again my sessionInfo is below:

> sessionInfo()
R version 4.3.1 (2023-06-16 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default


locale:
[1] LC_COLLATE=English_Australia.utf8  LC_CTYPE=English_Australia.utf8   
[3] LC_MONETARY=English_Australia.utf8 LC_NUMERIC=C                      
[5] LC_TIME=English_Australia.utf8    

time zone: Australia/Sydney
tzcode source: internal

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

other attached packages:
[1] RSQLite_2.3.1   OmicsNetR_1.0.0

loaded via a namespace (and not attached):
 [1] bit_4.0.5         compiler_4.3.1    fastmap_1.1.1     cli_3.6.1         DBI_1.1.3        
 [6] tools_4.3.1       rstudioapi_0.15.0 memoise_2.0.1     Rcpp_1.0.11       bit64_4.0.5      
[11] vctrs_0.6.3       cachem_1.0.8      blob_1.2.4        Cairo_1.6-1       rlang_1.1.1      
Warning message:
call dbDisconnect() when finished working with a connection 

Thanks again,
deb

I just tested on my local (Mac OS with R 4.2.2), and the database is valid and functional. It could be related to your local environment (Windows OS or R packages, etc). Maybe others on the forum can help.

1 Like

Hey Jeff,
I also tried running the QueryNet function and it is not working. It seems that the link is unavailable.

> dataSet <- QueryNet(dataSet, "protein", "string", "protein")
protein protein string TRUE 900 direct FALSE FALSE 
Loading required package: RJSONIO
We are going to query the data table: hsa_string from ppi database..
Loading required package: RSQLite
trying URL 'https://www.xialab.ca/resources/sqlite/ppi.sqlite'
Error in download.file(DonwloadLink, sqlite_Path) : 
  cannot open URL 'https://www.xialab.ca/resources/sqlite/ppi.sqlite'
In addition: Warning messages:
1: In download.file(DonwloadLink, sqlite_Path) :
  downloaded length 0 != reported length 0
2: In download.file(DonwloadLink, sqlite_Path) :
  cannot open URL 'https://www.xialab.ca/resources/sqlite/ppi.sqlite': HTTP status was '404 Not Found'

I also tried the example available on the website but the error persists:

> dataSet<-PrepareInputList(dataSet,
+ "#Entrez  logFC
+ 4495  61.12
+ 4496  51.06
+ 4499  23.79
+ 6354  21.04
+ 6369  19.76", 
+ "hsa", "gene", "entrez");
trying URL 'https://www.omicsnet.ca/OmicsNet/resources/data/hsa/entrez.rds'
Content type 'unknown' length 686040 bytes (669 KB)
==================================================
downloaded 669 KB

Preparing input list with the type of gene completed.
> # Step 3. Identify interacting partners
> dataSet<-QueryNet(dataSet, "gene", "innate");
gene gene innate TRUE 900 direct FALSE FALSE 
We are going to query the data table: hsa_innate from ppi database..
trying URL 'https://www.xialab.ca/resources/sqlite/ppi.sqlite'
Error in download.file(DonwloadLink, sqlite_Path) : 
  cannot open URL 'https://www.xialab.ca/resources/sqlite/ppi.sqlite'
In addition: Warning messages:
1: In download.file(DonwloadLink, sqlite_Path) :
  downloaded length 0 != reported length 0
2: In download.file(DonwloadLink, sqlite_Path) :
  cannot open URL 'https://www.xialab.ca/resources/sqlite/ppi.sqlite': HTTP status was '404 Not Found'