sdparekh / zUMIs

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

An error was encountered while running zUMIs(v2.9.7d) #352

Closed shangyf-stu closed 1 year ago

shangyf-stu commented 1 year ago

Hello,

Thanks for your useful tool, I have used zUMIs.2.9.4, and it works perfectly. This data was sequenced by PLATEseq, and meet this error. I can't find the reason and have given the path permission. Any help is appreciated!

Best wishes, Shang

To Reproduce

project: dataset326
sequence_files:
  file1:
    name: /dataset326/filter_fastp/dataset326_clean_1.fastq.gz
    base_definition: 
      - BC(1-8)
      - cDNA(9-101)
  file2:
    name: /dataset326/filter_fastp/dataset326_clean_2.fastq.gz
    base_definition: 
      - BC(1-8)
      - cDNA(9-101)
reference:
  STAR_index: /zUMIs_v2.9.7d/star_index_2.7.3a_nogtf
  GTF_file: /3.2.0_star_index/Homo_sapiens.GRCh38.102.gtf
  exon_extension: no
  extension_length: 0
  scaffold_length_min: 0
  additional_files: 
  additional_STAR_params: 
out_dir: /dataset326/zUMIs
num_threads: 8
mem_limit: 20
filter_cutoffs:
  BC_filter:
    num_bases: 1
    phred: 20
  UMI_filter:
    num_bases: 1
    phred: 20
barcodes:
  barcode_num: null
  barcode_file: null
  barcode_sharing: null
  automatic: yes
  BarcodeBinning: 1
  nReadsperCell: 100
  demultiplex: no
counting_opts:
  introns: yes
  intronProb: no
  downsampling: '0'
  strand: 0
  Ham_Dist: 0
  velocyto: no
  primaryHit: yes
  multi_overlap: no
  fraction_overlap: 0
  twoPass: yes
make_stats: yes
which_Stage: Filtering
samtools_exec: samtools
Rscript_exec: Rscript
STAR_exec: STAR
pigz_exec: pigz

Screenshots

