Hi everyone,
This is the first time I'm trying snakemake. I wrote the following code (I have used tab space before input:, output: and script:)
rule first_try:
input:
"data/samples/A.fastq"
output:
"output1/output2/output3/A.txt"
script:
"cat {input} | wc > {output}"
When I ran this code with "snakemake --cores 1 output1/output2/output3/A.txt", I'm getting the following error
Building DAG of jobs...
Using shell: /usr/bin/bash
Provided cores: 1 (use --cores to define parallelism)
Rules claiming more threads will be scaled down.
Job stats:
job count min threads max threads
--------- ------- ------------- -------------
first_try 1 1 1
total 1 1 1
Select jobs to execute...
[Mon May 1 14:40:34 2023]
rule first_try:
input: data/samples/A.fastq
output: output1/output2/output3/A.txt
jobid: 0
reason: Missing output files: output1/output2/output3/A.txt
resources: tmpdir=/tmp
[Mon May 1 14:40:34 2023]
Error in rule first_try:
jobid: 0
input: data/samples/A.fastq
output: output1/output2/output3/A.txt
Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
Complete log: .snakemake/log/2023-05-01T144033.399600.snakemake.log
Also, I notice the output folder (from output1 and all subfolders (output2 and output3)) is getting deleted automatically whenever I run snakemake. I could not understand why the output folder is getting deleted automatically. Could anyone please help me resolve this issue.
Thank you @Wayne for clarifying my query. Yes, I'm able to get the results correctly when I changed "script:" to "shell:". :-)