snakemake
0
0
Entering edit mode
2.5 years ago

hi i m making a pipeline for checking the quality of single end reads and below is my code

SRA = glob_wildcards("rawReads/{sra}.fastq.gz")

rule all:

input:
    expand("rawQC/{sra}_fastqc.{extension}", sra=SRA,extension=["zip","html"]),

rule rawFastqc:

input:
    rawread="rawReads/{sra}.fastq.gz",
output:
    zip="rawQC/{sra}_fastqc.zip",
    html="rawQC/{sra}_fastqc.html",
threads:
    1
params:
    path="rawQC/",
shell:
    """
    fastqc {input.rawread} --threads {threads} -o {params.path}
    """

this is the error message i m getting

MissingInputException in line 7 of /mnt/d/snakemake/f1.py:

Missing input files for rule rawFastqc: output: rawQC/['SRR1158613']_fastqc.zip, rawQC/['SRR1158613']_fastqc.html wildcards: sra=['SRR1158613'] affected files: rawReads/['SRR1158613'].fastq.gz

i have my files in rawReads folder but i confused on why it is still showing error

thanks

pipeline fastqc snakemake • 956 views
ADD COMMENT
1
Entering edit mode

What does the SRA object look like? (You could put a print statement straight into your Snakefile to check it.) It's a bit weird that it's trying to access paths like this:

rawReads/['SRR1158613'].fastq.gz

That makes me wonder if it's a nested list or something instead of a flat one.

ADD REPLY
0
Entering edit mode

i changed my code and i think i solved the error

(SAMPLE,)=glob_wildcards("rawReads/{sample}.fastq.gz")

rule all:

input:
    expand("rawQC/{sample}_fastqc.{extension}", sample=SAMPLE,extension=["zip","html"]),

rule rawFastqc:

input:
    rawread="rawReads/{sample}.fastq.gz",
output:
    zip="rawQC/{sample}_fastqc.zip",
    html="rawQC/{sample}_fastqc.html",
threads:
    1
params:
    path="rawQC/",
shell:
    """
    fastqc {input.rawread} --threads {threads} -o {params.path}
    """

so now the pipeline will work

thanks for the suggestion

ADD REPLY

Login before adding your answer.

Traffic: 2699 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