/zUMIs_v2.9.7d/zUMIs/zUMIs.sh: line 171: dataset326.zUMIs_YAMLerror.log: Permission denied
tail: cannot open ‘dataset326.zUMIs_YAMLerror.log’ for reading: No such file or directory
sh: line 1:  1361 Killed                  STAR --readFilesCommand samtools view -@ 1 --outSAMmultNmax 1 --outFilterMultimapNmax 50 --outSAMunmapped Within --outSAMtype BAM Unsorted --quantMode TranscriptomeSAM --genomeDir /zUMIs_v2.9.7d/star_index_2.7.3a_nogtf --sjdbGTFfile /3.2.0_star_index/Homo_sapiens.GRCh38.102.gtf --runThreadN 7 --sjdbOverhang 92 --readFilesType SAM PE --twopassMode Basic --readFilesIn /dataset326/zUMIs/zUMIs_output/.tmpMerge//dataset326.dataset326aa.filtered.tagged.bam,/dataset326/zUMIs/zUMIs_output/.tmpMerge//dataset326.dataset326ab.filtered.tagged.bam,/dataset326/zUMIs/zUMIs_output/.tmpMerge//dataset326.dataset326ac.filtered.tagged.bam,/dataset326/zUMIs/zUMIs_output/.tmpMerge//dataset326.dataset326ad.filtered.tagged.bam,/dataset326/zUMIs/zUMIs_output/.tmpMerge//dataset326.dataset326ae.filtered.tagged.bam,/dataset326/zUMIs/zUMIs_output/.tmpMerge//dataset326.dataset326af.filtered.tagged.bam,/dataset326/zUMIs/zUMIs_output/.tmpMerge//dataset326.dataset326ag.filtered.tagged.bam,/dataset326/zUMIs/zUMIs_output/.tmpMerge//dataset326.dataset326ah.filtered.tagged.bam --outFileNamePrefix /dataset326/zUMIs/dataset326.filtered.tagged.
Error in gsub("SN:", "", chr) : object 'chr' not found
Calls: .makeSAF ... .chromLengthFilter -> [ -> [.data.table -> eval -> eval -> gsub
In addition: Warning message:
In data.table::fread(bread, col.names = c("chr", "len"), header = F) :
  File '/tmp/Rtmp3H9sHq/file5786fdb3c39' has size 0. Returning a NULL data.table.
Execution halted
Loading required package: yaml
Loading required package: Matrix
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 '/dataset326/zUMIs/zUMIs_output/expression/dataset326.dgecounts.rds', probable reason 'No such file or directory'
Execution halted
Error in gzfile(file, "rb") : cannot open the connection
Calls: readRDS -> gzfile
In addition: Warning message:
In gzfile(file, "rb") :
  cannot open compressed file '/dataset326/zUMIs/zUMIs_output/expression/dataset326.dgecounts.rds', probable reason 'No such file or directory'
Execution halted
cziegenhain commented 1 year ago

Hi,

That is indeed curious, but it really does read like some kind of path or permissions issue. I am not familiar with PLATE-seq but don't see anything wrong in your YAML file on first look.

shangyf-stu commented 1 year ago

Thank you for your quick answer. I entered the output directory of zUMIs. The first problem has been solved. Do you have any comments on the following problems? I used the star (version is 2.7.3a) built in zUMIs to build the index. The genemeParameters.txt in the result shows that the versionGenome is 2.7.1a. Is there a problem here?

cziegenhain commented 1 year ago

Great! For this warning, it should be fine to proceed because the genomeParameter.txt is not always fully correct.

shangyf-stu commented 1 year ago

Hello again, The errors mentioned earlier may not be negligible, which leads to errors: sh: line 1: 1361 Killed STAR --readFilesCommand samtools view -@ 1 --outSAMmultNmax 1 --outFilterMultimapNmax 50 --outSAMunmapped Within --outSAMtype BAM Unsorted --quantMode TranscriptomeSAM --genomeDir /zUMIs_v2.9.7d/star_index_2.7.3a_nogtf --sjdbGTFfile /3.2.0_star_index/Homo_sapiens.GRCh38.102.gtf --runThreadN 7 --sjdbOverhang 92 --readFilesType SAM PE --twopassMode Basic --readFilesIn /dataset326/zUMIs/zUMIs_output/.tmpMerge//dataset326.dataset326aa.filtered.tagged.bam,/dataset326/zUMIs/zUMIs_output/.tmpMerge//dataset326.dataset326ab.filtered.tagged.bam,/dataset326/zUMIs/zUMIs_output/.tmpMerge//dataset326.dataset326ac.filtered.tagged.bam,/dataset326/zUMIs/zUMIs_output/.tmpMerge//dataset326.dataset326ad.filtered.tagged.bam,/dataset326/zUMIs/zUMIs_output/.tmpMerge//dataset326.dataset326ae.filtered.tagged.bam,/dataset326/zUMIs/zUMIs_output/.tmpMerge//dataset326.dataset326af.filtered.tagged.bam,/dataset326/zUMIs/zUMIs_output/.tmpMerge//dataset326.dataset326ag.filtered.tagged.bam,/dataset326/zUMIs/zUMIs_output/.tmpMerge//dataset326.dataset326ah.filtered.tagged.bam --outFileNamePrefix /dataset326/zUMIs/dataset326.filtered.tagged. Error in gsub("SN:", "", chr) : object 'chr' not found Calls: .makeSAF ... .chromLengthFilter -> [ -> [.data.table -> eval -> eval -> gsub In addition: Warning message: In data.table::fread(bread, col.names = c("chr", "len"), header = F) : File '/tmp/Rtmp3H9sHq/file5786fdb3c39' has size 0. Returning a NULL data.table. Execution halted Loading required package: yaml Loading required package: Matrix 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 '/dataset326/zUMIs/zUMIs_output/expression/dataset326.dgecounts.rds', probable reason 'No such file or directory' Execution halted Error in gzfile(file, "rb") : cannot open the connection Calls: readRDS -> gzfile In addition: Warning message: In gzfile(file, "rb") : cannot open compressed file '/dataset326/zUMIs/zUMIs_output/expression/dataset326.dgecounts.rds', probable reason 'No such file or directory' Execution halted

I tested zUMIs using example data, and tested 2.7.3a (the built-in version of zUMIs) and 2.7.10b (the latest version), respectively. It is puzzling that they have created indexes for version 2.7.1a and version 2.7.4a, respectively, and both have caused a reminder of zUMIs: WARNING: The STAR version used for mapping is 2.7.3a and the STAR index was created using the version 2.7.4a. 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.

However, only the example data run using the index of 2.7.1a was completed, but only 43 barcodes were found. Therefore, I believe that the reason for this issue is the index. Do you have any suggestions for establishing the index for version 2.7.3a? Or other improvements? The following is my code for creating the index: /star/STAR-2.7.10b/source/STAR \ --runMode genomeGenerate \ --runThreadN 8 \ --genomeDir /zUMIs_v2.9.7d/star_index_2.7.10b_nogtf \ --genomeFastaFiles Homo_sapiens.GRCh38.dna.primary_assembly.fa

Your reply is expected. Shang

cziegenhain commented 1 year ago

Hi Shang,

It says your STAR was "killed" - make sure you dont run out of memory or similar. Using the newer STAR generated index with the older version of STAR for alignment will not be successful. However, If the index would be incompatible STAR would give that error message explicity - I dont see this in your error message. Sounds like it gets aborted externally.

All the best,

shangyf-stu commented 1 year ago

Thank you for your patient answer. I increased the running memory and now it is running normally! Finally, can I ask why only a few barcodes (43) are detected in the sample data? Is this normal?

cziegenhain commented 1 year ago

Great to hear ! You could inspect the barcode detection plot in the zUMIs_output/stats folder and see if the automatic detection makes sense!