cole-trapnell-lab / garnett

Automated cell type classification
MIT License
99 stars 24 forks source link

all cells are classified as UNKNOWN #58

Closed zh-zhang1984 closed 2 years ago

zh-zhang1984 commented 2 years ago

Hi, I run the following code and it reports warning message; How can I SOLVE the problem?

> monocleObj_sub <- monocleObj[,1:1000]
> monocleObj_sub <- classify_cells(monocleObj_sub, classifier,
+                                  db = org.Hs.eg.db,
+                                  cluster_extend = TRUE,
+                                  cds_gene_id_type = "SYMBOL")
<simpleError in stringr::str_replace_all(assignments$cell_type, "\\.1", ""): lazy-load database '/Library/Frameworks/R.framework/Versions/4.1/Resources/library/stringi/R/stringi.rdb' is corrupt>
<simpleError in stringr::str_replace_all(assignments$cell_type, "\\.1", ""): lazy-load database '/Library/Frameworks/R.framework/Versions/4.1/Resources/library/stringi/R/stringi.rdb' is corrupt>
Warning messages:
1: In doTryCatch(return(expr), name, parentenv, handler) :
  The following genes used in the classifier are not present in the input CDS. Interpret with caution. ENSG00000242485The following genes used in the classifier are not present in the input CDS. Interpret with caution. ENSG00000157873The following genes used in the classifier are not present in the input CDS. Interpret with caution. ENSG00000157191The following genes used in the classifier are not present in the input CDS. Interpret with caution. ENSG00000127483The following genes used in the classifier are not present in the input CDS. Interpret with caution. ENSG00000142765The following genes used in the classifier are not present in the input CDS. Interpret with caution. ENSG00000163875The following genes used in the classifier are not present in the input CDS. Interpret with caution. ENSG00000117410The following genes used in the classifier are not present in the input CDS. Interpret with caution. ENSG00000143106The following genes used in the classifier are not present in the input  [... truncated]
2: In stringr::str_replace_all(assignments$cell_type, "\\.1", "") :
  restarting interrupted promise evaluation
3: In stringr::str_replace_all(assignments$cell_type, "\\.1", "") :
  internal error -3 in R_decompress1
4: In doTryCatch(return(expr), name, parentenv, handler) :
  The following genes used in the classifier are not present in the input CDS. Interpret with caution. ENSG00000010610
5: In stringr::str_replace_all(assignments$cell_type, "\\.1", "") :
  restarting interrupted promise evaluation
6: In stringr::str_replace_all(assignments$cell_type, "\\.1", "") :
  internal error -3 in R_decompress1
> monocleObj_sub
class: cell_data_set 
dim: 2000 1000 
metadata(0):
assays(3): logcounts scaledata counts
rownames(2000): DEFA3 HBB ... ZNF467 TRIM2
rowData names(0):
colnames(1000): AAACATCGAAACATCGCAATGGAA_1_1_1_1_1_1
  AAACATCGAAACATCGGACAGTGC_1_1_1_1_1_1 ...
  ACACGACCTGGAACAAACTATGCA_1_1_1_1_1_1
  ACACGACCTGGTGGTACCATCCTC_1_1_1_1_1_1
colData names(21): orig.ident nCount_RNA ... cell_type cluster_ext_type
reducedDimNames(2): PCA UMAP
mainExpName: integrated
altExpNames(0):
> table(pData(monocleObj_sub)$cell_type)

Unknown 
   1000 
hpliner commented 2 years ago

Hello, apologies for the delay.

Looks to me from the warnings like there's some issue with your package loading (the internal error warnings) that might be contributing to the issue. As a start, I would recommend restarting your session (and perhaps reinstalling stringr) and see if that helps. It also looks to me like perhaps you don't have your rowData set up? Take a look at rowData(cds) and be sure that the rownames correspond with the gene names of your expression matrix

hpliner commented 2 years ago

I'm going to go ahead an close, reopen if you have further issues