BaderLab / CellAnnotationTutorial

Accompanying code for the tutorial: Annotating single cell transcriptomic maps using automated and manual methods
MIT License
88 stars 25 forks source link

Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, : line 1 did not have 2 elements #4

Closed felixm3 closed 1 year ago

felixm3 commented 1 year ago

Hello,

Running the following code:


# Get enriched pathways through cerebro
query_seur <- cerebroApp::getEnrichedPathways(query_seur,
                                              databases = c("GO_Biological_Process_2018",
                                                            "GO_Cellular_Component_2018",
                                                            "GO_Molecular_Function_2018",
                                                            "KEGG_2016",
                                                            "WikiPathways_2016",
                                                            "Reactome_2016",
                                                            "Panther_2016",
                                                            "Human_Gene_Atlas",
                                                            "Mouse_Gene_Atlas"),
                                              adj_p_cutoff = 0.05,
                                              max_terms = 100,
                                              URL_API = "http://amp.pharm.mssm.edu/Enrichr/enrich")

results in:


[17:28:41] Found 1 groups: seurat_clusters
[17:28:41] Get enriched pathways for group `seurat_clusters`...
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 1 did not have 2 elements
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 1 did not have 2 elements
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 1 did not have 2 elements
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 1 did not have 2 elements
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 1 did not have 2 elements
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 1 did not have 2 elements
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 1 did not have 2 elements
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 1 did not have 2 elements
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 1 did not have 2 elements
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 1 did not have 2 elements
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 1 did not have 2 elements
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 1 did not have 2 elements
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 1 did not have 2 elements
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 1 did not have 2 elements
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 1 did not have 2 elements
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 1 did not have 2 elements
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 1 did not have 2 elements
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 1 did not have 2 elements
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 1 did not have 2 elements
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 1 did not have 2 elements
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 1 did not have 2 elements
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 1 did not have 2 elements
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 1 did not have 2 elements
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 1 did not have 2 elements
[17:28:43] Data returned by Enrichr for subgroup `0` of group `seurat_clusters`, does not appear to be in the right format. Will proceed with next subgroup.
[17:28:44] Data returned by Enrichr for subgroup `1` of group `seurat_clusters`, does not appear to be in the right format. Will proceed with next subgroup.
[17:28:46] Data returned by Enrichr for subgroup `2` of group `seurat_clusters`, does not appear to be in the right format. Will proceed with next subgroup.
[17:28:47] Data returned by Enrichr for subgroup `3` of group `seurat_clusters`, does not appear to be in the right format. Will proceed with next subgroup.
[17:28:49] Data returned by Enrichr for subgroup `4` of group `seurat_clusters`, does not appear to be in the right format. Will proceed with next subgroup.
[17:28:51] Data returned by Enrichr for subgroup `5` of group `seurat_clusters`, does not appear to be in the right format. Will proceed with next subgroup.
[17:28:52] Data returned by Enrichr for subgroup `6` of group `seurat_clusters`, does not appear to be in the right format. Will proceed with next subgroup.
[17:28:54] Data returned by Enrichr for subgroup `7` of group `seurat_clusters`, does not appear to be in the right format. Will proceed with next subgroup.
[17:28:54] 0 pathways passed the threshold across all group levels and databases for group `seurat_clusters`

Kindly assist

14zac2 commented 1 year ago

Hi @felixm3 - I tried to recreate your error but couldn't, so I'm not sure exactly what's happening here. One thing that is consistent is that you're getting formatting errors, so I would make sure that your data are in the expected input format. Make sure that you first run getMarkerGenes() as such:

query_seur <- getMarkerGenes(query_seur,
                      assay = "originalexp",
                      organism = "hg",
                      groups = "seurat_clusters")

This should fill query_seur@misc$marker_genes with marker gene information. Then run getEnrichedPathways() as you did.

Also check that query_seur$seurat_clusters is filled with cluster labels. See if any of this helps; if not, you may have more luck contacting Cerebro about this specific error.