bhklab / PharmacoGx

R package to analyze large-scale pharmacogenomic datasets.
http://pharmacodb.pmgenomics.ca
GNU General Public License v3.0
64 stars 26 forks source link

Error intersecting CCLE and CTRPv2 #53

Open soheilj opened 5 years ago

soheilj commented 5 years ago

The following command raises error! common <- intersectPSet(pSets=c(CCLE, CTRPv2), intersectOn="cell.lines") Error: Intersecting large PSets may take a long time ... Error in pSet@sensitivity$n[cells, drugs, drop = drop] : subscript out of bounds

p-smirnov commented 5 years ago

Interesting, likely an error in the CTRPv2 pSet. Will try to check out soon!

islic commented 3 years ago

Hello, I am having the same problem with intersecting CTRPv2 with either CCLE or GDSC1000 Psets. I tried intersecting on different parameters it still gives the same error. Any progress on finding out why this happens ?

ChristopherEeles commented 3 years ago

Hi @islic,

I will have a look into this tomorrow and see if I can diagnose the cause.

Best, Christopher Eeles

ChristopherEeles commented 3 years ago

Hi @islic,

I was unable to reproduce the issue:

BiocManager::install('PharmacoGx')
CTRPv2 <- downloadPSet('CTRPv2_2015')
CCLE <- downloadPSet('CCLE_2015')
common <- intersectPSet(pSets=list(CCLE, CTRPv2), intersectOn="cell.lines")
common2 <- intersectPSet(pSets=list(CCLE, CTRPv2), intersectOn="drugs")

Here is my sessionInfo:

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

Matrix products: default

locale:
[1] LC_COLLATE=English_Canada.1252  LC_CTYPE=English_Canada.1252    LC_MONETARY=English_Canada.1252
[4] LC_NUMERIC=C                    LC_TIME=English_Canada.1252    

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

other attached packages:
[1] PharmacoGx_2.2.4 CoreGx_1.2.0    

loaded via a namespace (and not attached):
  [1] NISTunits_1.0.1             spam_2.6-0                  fastmatch_1.1-0             sm_2.2-5.6                 
  [5] BiocFileCache_1.14.0        plyr_1.8.6                  igraph_1.2.6                shinydashboard_0.7.1       
  [9] splines_4.0.3               BiocParallel_1.24.1         SnowballC_0.7.0             GenomeInfoDb_1.26.4        
 [13] ggplot2_3.3.3               genefu_2.22.1               amap_0.8-18                 digest_0.6.27              
 [17] SuppDists_1.1-9.5           foreach_1.5.1               htmltools_0.5.1.1           switchBox_1.26.0           
 [21] fansi_0.4.2                 magrittr_2.0.1              memoise_2.0.0               cluster_2.1.1              
 [25] limma_3.46.0                recipes_0.1.15              gower_0.2.2                 celestial_1.4.6            
 [29] matrixStats_0.58.0          askpass_1.1                 piano_2.6.0                 CircStats_0.2-6            
 [33] prettyunits_1.1.1           colorspace_2.0-0            rappdirs_0.3.3              blob_1.2.1                 
 [37] xfun_0.21                   dplyr_1.0.4                 tcltk_4.0.3                 crayon_1.4.1               
 [41] RCurl_1.98-1.2              jsonlite_1.7.2              impute_1.64.0               survival_3.2-7             
 [45] iterators_1.0.13            glue_1.4.2                  gtable_0.3.0                PDATK_0.99.0               
 [49] iC10TrainingData_1.3.1      ipred_0.9-9                 zlibbioc_1.36.0             XVector_0.30.0             
 [53] AIMS_1.22.0                 DelayedArray_0.16.1         reportROC_3.5               BiocGenerics_0.36.0        
 [57] maps_3.3.0                  scales_1.1.1                DBI_1.1.1                   relations_0.6-9            
 [61] Rcpp_1.0.6                  plotrix_3.8-1               dtw_1.22-3                  pamr_1.56.1                
 [65] xtable_1.8-4                progress_1.2.2              mapproj_1.2.7               bit_4.0.4                  
 [69] proxy_0.4-24                mclust_5.4.7                dotCall64_1.0-1             stats4_4.0.3               
 [73] lava_1.6.9                  prodlim_2019.11.13          DT_0.17                     htmlwidgets_1.5.3          
 [77] httr_1.4.2                  fgsea_1.16.0                RColorBrewer_1.1-2          gplots_3.1.1               
 [81] ellipsis_0.3.1              iC10_1.5                    pkgconfig_2.0.3             XML_3.99-0.5               
 [85] dbplyr_2.1.0                nnet_7.3-15                 utf8_1.2.1                  caret_6.0-86               
 [89] tidyselect_1.1.0            rlang_0.4.10                reshape2_1.4.4              later_1.1.0.1              
 [93] AnnotationDbi_1.52.0        munsell_0.5.0               tools_4.0.3                 visNetwork_2.0.9           
 [97] cachem_1.0.4                downloader_0.4              generics_0.1.0              RSQLite_2.2.3              
