This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error with snakemake

Hi,

This was the first time I'm using snakemake to build a pipeline. I got an error while using it.

I'm using scripts found in GitHub but still I have the following error. salmon_snakemake

Building DAG of jobs...
Using shell: /usr/bin/bash
Provided cores: 1
Rules claiming more threads will be scaled down.
Job counts:
    count   jobs
    1   all
    1   collate_salmon
    3   salmon_quant
    5

rule salmon_quant:
    input: myfastqs/sample1/sample1_R2.fastq.gz, myfastqs/sample1/sample1_R1.fastq.gz, /documents/annot_AND_refFASTA/salmon/Homo_sapiens.GRCh38.92.cdna.ncrn
    output: out/sample1/quant.sf, out/sample1/lib_format_counts.json
    log: logs/sample1_salmons_quant.log
    jobid: 2
    wildcards: sample=sample1

/usr/bin/bash: -c: line 1: unexpected EOF while looking for matching `''
    Error in rule salmon_quant:
        jobid: 2
        output: out/sample1/quant.sf, out/sample1/lib_format_counts.json
        log: logs/sample1_salmons_quant.log

RuleException:
CalledProcessError in line 51 of /documents/RNA-seq-analysis/RNA-seq-snakemake-pipeline/Snakefile:
Command ' set -euo pipefail;  
        salmon quant -p 4 -i /documents/annot_AND_refFASTA/salmon/Homo_sapiens.GRCh38.92.cdna.ncrn -l ISR -1 <(gunzip -c myfastqs/sample1/sample1_R1.fastq.gz) -2 <(gunzip -c myfastqs/sample1/sample1_R2.fastq.gz) -o OUT_DIR/sample1 &> logs/sample1_salmons_quant.log' ' returned non-zero exit status 2
  File "/documents/RNA-seq-analysis/RNA-seq-snakemake-pipeline/Snakefile", line 51, in __rule_salmon_quant
  File "/soft/apps/Python/3.5.2-goolf-1.7.20/lib/python3.5/concurrent/futures/thread.py", line 55, in run
Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
Complete log: /documents/RNA-seq-analysis/RNA-seq-snakemake-pipeline/.snakemake/log/2018-06-15T163736.693150.snakemake.log
snakemake python pipeline salmon

As far as I know the developers of snakemake prefer stackoverflow for questions.

1 answer

If the link you posted is the snakefile you are using: there is a single quote sign at the end of the salmon_quant shell command.

Yes, but after removing that, it gave this gzip: myfastqs/sample3/sample3_R1.fastq.gz: unexpected end of file along with the error in the question.

Most likely your gz file is then corrupt (truncated?)

I think liven is correct. Files from CHT are corrupted and SK files seem to be okay. I was able to unzip the files from SK github.. Look at the file sizes in pics below. CHT (github) copied/reused raw files from SK (github).

@OP: Try using sequence files from SK github.

From CHT:

cht

From SK:

sk

Those *.gz files in the repo are not properly compressed.

[/scratch/tmp]$ pigz -d sample1_R1.fastq.gz 
pigz: skipping: sample1_R1.fastq.gz is not compressed
pigz: abort: read error on sample1_R1.fastq.gz (Bad file descriptor)
[/scratch/tmp]$ mv sample1_R1.fastq.gz sample1_R1.fastq    
[/scratch/tmp]$ pigz sample1_R1.fastq 
[/scratch/tmp]$ pigz -d sample1_R1.fastq.gz 
[/scratch/tmp]$

Log in to answer this question.