first try does not work, error is:
invalid syntax
second try will not work because of order of execution statistics.py
• 0 views
•
link
Hey! Part of my snakefile is below:
SAMPLES=["I_1_R1", "I_1_R2"]
RES = list(set([i.rsplit('_R')[0] for i in SAMPLES]))
rule all:
input:
expand("path/{res}_0_5000_R.png", "path/{res}_0_5000_S.png", "path/{res}_500_10000_R.png", "path/{res}_500_10000_S.png", res=RES),
expand("path/{res}_RvsR.png", "path/{res}_strand_1vs2.png", res=RES),
expand("path/{res}_log10_500_1000.png", res=RES)
rule statistics:
input:
"path/{res}.tsv"
output:
dist = "path/{res}_0_5000_R.png", "path/{res}_0_5000_S.png", "path/{res}_500_10000_R.png", "path/{res}_500_10000_S.png"
feature = "path/{res}_RvsR.png", "path/{res}_strand_1vs2.png"
log10 = "path/{res}_log10_500_1000.png"
shell:
"path/statistics.py {input} {output.dist} {output.feature} {output.log10}"
and I have an error like this:
SyntaxError in line 15 of path/Snakefile:
positional argument follows keyword argument
line 15 is:
feature = "path/{res}_RvsR.png", "path/{res}_strand_1vs2.png"
Can someone help or give some advices?
Try:
feature = ["path/{res}_RvsR.png", "path/{res}_strand_1vs2.png"],
Or:
feature1 = "path/{res}_RvsR.png",
feature2 = "path/{res}_strand_1vs2.png"
first try does not work, error is:
invalid syntax
second try will not work because of order of execution statistics.py
Log in to answer this question.
This might seem silly, but you're missing commas between the outputs. Try: