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

subset.row not working #53

Open
fzhang12 opened this issue Sep 15, 2021 · 0 comments
Open

subset.row not working #53

fzhang12 opened this issue Sep 15, 2021 · 0 comments

Comments

@fzhang12
Copy link

Hello,

I had a problem with scvelo() when assigning subset.row.

    velo.out <- scvelo(scle.processing, sf.X = scle.processing$sizeFactor.X,
                       mode = "dynamical",
                       subset.row = if.geneSet,
                       use.dimred = "UMAP.X",
                       assay.X = "counts", assay.spliced = "spliced",
                       assay.unspliced = "unspliced",
                       use.theirs = TRUE)

I have different gene sets that I want to use for velocity calculation.
When use.theirs is set to TRUE, scvelo() neglects subset.row and generates identical results.
When use.theirs is set to FALSE, scvelo() reports following error:

Error in py_call_impl(callable, dots$args, dots$keywords) : 
  ValueError: output array is read-only

Detailed traceback:
  File "$HOME/Library/Caches/org.R-project.R/R/basilisk/1.4.0/velociraptor/1.2.0/env/lib/python3.7/site-packages/scvelo/preprocessing/moments.py", line 58, in moments
    normalize_per_cell(adata)
  File "$HOME/Library/Caches/org.R-project.R/R/basilisk/1.4.0/velociraptor/1.2.0/env/lib/python3.7/site-packages/scvelo/preprocessing/utils.py", line 679, in normalize_per_cell
    X /= np.array(counts[:, None])
Calls: scvelo ... <Anonymous> -> do.call -> <Anonymous> -> py_call_impl
Execution halted

Do you have any idea what went wrong? Thank you very much!

Best regards

`sessionInfo()`
> sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRblas.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
 [1] velociraptor_1.2.0          scater_1.20.1              
 [3] ggplot2_3.3.5               scuttle_1.2.1              
 [5] LoomExperiment_1.10.1       BiocIO_1.2.0               
 [7] rhdf5_2.36.0                SingleCellExperiment_1.14.1
 [9] SummarizedExperiment_1.22.0 Biobase_2.52.0             
[11] GenomicRanges_1.44.0        GenomeInfoDb_1.28.4        
[13] IRanges_2.26.0              MatrixGenerics_1.4.3       
[15] matrixStats_0.60.1          S4Vectors_0.30.0           
[17] BiocGenerics_0.38.0         BiocParallel_1.26.2        

loaded via a namespace (and not attached):
 [1] viridis_0.6.1             edgeR_3.34.1             
 [3] BiocSingular_1.8.1        jsonlite_1.7.2           
 [5] viridisLite_0.4.0         DelayedMatrixStats_1.14.3
 [7] assertthat_0.2.1          statmod_1.4.36           
 [9] dqrng_0.3.0               GenomeInfoDbData_1.2.6   
[11] vipor_0.4.5               pillar_1.6.2             
[13] lattice_0.20-44           limma_3.48.3             
[15] glue_1.4.2                beachmat_2.8.1           
[17] reticulate_1.20           XVector_0.32.0           
[19] colorspace_2.0-2          Matrix_1.3-4             
[21] pkgconfig_2.0.3           zellkonverter_1.2.1      
[23] dir.expiry_1.0.0          zlibbioc_1.38.0          
[25] purrr_0.3.4               scales_1.1.1             
[27] ScaledMatrix_1.0.0        HDF5Array_1.20.0         
[29] batchelor_1.8.1           ResidualMatrix_1.2.0     
[31] tibble_3.1.4              generics_0.1.0           
[33] ellipsis_0.3.2            withr_2.4.2              
[35] magrittr_2.0.1            crayon_1.4.1             
[37] fansi_0.5.0               bluster_1.2.1            
[39] beeswarm_0.4.0            tools_4.1.0              
[41] lifecycle_1.0.0           basilisk.utils_1.4.0     
[43] stringr_1.4.0             Rhdf5lib_1.14.2          
[45] locfit_1.5-9.4            munsell_0.5.0            
[47] cluster_2.1.2             DelayedArray_0.18.0      
[49] irlba_2.3.3               compiler_4.1.0           
[51] rsvd_1.0.5                rlang_0.4.11             
[53] grid_4.1.0                RCurl_1.98-1.4           
[55] rhdf5filters_1.4.0        BiocNeighbors_1.10.0     
[57] igraph_1.2.6              bitops_1.0-7             
[59] basilisk_1.4.0            gtable_0.3.0             
[61] DBI_1.1.1                 R6_2.5.1                 
[63] gridExtra_2.3             dplyr_1.0.7              
[65] utf8_1.2.2                filelock_1.0.2           
[67] metapod_1.0.0             stringi_1.7.4            
[69] ggbeeswarm_0.6.0          Rcpp_1.0.7               
[71] scran_1.20.1              vctrs_0.3.8              
[73] png_0.1-7                 tidyselect_1.1.1         
[75] sparseMatrixStats_1.4.2  
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

1 participant