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.
Thank you in advance.
hum... how about integrating this loop IN the Snakemake ?