CreatSeuratObject command issue
1
0
Entering edit mode
17 months ago
sandy • 0

Hello everyone,

I am trying to create an object on R, however the system says

Error in CreatSeuratObject(counts = p1, min.features = 200, min.cells = 3,  : 
  could not find function "CreatSeuratObject". 

My code is:

p1<-CreatSeuratObject(counts = p1, min.features = 200, min.cells = 3, project='panc_health')

Session info:
locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] ggthemes_4.2.4     RColorBrewer_1.1-3 patchwork_1.1.2    ggplot2_3.3.6     
 [5] Matrix_1.5-1       cowplot_1.1.1      sp_1.5-0           SeuratObject_4.1.2
 [9] Seurat_4.2.0       dplyr_1.0.10       readr_2.1.3       

loaded via a namespace (and not attached):
  [1] Rtsne_0.16            colorspace_2.0-3      deldir_1.0-6         
  [4] ellipsis_0.3.2        ggridges_0.5.4        spatstat.data_3.0-0  
  [7] leiden_0.4.3          listenv_0.8.0         ggrepel_0.9.1        
 [10] bit64_4.0.5           fansi_1.0.3           codetools_0.2-18     
 [13] splines_4.0.5         polyclip_1.10-4       jsonlite_1.8.3       
 [16] ica_1.0-3             cluster_2.1.3         png_0.1-7            
 [19] rgeos_0.5-9           uwot_0.1.14           shiny_1.7.3          
 [22] sctransform_0.3.5     spatstat.sparse_3.0-0 compiler_4.0.5       
 [25] httr_1.4.4            fastmap_1.1.0         lazyeval_0.2.2       
 [28] cli_3.4.1             later_1.3.0           htmltools_0.5.3      
 [31] tools_4.0.5           igraph_1.3.5          gtable_0.3.1         
 [34] glue_1.6.2            RANN_2.6.1            reshape2_1.4.4       
 [37] Rcpp_1.0.9            scattermore_0.8       vctrs_0.5.0          
 [40] nlme_3.1-159          progressr_0.11.0      lmtest_0.9-40        
 [43] spatstat.random_2.2-0 stringr_1.4.1         globals_0.16.1       
 [46] mime_0.12             miniUI_0.1.1.1        lifecycle_1.0.3      
 [49] irlba_2.3.5.1         goftest_1.2-3         future_1.28.0        
 [52] MASS_7.3-58.1         zoo_1.8-11            scales_1.2.1         
 [55] spatstat.core_2.4-4   vroom_1.6.0           hms_1.1.2            
 [58] promises_1.2.0.1      spatstat.utils_3.0-1  parallel_4.0.5       
 [61] reticulate_1.26       pbapply_1.5-0         gridExtra_2.3        
 [64] rpart_4.1.16          stringi_1.7.8         rlang_1.0.6          
 [67] pkgconfig_2.0.3       matrixStats_0.62.0    lattice_0.20-45      
 [70] ROCR_1.0-11           purrr_0.3.5           tensor_1.5           
 [73] htmlwidgets_1.5.4     bit_4.0.4             tidyselect_1.2.0     
 [76] parallelly_1.32.1     RcppAnnoy_0.0.20      plyr_1.8.7           
 [79] magrittr_2.0.3        R6_2.5.1              generics_0.1.3       
 [82] pillar_1.8.1          withr_2.5.0           mgcv_1.8-40          
 [85] fitdistrplus_1.1-8    survival_3.4-0        abind_1.4-5          
 [88] tibble_3.1.8          future.apply_1.9.1    crayon_1.5.2         
 [91] KernSmooth_2.23-20    utf8_1.2.2            spatstat.geom_3.0-3  
 [94] plotly_4.10.0         tzdb_0.3.0            grid_4.0.5           
 [97] data.table_1.14.4     digest_0.6.30         xtable_1.8-4         
[100] tidyr_1.2.1           httpuv_1.6.6          munsell_0.5.0        
[103] viridisLite_0.4.1    
scrnq seq seurat R • 757 views
ADD COMMENT
1
Entering edit mode
17 months ago
M.O.L.S ▴ 100

CreateSeuratObject is a function. You have a typo in this as you are missing the e in create.

ADD COMMENT
0
Entering edit mode

Thank you so much. Problem solved!

I meet anther problem, and the R said: Error in UseMethod(generic = "as.sparse", object = x) : no applicable method for 'as.sparse' applied to an object of class "Seurat".

I used Read10X to read my features, matrix, and barcode.gz files. I wonder if you could know what should I do to fix this problem

ADD REPLY
0
Entering edit mode

You want to use as sparse method on a matrix but instead of using the matrix you are using it on p1. (Maybe). What is the variable name for the matrix?

ADD REPLY

Login before adding your answer.

Traffic: 1755 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6