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

getCrispraiScores: pandas import error #13

Open
peteratfunction opened this issue Jan 30, 2024 · 6 comments
Open

getCrispraiScores: pandas import error #13

peteratfunction opened this issue Jan 30, 2024 · 6 comments
Assignees

Comments

@peteratfunction
Copy link

I am trying to run getCrispraiScores using the vignette example, but run into the following error.

Docker install:

sudo docker run --rm -ti -p 8788:8787 -v $(pwd):/guide_design -e DISABLE_AUTH=true -e ROOT=true bioconductor/bioconductor_docker:devel

R:

BiocManager::install(version="devel")
BiocManager::install("crisprScore")

library(crisprScore)

results <- getCrispraiScores(tss_df=tssExampleCrispri,
                             sgrna_df=sgrnaExampleCrispri,
                             modality="CRISPRi",
                             fastaFile="input/hg38/fasta/hg38.fa",
                             chromatinFiles=c(mnase="input/hg38/bigwig/crispria_mnase_human_K562_hg38.bigWig",
                                              dnase="input/hg38/bigwig/crispria_dnase_human_K562_hg38.bigWig",
                                              faire="input/hg38/bigwig/crispria_faire_human_K562_hg38.bigWig"))

R output:

Traceback (most recent call last):
  File "/usr/local/lib/R/site-library/crisprScore/python/crisprai/getWeissmanScores.py", line 7, in <module>
    from sgRNA_learning import *
  File "/usr/local/lib/R/site-library/crisprScore/python/crisprai/sgRNA_learning.py", line 8, in <module>
    import pandas as pd
  File "/home/rstudio/.cache/R/basilisk/1.15.3/crisprScore/1.7.2/crisprai_basilisk/lib/python2.7/site-packages/pandas/__init__.py", line 7, in <module>
    from . import hashtable, tslib, lib
  File "pandas/tslib.pyx", line 2839, in init pandas.tslib (pandas/tslib.c:80041)
  File "pandas/algos.pyx", line 64, in init pandas.algos (pandas/algos.c:180213)
ImportError: /home/rstudio/.cache/R/basilisk/1.15.3/crisprScore/1.7.2/crisprai_basilisk/lib/python2.7/site-packages/pandas/lib.so: undefined symbol: is_float_object
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
  cannot open file '/tmp/RtmpzFOk0q/scores.txt': No such file or directory

sessionInfo

> sessionInfo()
R Under development (unstable) (2024-01-23 r85822)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 22.04.3 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so;  LAPACK version 3.10.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

time zone: Etc/UTC
tzcode source: system (glibc)

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

other attached packages:
[1] crisprScore_1.7.2     crisprScoreData_1.7.0 ExperimentHub_2.11.1  AnnotationHub_3.11.1  BiocFileCache_2.11.1  dbplyr_2.4.0         
[7] BiocGenerics_0.49.1  

loaded via a namespace (and not attached):
 [1] KEGGREST_1.43.0         dir.expiry_1.11.0       Biobase_2.63.0          lattice_0.22-5          vctrs_0.6.5            
 [6] tools_4.4.0             bitops_1.0-7            generics_0.1.3          stats4_4.4.0            curl_5.2.0             
[11] parallel_4.4.0          tibble_3.2.1            fansi_1.0.6             AnnotationDbi_1.65.2    RSQLite_2.3.5          
[16] blob_1.2.4              pkgconfig_2.0.3         Matrix_1.6-5            S4Vectors_0.41.3        lifecycle_1.0.4        
[21] GenomeInfoDbData_1.2.11 compiler_4.4.0          stringr_1.5.1           Biostrings_2.71.2       GenomeInfoDb_1.39.5    
[26] RCurl_1.98-1.14         yaml_2.3.8              pillar_1.9.0            crayon_1.5.2            cachem_1.0.8           
[31] mime_0.12               basilisk_1.15.3         tidyselect_1.2.0        stringi_1.8.3           dplyr_1.1.4            
[36] purrr_1.0.2             BiocVersion_3.19.1      fastmap_1.1.1           grid_4.4.0              cli_3.6.2              
[41] magrittr_2.0.3          randomForest_4.7-1.1    utf8_1.2.4              withr_3.0.0             filelock_1.0.3         
[46] rappdirs_0.3.3          bit64_4.0.5             XVector_0.43.1          httr_1.4.7              bit_4.0.5              
[51] reticulate_1.34.0       png_0.1-8               memoise_2.0.1           IRanges_2.37.1          basilisk.utils_1.15.1  
[56] rlang_1.1.3             Rcpp_1.0.12             glue_1.7.0              DBI_1.2.1               BiocManager_1.30.22    
[61] rstudioapi_0.15.0       jsonlite_1.8.8          R6_2.5.1                zlibbioc_1.49.0     
@Jfortin1 Jfortin1 self-assigned this Feb 1, 2024
@Jfortin1 Jfortin1 added bug Something isn't working python error labels Feb 1, 2024
@Jfortin1
Copy link
Member

Jfortin1 commented Feb 1, 2024

Hi @peteratfunction, looking at it now

@Jfortin1 Jfortin1 removed the bug Something isn't working label Feb 2, 2024
@peteratfunction
Copy link
Author

Just checking up on this and to ask if there is any testing I can do to help identify the source of the problem?

@jcjimbo
Copy link

jcjimbo commented Jun 13, 2024

To follow up on this I'm having the same issue, is there any update?

@jnhutchinson-diamondage
Copy link

Having the same issue running the command from the dockerfile.

@Jfortin1
Copy link
Member

@jcjimbo @peteratfunction We had fixed a couple of things in crisprScore to support code that was written in Python 2.7.
The latest version (1.9.1) should work

@jcjimbo
Copy link

jcjimbo commented Jul 19, 2024

Many thanks for the reply and addressing the issue.

I managed to get it running initally with an error:

Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 'query': failed to connect reason: lazy-load database '/Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/library/yaml/R/yaml.rdb' is corrupt Consider rerunning with 'localHub=TRUE'

Upon an R session refesh the error is now:

snapshotDate(): 2024-07-16 see ?crisprScoreData and browseVignettes('crisprScoreData') for documentation loading from cache Traceback (most recent call last): File "/Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/library/crisprScore/python/crisprai/getWeissmanScores.py", line 105, in <module> scores = predictWeissmanScore(tssTable, p1p2Table, sgrnaTable, libraryTable, pickleFile, fastaFile, chromatinFiles, modality, verbose) File "/Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/library/crisprScore/python/crisprai/getWeissmanScores.py", line 26, in predictWeissmanScore paramTable = getParamTable(tssTable, p1p2Table, sgrnaTable, libraryTable, fastaFile, chromatinFiles, verbose) File "/Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/library/crisprScore/python/crisprai/getWeissmanScores.py", line 61, in getParamTable raise Exception('Error generating parameter table.') Exception: Error generating parameter table. Error in file(file, "rt") : cannot open the connection In addition: Warning message: In file(file, "rt") : cannot open file '/var/folders/vm/gdslj1hs0w1dj_wdlp589w700000gn/T//RtmpRJYKQ8/scores.txt': No such file or directory

So I am unsure how to get it running from now, do you have any suggestions?

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

No branches or pull requests

4 participants