MarioniLab / scran

Clone of the Bioconductor repository for the scran package.
https://bioconductor.org/packages/devel/bioc/html/scran.html
40 stars 22 forks source link

findMarkers: Error in FUN(...) : class name has no 'package' attribute #30

Closed tobsecret closed 4 years ago

tobsecret commented 5 years ago

I am pretty new to R and have no idea why I am getting the error in the title of this issue. Below is my code:

library(scran) library(purrr) counts <- read.csv('data.csv', header=TRUE, sep=',') sampletypes <- unlist(map(strsplit(colnames(counts), '_'), {function(x) x[1]})) findMarkers(counts, sampletypes) Error in FUN(...) : class name has no 'package' attribute

I looked at one of the other issues and checked > BiocManager::valid() which gave me the following:

* sessionInfo()

R version 3.5.1 (2018-07-02)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.2 LTS

Matrix products: default
BLAS: /home/tobias/projects/aim1_mutational_signatures/envs/r_env/lib/R/lib/libRblas.so
LAPACK: /home/tobias/projects/aim1_mutational_signatures/envs/r_env/lib/R/lib/libRlapack.so

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

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

other attached packages:
 [1] purrr_0.3.0                 scran_1.10.2                SingleCellExperiment_1.4.1 
 [4] SummarizedExperiment_1.12.0 DelayedArray_0.8.0          matrixStats_0.54.0         
 [7] Biobase_2.42.0              GenomicRanges_1.34.0        GenomeInfoDb_1.18.1        
[10] IRanges_2.16.0              S4Vectors_0.20.1            BiocGenerics_0.28.0        
[13] BiocParallel_1.16.6         RevoUtils_11.0.1            RevoUtilsMath_11.0.0       

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.0               locfit_1.5-9.1           lattice_0.20-38         
 [4] assertthat_0.2.0         R6_2.3.0                 plyr_1.8.4              
 [7] dynamicTreeCut_1.63-1    ggplot2_3.1.0            pillar_1.3.1            
[10] zlibbioc_1.28.0          rlang_0.3.1              lazyeval_0.2.1          
[13] rstudioapi_0.9.0         Matrix_1.2-15            BiocNeighbors_1.0.0     
[16] statmod_1.4.30           stringr_1.4.0            igraph_1.2.3            
[19] RCurl_1.95-4.11          munsell_0.5.0            HDF5Array_1.10.1        
[22] compiler_3.5.1           vipor_0.4.5              pkgconfig_2.0.2         
[25] ggbeeswarm_0.6.0         tidyselect_0.2.5         tibble_2.0.1            
[28] gridExtra_2.3            GenomeInfoDbData_1.2.0   edgeR_3.24.3            
[31] viridisLite_0.3.0        crayon_1.3.4             dplyr_0.7.8             
[34] bitops_1.0-6             grid_3.5.1               gtable_0.2.0            
[37] magrittr_1.5             scales_1.0.0             stringi_1.2.4           
[40] XVector_0.22.0           reshape2_1.4.3           viridis_0.5.1           
[43] bindrcpp_0.2.2           limma_3.38.3             scater_1.10.1           
[46] DelayedMatrixStats_1.4.0 Rhdf5lib_1.4.2           tools_3.5.1             
[49] glue_1.3.0               beeswarm_0.2.3           BiocVersion_3.8.0       
[52] yaml_2.2.0               colorspace_1.4-0         rhdf5_2.26.2            
[55] BiocManager_1.30.4       bindr_0.1.1             

Bioconductor version '3.8'

  * 1 packages out-of-date
  * 0 packages too new

create a valid installation with

  BiocManager::install("curl", update = TRUE, ask = FALSE)

more details: BiocManager::valid()$too_new, BiocManager::valid()$out_of_date

Warning messages:
1: In file(con, "r") :
  URL 'https://bioconductor.org/config.yaml': status was 'Problem with the SSL CA cert (path? access rights?)'
2: 1 packages out-of-date; 0 packages too new 
LTLA commented 5 years ago

Probably because counts is not a matrix? read.csv will produce a data.frame.

tobsecret commented 5 years ago

Ooooh, that makes sense! thanks for the quick reply!

wmacnair commented 4 years ago

I just had this same problem, and found this issue. Low priority, but is there a way of making the error message more helpful? As it stands, it's one of the more obscure errors I've seen in R...

Thanks!

LTLA commented 4 years ago

Hm. Will probably have to dig into beachmat's code to insert a better error message...

LTLA commented 4 years ago

This should be fixed in beachmat 2.2.1 and 2.3.1; once those make their way through the BioC build system, you will get the improved error message the next time you reinstall scran.