sdparekh / zUMIs

zUMIs: A fast and flexible pipeline to process RNA sequencing data with UMIs
GNU General Public License v3.0
268 stars 67 forks source link

Error in eval(bysub, parent.frame(), parent.frame()) : object 'XC' not found Calls #354

Closed PeggySze closed 1 year ago

PeggySze commented 1 year ago

Hello! I encountered an error when analyzing HCA Smart-seq2 data from Mereu et al. (2020) (https://doi.org/10.1038/s41587-020-0469-4) that is available at NCBI-SRA SRR9621775 (https://trace.ncbi.nlm.nih.gov/Traces/sra/?run=SRR9621775).

My yaml file is shown below:

#define a project name that will be used to name output files
project: Smartseq2

#Sequencing File Inputs:
sequence_files:
  file1:
    name: /md01/shipy3/tzj/SMILE/input/SRR9621775_1.fastq.gz
    base_definition:
      - cDNA(1-76)
  file2:
    name: /md01/shipy3/tzj/SMILE/input/SRR9621775_2.fastq.gz
    base_definition:
      - cDNA(1-76)
  file3:
    name: /md01/shipy3/tzj/SMILE/input/SRR9621775_3.fastq.gz
    base_definition:
      - BC(1-8)
  file4: 
    name: /md01/shipy3/tzj/SMILE/input/SRR9621775_4.fastq.gz
    base_definition:
      - BC(1-8)

#reference genome setup
reference:
  STAR_index: /md01/shipy3/ori/DB/hg38/STAR_index/sjdbOverhang75
  GTF_file: /md01/shipy3/ori/DB/human-mouse-dog/hg38_genes.gtf
  additional_STAR_params: '--limitOutSJcollapsed 4000000 --limitSjdbInsertNsj 4000000'

#output directory
out_dir: /md01/shipy3/tzj/SMILE/Smartseq2/zUMIs

#number of processors to use
num_threads: 10
mem_limit: 50

#Options for Barcode handling
barcodes:
  barcode_file: null
  barcoe_num: null
  automatic: yes

#produce stats files and plots?
make_stats: yes

#Start zUMIs from stage. Possible TEXT(Filtering, Mapping, Counting, Summarising). Default: Filtering.
which_Stage: Filtering

And I ran zUMIs by the following command:

zUMIs/zUMIs.sh -c -y /md01/shipy3/tzj/SMILE/Smartseq2/zUMIs/HCA_Smartseq2_human_genome.yaml

I encountered an error when running zUMIs :

Using miniconda environment for zUMIs!
 note: internal executables will be used instead of those specified in the YAML file!

 You provided these parameters:
 YAML file:     /md01/shipy3/tzj/SMILE/Smartseq2/zUMIs/HCA_Smartseq2_human_genome.yaml
 zUMIs directory:               /data/R03/shipy3/software/zUMIs
 STAR executable                STAR
 samtools executable            samtools
 pigz executable                pigz
 Rscript executable             Rscript
 RAM limit:   50
 zUMIs version 2.9.7e

Sun Apr  9 18:20:18 CST 2023
WARNING: The STAR version used for mapping is 2.7.3a and the STAR index was created using the version 20201. This may lead to an error while mapping. If you encounter any errors at the mapping stage, please make sure to create the STAR index using STAR 2.7.3a.
Filtering...

Sun Apr  9 19:23:19 CST 2023
Error in eval(bysub, parent.frame(), parent.frame()) :
  object 'XC' not found
Calls: cellBC -> [ -> [.data.table -> eval -> eval
In addition: Warning message:
In data.table::fread(bccount_file, header = FALSE, col.names = c("XC",  :
  File '/md01/shipy3/tzj/SMILE/Smartseq2/zUMIs/Smartseq2.BCstats.txt' has size 0. Returning a NULL data.table.
Execution halted
Mapping...
[1] "2023-04-09 19:23:21 CST"
Warning message:
In data.table::fread(cmd = paste(samtools, "view", filtered_bams[1],  :
  File '/tmp/Rtmp1ga8Rp/file4b35f7a975a4' has size 0. Returning a NULL data.table.
Error in if (inp$counting_opts$twoPass == TRUE) { :
  argument is of length zero
Execution halted
Sun Apr  9 19:23:25 CST 2023
Counting...
[1] "2023-04-09 19:23:33 CST"
Error in fread(paste0(opt$out_dir, "/zUMIs_output/", opt$project, "kept_barcodes.txt")) :
  File '/md01/shipy3/tzj/SMILE/Smartseq2/zUMIs/zUMIs_output/Smartseq2kept_barcodes.txt' does not exist or is non-readable. getwd()=='/data/R03/shipy3/tzj/SMILE/Smartseq2/zUMIs'
Execution halted
Sun Apr  9 19:23:33 CST 2023
Loading required package: yaml
Loading required package: Matrix
[1] "loomR found"
Error in gzfile(file, "rb") : cannot open the connection
Calls: rds_to_loom -> readRDS -> gzfile
In addition: Warning message:
In gzfile(file, "rb") :
  cannot open compressed file '/md01/shipy3/tzj/SMILE/Smartseq2/zUMIs/zUMIs_output/expression/Smartseq2.dgecounts.rds', probable reason 'No such file or directory'
Execution halted
Sun Apr  9 19:23:35 CST 2023
Descriptive statistics...
[1] "I am loading useful packages for plotting..."
[1] "2023-04-09 19:23:35 CST"
Error in data.table::fread(paste0(opt$out_dir, "/zUMIs_output/", opt$project,  :
  File '/md01/shipy3/tzj/SMILE/Smartseq2/zUMIs/zUMIs_output/Smartseq2kept_barcodes.txt' does not exist or is non-readable. getwd()=='/data/R03/shipy3/tzj/SMILE/Smartseq2/zUMIs'
Execution halted
Sun Apr  9 19:23:43 CST 2023

How can I solve this problem?

MaoxuWang commented 1 year ago

Unfortunately, I encountered the same error. I tried to use my own dependency (without -c ) but still fails. Can anyone help me with this? I can't wait to see the power of zUMIs, thank you!

cziegenhain commented 1 year ago

Hi,

It seems that your YAML file is incomplete and a lot of the settings are missing? Please refer to the template and try again: https://github.com/sdparekh/zUMIs/blob/main/zUMIs.yaml

Best, Christoph

PeggySze commented 1 year ago

I added automatic: no in the options for barcode handling and solved the error.

cziegenhain commented 1 year ago

generally I recommend having all options present in the zUMIs yaml file as this is the intended way to run, but great you could solve the issue!