I'm getting an error when I use the Unix split
command in the shell part of my Snakemake rule:
rule split:
input:
"test_file.txt"
output:
directory("split_test_file")
shell:
'''
mkdir {output}
split -1 3 {input} split_
mv split_* {output}
'''
This is the error:
Error in rule split:
jobid: 0
output: split_test_file
shell:
mkdir split_test_file
split -1 3 test_file.txt split_
mv split_* split_test_file
(one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)
I think the error occurs in the mv split_* split_test_file
line because when I run only the first 2 lines there is no error. I can't seem to find why I can't move all the files that resulted from splitting test_file.txt
into the output directory? Thank you so much!
question from:
https://stackoverflow.com/questions/65947348/snakemake-error-when-using-split-command 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…