How to give explicitly input and output to Snakemake file?
0
1
Entering edit mode
2.6 years 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.

Thank you in advance.

snakemake bash python pipeline • 931 views
ADD COMMENT
2
Entering edit mode

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

ADD REPLY

Login before adding your answer.

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