snakemake output directory
2
1
Entering edit mode
11 months ago
Peter Chung ▴ 160

I am new to snakemake. I have a simple quesiton and I can not do the fastqc output into a directory

rule run_fastqc:
    input:
        "data/ERR127302_1_subset.fastq.gz"
    output:
        directory("result/")
    shell:
        "fastqc {input} -o {output} "

I try the command:

snakemake -j 1 -n

The output is:

Building DAG of jobs...
Nothing to be done.

is there any advices ? Thanks.

snakemake ngs • 744 views
ADD COMMENT
1
Entering edit mode
11 months ago

Nothing to be done suggests the output, i.e. directory results, exists and is newer than the input so no need to rerun the jobs.

ADD COMMENT
0
Entering edit mode

I want the fastqc output file, the html file and the zip file output to result directory but it output nothing.

I tried to change the output in the Snakefile like below:

output:
    expand("result/{sample}_fastqc.html",sample=SAMPLES),
    expand("result/{sample}_fastqc.zip",sample=SAMPLES)

but it still outputs to the data directory, do you know why

ADD REPLY
0
Entering edit mode

Did you define rule all?

ADD REPLY
0
Entering edit mode

no, I didn't. what should I input in rule all

rule all:
    input:
        expand("result/{sample}_fastqc.html",sample=SAMPLES),
        expand("result/{sample}_fastqc.zip",sample=SAMPLES)

it stills output at the data directory

ADD REPLY
0
Entering edit mode

Try this as shell command: fastqc {input} -q -f fastq -o result/

ADD REPLY
1
Entering edit mode
11 months ago
Peter Chung ▴ 160

I can successfully output the result to the result directory.

rule run_fastqc:
    input:
        "data/ERR127302_1_subset.fastq.gz"
    output:
        "result/{sample}_fastqc.html",
        "result/{sample}_fastqc.zip"
    params:
        dir="result"
    shell:
        "fastqc {input} -o {params.dir}"

The html file and the zip will be in the result directory

ADD COMMENT

Login before adding your answer.

Traffic: 1644 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6