beelabhmc / ant_tracker

Track ant movement in a lab setting using ML
http://hmcbee.blogspot.com/
1 stars 1 forks source link

Pipeline won't handle filenames with spaces correctly #26

Open JarredAllen opened 5 years ago

JarredAllen commented 5 years ago

Several of the files depend on the video names not containing spaces in them. This could be worked around through using shlex if such processing is necessary, but it currently doesn't do that.

The current plan does not involve files with spaces in them, but future ones may. I'm leaving this here as a note to future maintainers in case the requirements change.

aryarm commented 5 years ago

I know you're not planning on dealing with this issue, but if the problem is that wildcards containing whitespace are being interpreted as separate arguments by the shell, future maintainers might consider using snakemake quoting.

To use it, just add :q at the end of your wildcards (but inside the brackets {}) when you reference them in a shell rule. I haven't tried it, but theoretically you could also use this on any config variables you put in your shell rules if you place your config variables directly in the shell rule and surround them by brackets: python3.7 scripts/split.py -s {config[segment-length]:q}

JarredAllen commented 5 years ago

Thanks for the tip. However, there are also parts within the code files which also assume there to not be any whitespace in filenames, so that alone will not fix the issue.

mdonaldsonmatasci commented 5 years ago

As long as it's clearly documented that the filenames should not have spaces, I don't think it's a problem. We just won't generate files with spaces in their names.

On Mon, Jul 8, 2019, 23:01 Jarred Allen notifications@github.com wrote:

Thanks for the tip. However, there are also parts within the code files which also assume there to not be any whitespace in filenames, so that alone will not fix the issue.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/beelabhmc/ant_tracker/issues/26?email_source=notifications&email_token=ACEBOCGEGRUOCWZ6HIEBXLDP6QSS7A5CNFSM4H66XAZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZPF5OQ#issuecomment-509501114, or mute the thread https://github.com/notifications/unsubscribe-auth/ACEBOCBYA2AFLX2NFPVYAPTP6QSS7ANCNFSM4H66XAZA .