wguo-research / scCancer

A package for automated processing of single cell RNA-seq data in cancer
92 stars 39 forks source link

Error in eval(e, x, parent.frame()) : object 'Type' not found #13

Closed wiceshine closed 4 years ago

wiceshine commented 4 years ago

Dear developers,

Thank you for providing such a powerful and convenient tool for single-cell RNA-seq analysis. When I tried to run runScStatistics, it returned an error message Error in eval(e, x, parent.frame()) : object 'Type' not found after showing messeges:

[2020-05-09 08:24:31] START: RUN scStatistics
[2020-05-09 08:24:31] -----: data preparation

I am not quite sure what happened because that there are no more information for debug. It is possiblely due to the conflits of eval function? Since there are at least three eval functions in R as showed below: Help on topic 'eval' was found in the following packages:

Evaluate an (Unevaluated) Expression
(in package base in library /Library/Frameworks/R.framework/Resources/library)
Evaluate an (unevaluated) expression
(in package BiocGenerics in library /Users/bopeng/Library/R/3.6/library)
Vector objects (old man page)
(in package IRanges in library /Users/bopeng/Library/R/3.6/library)

Or for some other reasons? I attached all my script below for your information. Thank you very much for your great help!

## Loading libraries
library(DropletUtils)
library(scCancer)

## Create and set working directory 
dir.create("~/PB Lab Dropbox/Fudan University/Fudan/Manuscripts/2020/Microglia sequencing/Female Age/sc RNA-seq/Analysis by scCancer 20200509")
setwd("~/PB Lab Dropbox/Fudan University/Fudan/Manuscripts/2020/Microglia sequencing/Female Age/sc RNA-seq/Analysis by scCancer 20200509")

dir.create("~/PB Lab Dropbox/Fudan University/Fudan/Manuscripts/2020/Microglia sequencing/Female Age/sc RNA-seq/Analysis by scCancer 20200509/Female 03 MO")
dir.create("~/PB Lab Dropbox/Fudan University/Fudan/Manuscripts/2020/Microglia sequencing/Female Age/sc RNA-seq/Analysis by scCancer 20200509/Female 14 MO")
dir.create("~/PB Lab Dropbox/Fudan University/Fudan/Manuscripts/2020/Microglia sequencing/Female Age/sc RNA-seq/Analysis by scCancer 20200509/Female 24 MO")

female.03.savePath <- "~/PB Lab Dropbox/Fudan University/Fudan/Manuscripts/2020/Microglia sequencing/Female Age/sc RNA-seq/Analysis by scCancer 20200509/Female 03 MO"
female.14.savePath <- "~/PB Lab Dropbox/Fudan University/Fudan/Manuscripts/2020/Microglia sequencing/Female Age/sc RNA-seq/Analysis by scCancer 20200509/Female 14 MO"
female.24.savePath <- "~/PB Lab Dropbox/Fudan University/Fudan/Manuscripts/2020/Microglia sequencing/Female Age/sc RNA-seq/Analysis by scCancer 20200509/Female 24 MO"

## scStatistics
#  Paths containing the cell ranger processed data
female.03.dataPath <- "~/PB Lab Dropbox/Fudan University/SIAT/DATA/RNA_seq/2019/sc_RNA_seq/Aged microglia/Cellranger v2/F03_PBS_MG_outs"
female.14.dataPath <- "~/PB Lab Dropbox/Fudan University/SIAT/DATA/RNA_seq/2019/sc_RNA_seq/Aged microglia/Cellranger v2/F14_PBS_MG_outs"
female.24.dataPath <- "~/PB Lab Dropbox/Fudan University/SIAT/DATA/RNA_seq/2019/sc_RNA_seq/Aged microglia/Cellranger v2/F24_PBS_MG_outs"

#  The sample names
female.03.sampleName <- "Female 03 MO"
female.14.sampleName <- "Female 14 MO"
female.24.sampleName <- "Female 24 MO"

#  The author name or a string used to mark the report.
authorName <- "Bo Peng"

#  Run scStatistics
female.03.stat.results <- runScStatistics(
  dataPath = female.03.dataPath,
  savePath = female.03.savePath,
  sampleName = female.03.sampleName,
  authorName = authorName,
  species = "mouse"

)

female.14.stat.results <- runScStatistics(
  dataPath = female.14.dataPath,
  savePath = female.14.savePath,
  sampleName = female.14.sampleName,
  authorName = authorName,
  species = "mouse",
)

female.24.stat.results <- runScStatistics(
  dataPath = female.24.dataPath,
  savePath = female.24.savePath,
  sampleName = female.24.sampleName,
  authorName = authorName,
  species = "mouse",
)
wiceshine commented 4 years ago

Seems not due to the function conflicts. Since the example data could be runned in my case, though there are still error messeges and cannot get the final data and reports.
My data are built by cellranger 2.0. It this the reason? Thank you very much for your great help!

[2020-05-09 09:16:16] START: RUN scStatistics
[2020-05-09 09:16:16] -----: data preparation
[2020-05-09 09:16:45] -----: cell calling
[2020-05-09 09:17:00] -----: nUMI & nGene distribution plot
[2020-05-09 09:17:01] -----: mito & ribo & diss distribution plot
[2020-05-09 09:17:04] -----: gene statistics
[2020-05-09 09:17:07] -----: gene proportion plot
[2020-05-09 09:17:25] -----: ambinet genes (SoupX)
Error in plotMarkerDistribution(sc) : 
  Failed as no clusters found!  Clustering must be set via 'setClusters' to find marker genes.
此外: Warning messages:
1: Use of `cell.manifest[[value]]` is discouraged. Use `.data[[value]]` instead. 
2: Use of `cell.manifest[[value]]` is discouraged. Use `.data[[value]]` instead. 
3: Use of `cell.manifest[[value]]` is discouraged. Use `.data[[value]]` instead. 
4: Use of `cell.manifest[[value]]` is discouraged. Use `.data[[value]]` instead. 
5: Use of `cell.manifest[[value]]` is discouraged. Use `.data[[value]]` instead. 
6: Use of `cell.manifest[[value]]` is discouraged. Use `.data[[value]]` instead. 
7: Use of `cell.manifest[[value]]` is discouraged. Use `.data[[value]]` instead. 
8: Use of `cell.manifest[[value]]` is discouraged. Use `.data[[value]]` instead. 
wguo-research commented 4 years ago

Thanks for your use. The error in your second comment is due to the update of a dependent package SoupX. Now, I have updated the scCancer, which skips the step of SoupX temporarily. This step just gives an estimation of the contamination fraction of ambient RNAs and doesn't affect the subsequent analyses. You can reinstall the scCancer and test your data.

wiceshine commented 4 years ago

Thanks for your use. The error in your second comment is due to the update of a dependent package SoupX. Now, I have updated the scCancer, which skips the step of SoupX temporarily. This step just gives an estimation of the contamination fraction of ambient RNAs and doesn't affect the subsequent analyses. You can reinstall the scCancer and test your data.

Thank you for the prompt response! I reinstalled the updated package and both errors have been solved. Thanks again for the really rapid package update!