[101] evaluate_0.14               stringr_1.4.0               fastmap_1.1.0               yaml_2.2.1                 
[105] bootstrap_2019.6            knitr_1.31                  ModelMetrics_1.2.2.2        verification_1.42          
[109] bit64_4.0.5                 caTools_1.18.1              RANN_2.6.1                  purrr_0.3.4                
[113] nlme_3.1-152                mime_0.10                   slam_0.1-48                 pracma_2.3.3               
[117] xml2_1.3.2                  biomaRt_2.46.3              compiler_4.0.3              curl_4.3                   
[121] e1071_1.7-4                 marray_1.68.0               tibble_3.0.6                stringi_1.5.3              
[125] fields_11.6                 lattice_0.20-41             Matrix_1.3-2                survcomp_1.41.1            
[129] shinyjs_2.0.0               survivalROC_1.0.3           vctrs_0.3.6                 pillar_1.5.1               
[133] lifecycle_1.0.0             BiocManager_1.30.10         magicaxis_2.2.1             data.table_1.13.6          
[137] bitops_1.0-6                httpuv_1.5.5                GenomicRanges_1.42.0        R6_2.5.0                   
[141] promises_1.2.0.1            KernSmooth_2.23-18          gridExtra_2.3               lsa_0.73.2                 
[145] IRanges_2.24.1              codetools_0.2-18            boot_1.3-27                 MASS_7.3-53.1              
[149] gtools_3.8.2                assertthat_0.2.1            SummarizedExperiment_1.20.0 openssl_1.4.3              
[153] withr_2.4.1                 S4Vectors_0.28.1            GenomeInfoDbData_1.2.4      parallel_4.0.3             
[157] hms_1.0.0                   grid_4.0.3                  rpart_4.1-15                timeDate_3043.102          
[161] class_7.3-18                rmarkdown_2.7               MatrixGenerics_1.2.1        sets_1.0-18                
[165] pROC_1.17.0.1               Biobase_2.50.0              shiny_1.6.0                 lubridate_1.7.9.2          
[169] rmeta_3.0

Could you please include the code you are running and your sessionInfo so I can help further?

Best, Chris

islic commented 3 years ago

Hello Chris, Thank you for your feedback . This is what I ran and the error , I tried intersecting on one and two variables the same error shows up. As you can see the function works when I intersect CCLE and GDSC but not when I try to intersect CTRP and GDSC. My sessionInfo is below as well. Thank you in advance GDSC<-downloadPSet(name="GDSC1000",saveDir ="C:/Users/iST/Desktop/pharmacoGX",pSetFileName = "GDSC_data") trying URL 'https://www.pmgenomics.ca/bhklab/sites/default/files/downloads/PSets.csv' Content type 'text/csv' length 1776 bytes downloaded 1776 bytes

CTRP<-downloadPSet(name="CTRPv2",saveDir = "C:/Users/iST/Desktop/pharmacoGX",pSetFileName = "CTRP_data") trying URL 'https://www.pmgenomics.ca/bhklab/sites/default/files/downloads/PSets.csv' Content type 'text/csv' length 1776 bytes downloaded 1776 bytes

