as simple as it sounds it is not working for me!
I wrote a workflow with snakemake
, in which I'm trying to call my own script with the neccessary options. I would like to split the command into multiple lines as follows (simplified version):
rule stats:
"""
create summary of fasta file
"""
input:
config["In_dir"] + "Fasta/{sample}.fasta"
params:
i = config["i"],
nseq = 100,
l = config["l"],
l_mismatch = 3,
v_dist = 5,
output:
config["Out_dir"] + "/{sample}_stats.csv",
shell:
"""
scripts/test_args.py -f {input} \
-l {params.l} -i {params.i} \
-ld {params.l_mismatch} \
-vd {params.v_dist} --nseq {params.nseq} \
-o {output} &> {log}
"""
However, the script is not recognizing the args, instead it prints the usage command with the required options. Since I'm importing argparse
to provide the options, the default behaviour is to print the usage
of the script if the required options were not given (see example bellow):
I tried other ways as for example in here but still not working. The only format it would work, is to have them all in one line. What am I missing? I already checked my input and the validity of the options, it works only if it is one line?!
Thanks for any tip.