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

Bug report: Running scROSHI returnError in data.frame(barcodes = names(ct.annot), cell.type = as.character(ct.annot),: arguments imply differing number of rows #3

Open
JohannesGawron opened this issue Mar 8, 2024 · 1 comment

Comments

@JohannesGawron
Copy link

We I tried running the function scROSHI I get the above error.

Here's the exact command I ran:

scROSHI(sce_data = sce,
        celltype_lists = marker_list,
        type_config = config,
        gene_symbol = 'X',
        count_data = 'dsb_no_iso',
        verbose = 1
        )

My singleCellExperiment objects looks like this:

class: SingleCellExperiment 
dim: 45 3769 
metadata(2): libraryName assayMetadata
assays(5): counts clrc clrb dsb dsb_no_iso
rownames: NULL
rowData names(1): X
colnames: NULL
colData names(2): Sample Cell_Barcode
reducedDimNames(1): PCA
mainExpName: NULL
altExpNames(0):
R version 4.3.1 (2023-06-16)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.3.1

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

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

time zone: Europe/Zurich
tzcode source: internal

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

other attached packages:
 [1] scROSHI_1.0.0.0             umap_0.2.10.0               SingleCellExperiment_1.22.0 SummarizedExperiment_1.30.2 Biobase_2.60.0              GenomicRanges_1.52.1        GenomeInfoDb_1.36.4        
 [8] IRanges_2.34.1              S4Vectors_0.38.2            BiocGenerics_0.46.0         MatrixGenerics_1.12.3       matrixStats_1.2.0           rhdf5_2.44.0                lubridate_1.9.3            
[15] forcats_1.0.0               stringr_1.5.1               dplyr_1.1.4                 purrr_1.0.2                 readr_2.1.5                 tidyr_1.3.1                 tibble_3.2.1               
[22] ggplot2_3.5.0               tidyverse_2.0.0             Rcpp_1.0.12                

loaded via a namespace (and not attached):
 [1] gtable_0.3.4            xfun_0.42               lattice_0.21-8          tzdb_0.4.0              rhdf5filters_1.12.1     vctrs_0.6.5             tools_4.3.1             bitops_1.0-7            generics_0.1.3         
[10] parallel_4.3.1          fansi_1.0.6             pkgconfig_2.0.3         Matrix_1.6-5            lifecycle_1.0.4         GenomeInfoDbData_1.2.10 FNN_1.1.4               compiler_4.3.1          farver_2.1.1           
[19] munsell_0.5.0           htmltools_0.5.7         RCurl_1.98-1.14         yaml_2.3.8              pillar_1.9.0            crayon_1.5.2            uwot_0.1.16             openssl_2.1.1           limma_3.56.2           
[28] DelayedArray_0.26.7     abind_1.4-5             RSpectra_0.16-1         tidyselect_1.2.0        digest_0.6.34           stringi_1.8.3           labeling_0.4.3          fastmap_1.1.1           grid_4.3.1             
[37] colorspace_2.1-0        cli_3.6.2               magrittr_2.0.3          S4Arrays_1.0.6          utf8_1.2.4              withr_3.0.0             scales_1.3.0            bit64_4.0.5             timechange_0.3.0       
[46] rmarkdown_2.26          XVector_0.40.0          igraph_2.0.2            bit_4.0.5               reticulate_1.35.0       png_0.1-8               askpass_1.2.0           hms_1.1.3               evaluate_0.23          
[55] knitr_1.45              irlba_2.3.5.1           rlang_1.1.3             glue_1.7.0              pkgload_1.3.4           jsonlite_1.8.8          rstudioapi_0.15.0       vroom_1.6.5             R6_2.5.1               
[64] Rhdf5lib_1.22.1         zlibbioc_1.46.0
@JohannesGawron
Copy link
Author

It seems the issue is in the function f_score_ctgenes_U:
The line colnames(mat) <- sce$barcodes assumes that the colData of the input singleCellExperiment-object has a column named "barcodes".
May I suggest to either state this in the documentation, or to enable the user to pass an argument that specifies the name of the barcodes-column?

Also, it would be nice to have a more verbose error output.

Thanks a lot and best,
Johannes

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