common<-intersectPSet(list('CCLE'=CCLE,'GDSC'=GDSC),intersectOn ="drugs") Intersecting large PSets may take a long time ... common<-intersectPSet(list('CCLE'=CCLE,'GDSC'=GDSC),intersectOn =c("concentration","drugs")) Intersecting large PSets may take a long time ... View(common) common<-intersectPSet(list('CTRP'=CTRP,'GDSC'=GDSC),intersectOn =c("concentration","drugs")) Intersecting large PSets may take a long time ... Error in pSet@curation$tissue[cells, , drop = drop] : subscript out of bounds common<-intersectPSet(list('CTRP'=CTRP,'GDSC'=GDSC),intersectOn ="drugs") Intersecting large PSets may take a long time ... Error in pSet@curation$tissue[cells, , drop = drop] : subscript out of bounds sessionInfo() R version 3.6.1 (2019-07-05) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 17763)

Matrix products: default

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

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

other attached packages: [1] Biobase_2.46.0 BiocGenerics_0.32.0 PharmacoGx_1.17.1

loaded via a namespace (and not attached): [1] maps_3.3.0 jsonlite_1.7.1 gtools_3.8.2 sm_2.2-5.6
[5] shiny_1.5.0 slam_0.1-47 pillar_1.4.6 lattice_0.20-38
[9] glue_1.4.2 limma_3.42.2 downloader_0.4 digest_0.6.27
[13] RColorBrewer_1.1-2 promises_1.1.1 colorspace_2.0-0 htmltools_0.5.0
[17] httpuv_1.5.4 Matrix_1.2-17 plyr_1.8.6 lsa_0.73.2
[21] pkgconfig_2.0.3 magicaxis_2.0.10 purrr_0.3.4 xtable_1.8-4
[25] relations_0.6-9 scales_1.1.1 RANN_2.6.1 later_1.1.0.1
[29] BiocParallel_1.20.1 pracma_2.2.9 tibble_3.0.4 generics_0.1.0
[33] ggplot2_3.3.2 ellipsis_0.3.1 DT_0.16 shinyjs_2.0.0
[37] magrittr_1.5 crayon_1.3.4 mime_0.9 SnowballC_0.7.0
[41] MASS_7.3-53 gplots_3.1.0 shinydashboard_0.7.1 tools_3.6.1
[45] data.table_1.13.2 lifecycle_0.2.0 stringr_1.4.0 munsell_0.5.0
[49] cluster_2.1.0 plotrix_3.7-8 NISTunits_1.0.1 compiler_3.6.1
[53] caTools_1.18.0 rlang_0.4.8 grid_3.6.1 rstudioapi_0.13
[57] marray_1.64.0 htmlwidgets_1.5.2 visNetwork_2.0.9 igraph_1.2.6
[61] celestial_1.4.6 bitops_1.0-6 tcltk_3.6.1 gtable_0.3.0
[65] sets_1.0-18 reshape2_1.4.4 R6_2.5.0 gridExtra_2.3
[69] dplyr_1.0.2 fastmap_1.0.1 fastmatch_1.1-0 fgsea_1.12.0
[73] KernSmooth_2.23-15 stringi_1.4.6 Rcpp_1.0.5 vctrs_0.3.4
[77] mapproj_1.2.7 piano_2.2.0 tidyselect_1.1.0

ChristopherEeles commented 3 years ago

Hi @islic,

The version of R and PharmacoGx you are using are quite outdated.

Are you able to update to R 4.0.4 (https://cran.r-project.org/src/base/R-4/)?

If you do so and reinstall PharmacoGx, I expect your issue will disappear. We fixed it in a subsequent release.

Also, the newer PharmacoGx version uses downloadPSet to fetch the most up-to-date PSets from ORCESTRA. You can also manually download the most up-to-date PSets from the website I have linked.

Best, Chris