Я попытался перебрать список в сценарии R в правиле создания змеи, как в следующем файле змеи, но получил ошибки.
from snakemake.utils import R
rule test:
run:
R("""
print("hello!")
a = c(1, 2, 3)
for (i in a)
{
print(i)
}
""")
Вот ошибки.
RuleException:
NameError in line 12 of Snakefile:
The name '\n print(i)\n' is unknown in this context. Please make sure that you defined that variable. Also note that braces not used for variable access have to be escaped by repeating them, i.e. {{print $1}}
File "Snakefile", line 12, in __rule_test
File "~/miniconda/envs/py36/lib/python3.6/concurrent/futures/thread.py", line 56, in run
Exiting because a job execution failed. Look above for error message
Shutting down, this might take some time.
Код не дал ошибок, когда я запустил его непосредственно в R. У кого-нибудь есть идеи, что случилось? Спасибо.