loadTableData function from RCy3 returns "Failed to load data: Provided key columns do not contain any matches"
0
0
Entering edit mode
Emilia ▴ 40
@emiliabaffo
Last seen 3.5 years ago
Argentina, Rosario (Universidad Naciona…

Hello! I was looking for a way to access a pathway in WikiPathways and to color some genes according to the log2FC I got from a differential expression analysis (much like pathview does with KEGG pathways, except the pathway I was looking for didn't appear exactly as I need it in KEGG but it did in WikiPathways). I ran into this https://bioconductor.org/packages/release/bioc/vignettes/rWikiPathways/inst/doc/Pathway-Analysis.html#6_Visualize, which explains how to do it using rWikiPathways to access the pathway and RCy3 to access Cytoscape from R. I already had a differential expression analysis performed, which looked like this

head(DEanalysis)
Genes logFC logCPM    LR   PValue      FDR ENTREZID
  <chr> <dbl>  <dbl> <dbl>    <dbl>    <dbl> <chr>   
1 NAT2  -2.43  3.36   90.2 2.11e-21 1.10e-20 10      
2 ABAT  -1.05  8.23   41.1 1.44e-10 3.07e-10 18      
3 ABCA2  1.01  6.02   39.3 3.60e-10 7.43e-10 20      
4 ABCA3  2.29  3.19   65.0 7.31e-16 2.36e-15 21      
5 ABCA4  2.27  0.858  61.0 5.64e-15 1.69e-14 24      
6 ABL1   1.12  5.37   67.9 1.76e-16 5.96e-16 25

I followed the instructions I found on the link I put above

cytoscapePing()
RCy3::commandsRun('wikipathways import-as-pathway id=WP1403')

So far so good, I was able to see my pathway of interest on Cytoscape. But then when I tried to reproduce the next command:

loadTableData(
  DEanalysis,
  data.key.column = "ENTREZID",
  table = "node",
  table.key.column = "XrefId",
  namespace = "default",
  network = "current")
#i got this error
Failed to load data: Provided key columns do not contain any matches

I got the arguments for the loadTableData from here https://rdrr.io/bioc/RCy3/man/loadTableData.html. I used "XrefId" as the table.key.column because when I go to the node table in Cytoscape, that's the column where I find that genes are in Entrez format. I manually checked to see if there were some genes in common between my EntrezID column and the XrefId column in order to rule out the possibility that there were indeed no matches, but some Entrez ID's appear in both. So what could the problem be? What am I doing wrong? I only started using the rWikiPathways/RCy3 packages today so I'm probably just not understanding something but I can't tell why, I already looked it up on the internet but I couldn't figure it out. Thanks in advance!

sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=Spanish_Argentina.1252  LC_CTYPE=Spanish_Argentina.1252   
[3] LC_MONETARY=Spanish_Argentina.1252 LC_NUMERIC=C                      
[5] LC_TIME=Spanish_Argentina.1252    

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

other attached packages:
 [1] RCy3_2.10.2            rWikiPathways_1.10.0   DOSE_3.16.0            enrichplot_1.10.1     
 [5] pathview_1.30.0        DO.db_2.9              KEGG.db_3.2.4          KEGGprofile_1.32.0    
 [9] org.Hs.eg.db_3.12.0    AnnotationDbi_1.52.0   IRanges_2.24.0         S4Vectors_0.28.0      
[13] Biobase_2.50.0         BiocGenerics_0.36.0    clusterProfiler_3.18.0 TCGAbiolinks_2.18.0   
[17] BiocManager_1.30.10    ggthemes_4.2.0         survival_3.2-7         survminer_0.4.8       
[21] ggpubr_0.4.0           ggplot2_3.3.2          xlsx_0.6.5             tidyr_1.1.2           
[25] readxl_1.3.1           dplyr_1.0.2           

loaded via a namespace (and not attached):
  [1] shadowtext_0.0.7            backports_1.2.0             fastmatch_1.1-0            
  [4] BiocFileCache_1.14.0        plyr_1.8.6                  igraph_1.2.6               
  [7] splines_4.0.3               BiocParallel_1.24.1         GenomeInfoDb_1.26.1        
 [10] digest_0.6.27               GOSemSim_2.16.1             viridis_0.5.1              
 [13] GO.db_3.12.1                fansi_0.4.1                 magrittr_2.0.1             
 [16] memoise_1.1.0               openxlsx_4.2.3              Biostrings_2.58.0          
 [19] readr_1.4.0                 graphlayouts_0.7.1          matrixStats_0.57.0         
 [22] R.utils_2.10.1              askpass_1.1                 prettyunits_1.1.1          
 [25] colorspace_2.0-0            blob_1.2.1                  rvest_0.3.6                
 [28] rappdirs_0.3.1              ggrepel_0.8.2               haven_2.3.1                
 [31] xfun_0.19                   crayon_1.3.4                RCurl_1.98-1.2             
 [34] jsonlite_1.7.1              graph_1.68.0                scatterpie_0.1.5           
 [37] zoo_1.8-8                   glue_1.4.2                  polyclip_1.10-0            
 [40] gtable_0.3.0                zlibbioc_1.36.0             XVector_0.30.0             
 [43] DelayedArray_0.16.0         car_3.0-10                  Rgraphviz_2.34.0           
 [46] abind_1.4-5                 scales_1.1.1                DBI_1.1.0                  
 [49] rstatix_0.6.0               Rcpp_1.0.5                  viridisLite_0.3.0          
 [52] xtable_1.8-4                progress_1.2.2              foreign_0.8-80             
 [55] bit_4.0.4                   km.ci_0.5-2                 httr_1.4.2                 
 [58] fgsea_1.16.0                RColorBrewer_1.1-2          ellipsis_0.3.1             
 [61] pkgconfig_2.0.3             XML_3.99-0.5                rJava_0.9-13               
 [64] R.methodsS3_1.8.1           farver_2.0.3                dbplyr_2.0.0               
 [67] utf8_1.1.4                  RJSONIO_1.3-1.4             tidyselect_1.1.0           
 [70] rlang_0.4.8                 reshape2_1.4.4              TeachingDemos_2.12         
 [73] munsell_0.5.0               cellranger_1.1.0            tools_4.0.3                
 [76] cli_2.2.0                   downloader_0.4              generics_0.1.0             
 [79] RSQLite_2.2.1               broom_0.7.2                 stringr_1.4.0              
 [82] knitr_1.30                  bit64_4.0.5                 tidygraph_1.2.0            
 [85] zip_2.1.1                   survMisc_0.5.5              purrr_0.3.4                
 [88] KEGGREST_1.30.1             ggraph_2.0.4                R.oo_1.24.0                
 [91] KEGGgraph_1.50.0            xml2_1.3.2                  biomaRt_2.46.0             
 [94] compiler_4.0.3              rstudioapi_0.13             png_0.1-7                  
 [97] curl_4.3                    ggsignif_0.6.0              tibble_3.0.4               
[100] tweenr_1.0.1                stringi_1.5.3               TCGAbiolinksGUI.data_1.10.0
[103] forcats_0.5.0               lattice_0.20-41             Matrix_1.2-18              
[106] KMsurv_0.1-5                vctrs_0.3.5                 pillar_1.4.7               
[109] lifecycle_0.2.0             data.table_1.13.2           cowplot_1.1.0              
[112] bitops_1.0-6                GenomicRanges_1.42.0        qvalue_2.22.0              
[115] R6_2.5.0                    gridExtra_2.3               rio_0.5.16                 
[118] MASS_7.3-53                 assertthat_0.2.1            SummarizedExperiment_1.20.0
[121] xlsxjars_0.6.1              rjson_0.2.20                openssl_1.4.3              
[124] withr_2.3.0                 GenomeInfoDbData_1.2.4      hms_0.5.3                  
[127] grid_4.0.3                  rvcheck_0.1.8               MatrixGenerics_1.2.0       
[130] carData_3.0-4               ggforce_0.3.2               tinytex_0.27
Cytoscape Pathways Wikipathways rWikiPathways RCy3 • 1.5k views
ADD COMMENT
1
Entering edit mode

UPDATE: the problem was simply that the data set wasn't a data frame but rather a tibble. I ran as.data.frame(DEanalysis) before doing everything else and it worked. Just leaving it here in case someone in the future has the same problem :)

ADD REPLY
0
Entering edit mode

Good catch. I'll add this check and transformation to the method in the next version. Sorry for the hassle.

ADD REPLY
0
Entering edit mode

No problem! :)

ADD REPLY

Login before adding your answer.

Traffic: 925 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6