Skip to content
Advertisement

Snakemake use all samples as one input with porechop

I’m trying to use porechop on several data with a Snakemake workflow.

In my Snakefile, there are three rules, a fastqc rule and a porechop rule, in addition to the all rule. The fastqc rule works very well, I have all three out for my three fastq. But for porechop, instead of running the command three times, it runs the command once with the -i flag for all three files at the same time:

JavaScript

However, when I use it with a single sample, the program works.

Here my code:

JavaScript

Do you have any idea what’s wrong?

Thanks !

Advertisement

Answer

This question comes up often… If you use expand() in input: or output: then you are feeding the rule with a list of all the files. That is the same as writing:

JavaScript

To run the rule on each input/output just remove the expand:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement