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

Error in if (!grepl("Filtering|Mapping|Counting|Summarising", inp$which_Stage, : argument is of length zero #281

Closed roxyisat-rex closed 3 years ago

roxyisat-rex commented 3 years ago

Hi

Whist running zUMIs with the miniconda that came with it, I encountered an error. I hadn't seen any issues like this so I thought to post this. Below is the terminal output.

-bash-4.2$ bash zUMIs/zUMIs.sh -c -y SS3_human_2samples_test.yaml
Warning: YAML file doesn't include 'pigz_exec' option; setting to 'pigz'
Warning: YAML file doesn't include 'STAR_exec' option; setting to 'STAR'
Warning: YAML file doesn't include 'Rscript_exec' option; setting to 'Rscript'
Using miniconda environment for zUMIs!
 note: internal executables will be used instead of those specified in the YAML file!
Error in if (!grepl("Filtering|Mapping|Counting|Summarising", inp$which_Stage,  : 
  argument is of length zero
Execution halted

 You provided these parameters:
 YAML file: SS3_human_2samples_test.yaml
 zUMIs directory:       /rds/general/user/xyz16/home/bob/zUMIs
 STAR executable        STAR
 samtools executable        samtools
 pigz executable        pigz
 Rscript executable     Rscript
 RAM limit:   90
 zUMIs version 2.9.7 

From this looks of this error, it looks like one/ multiple of my input files was not read in? Though I provided the full path for everything and according to the example and directions from the wiki. I will provide the YAML below as well. The corresponding YAMLerror.log shows the below, which I think proves my suspicion that my files are being read as NULL. Though I struggle to find out why this is...

$file1
NULL

$file2
NULL

$file3
NULL

[1] ""
[1] ""
[1] ""
[1] "" "" ""
[1] ""
[1] ""
[1] ""
[1] "" "" ""
[1] "NULL" "NULL" "NULL"
[1] "The base definition can only be BC/cDNA/UMI. Check if you have a typo/special characters in your base definition or you forgot to add /space/ after -. Refer to the example yaml in the zUMIs installation directory."
$file1
[1] "The base definition can only be BC/cDNA/UMI. Check if you have a typo/special characters in your base definition or you forgot to add /space/ after -. Refer to the example yaml in the zUMIs installation directory."

Here is my YAML file, maybe you guys could give me some insight.

project: SS3_human_2samples_test
sequence_files:
  file1:
    name: /rds/general/user/xyz16/home/bob/zUMIs_test_data/reads_for_zUMIs.R1.fastq.gz
    base_definition:
    - cDNA(23-150)
    - UMI(12-19)
    - find_pattern: ATTGCGCAATG
  file2:
    name: /rds/general/user/xyz16/home/bob/zUMIs_test_data/reads_for_zUMIs.R2.fastq.gz
    base_definition:
    - cDNA(1-150)
  file3:
    name: /rds/general/user/xyz16/home/bob/zUMIs_test_data/reads_for_zUMIs.index.fastq.gz
    base_definition:
    - BC(1-8)
reference:
  STAR_index: /rds/general/user/xyz16/home/bob/STAR_INDEX
  GTF_file: /rds/general/user/xyz16/home/bob/STAR_ref_genome_files/Homo_sapiens.GRCh38.104.gtf
  additional_STAR_params: ''
  additional_files: ~
out_dir: /rds/general/user/xyz16/home/bob/zUMIs_output_file_2
num_threads: 50
mem_limit: 90
filter_cutoffs:
  BC_filter:
    num_bases: 3
    phred: 20
  UMI_filter:
    num_bases: 3
    phred: 20
barcodes:
  barcode_num: ~
  barcode_file: /rds/general/user/xyz16/home/bob/zUMIs_test_data/reads_for_zUMIs.expected_barcodes.txt
  automatic: no
  BarcodeBinning: 1
  nReadsperCell: 100
counting_opts:
  introns: yes
  downsampling: '0'
  strand: 0
  Ham_Dist: 1
  write_ham: yes
  velocyto: no
  primaryHit: yes
  twoPass: no
make_stats: yes
zUMIs_directory: /rds/general/user/xyz16/home/bob/zUMIs

Thank you very much!

roxyisat-rex commented 3 years ago

Solved. I didn't include "which_stage" in the yaml file and this is why it showed the "argument is of length zero"! Has nothing to do with my input files. Closing this. If anyone encounters this in the future could be a similar problem. The grepl code is from "checkyaml.R", could be helpful to check from there.

cziegenhain commented 3 years ago

Yes that sounds like it was the issue.

Also just another note be careful with the indentation of find_pattern: ATTGCGCAATG, it should not be a list element of base_definition but just an element among file1:. check the example in the wiki in doubt: https://github.com/sdparekh/zUMIs/wiki/Protocol-specific-setup#smart-seq3

roxyisat-rex commented 3 years ago

Yes that sounds like it was the issue.

Also just another note be careful with the indentation of find_pattern: ATTGCGCAATG, it should not be a list element of base_definition but just an element among file1:. check the example in the wiki in doubt: https://github.com/sdparekh/zUMIs/wiki/Protocol-specific-setup#smart-seq3

Yes! You're right! Forgot to mention! That is also incorrect and after removing the indentation of "find_pattern", the error message "The base definition can only be BC/cDNA/UMI. Check if you have a typo/special characters in your base definition or you forgot to add /space/ after -. Refer to the example yaml in the zUMIs installation directory."disappeared too.