The rule is executed as somecommand -o somedir/sample1. Since the storage plugin doesn't change the pwd, this will create an output file "somedir/sample1.csv" relative to the Snakefile, which might already be bad if there are a lot of writes on a slow IO system. But worse, since snakemake expects the output file in the storage directory it fails with a MissingOutputException.
Is there a smart way to prevent this? The only way I can think of is to use a lambda function for the prefix that splits of ".csv" from the output path in this case. But this would need to be adjusted to each case, since there might be more complex cases where it's not only a file extension that needs to get removed.
Disclaimer: This might be more of a general question on storages, but I'm not sure on that.
Say I have this rule from the docs:
The rule is executed as
somecommand -o somedir/sample1
. Since the storage plugin doesn't change the pwd, this will create an output file "somedir/sample1.csv" relative to the Snakefile, which might already be bad if there are a lot of writes on a slow IO system. But worse, since snakemake expects the output file in the storage directory it fails with a MissingOutputException. Is there a smart way to prevent this? The only way I can think of is to use a lambda function for the prefix that splits of ".csv" from the output path in this case. But this would need to be adjusted to each case, since there might be more complex cases where it's not only a file extension that needs to get removed.Thanks in advance!