How to give explicitly input and output to Snakemake file?
0
1
Entering edit mode
8 weeks ago
NikhilP ▴ 20

So I have a pipeline written in shell which loops over three folders and then an inside loop which loops over files inside the folder.

For next step, I have a snakemake file, which takes an input folder and output folder. For trial run I gave the folder path inside the snakemake file. So I was wondering is there any way I can give input and output folder path explicitly.

For e.g.

snakemake --cores 30 -s trial.snakemake /path/to/input /path/to/output

Since I want to change the input and output according to the main loop.

I tried import sys and using sys.argv[1] and sys.argv[2] inside the snakemake file but its not working.

Below is the snippet of my pipeline, it takes three folder for now, ABC_Samples, DEF_Samples, XYZ_Samples

for folder in /path/to/*_Samples
do
folderName=$(basename$folder _Samples)
mkdir -p /path/to/output/$fodlerName for files in$folder/*.gz
do
/
do something
/
done
snakemake --cores 30 -s trial.snakemake /path/to/output/\$fodlerName /path/to/output2/
done


But the above doesn't work. So is there any way I can do this. I am really new to snakemake.

snakemake bash python pipeline • 230 views
2
Entering edit mode

hum... how about integrating this loop IN the Snakemake ?