Add all
and only
keywords to session and runs.
#154
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes #122.
This PR adds an
'all
' and'only'
options for thesession_and_runs
input dictionary. This can go either in the sessions key, or for the runs per session. Whenall
is set, then any folder starting withses-*
in the sub folder is added to thepreprocess_data.sessions_and_runs
. Ifall
is set at the run level, any folder discovered inses-xxx/ephys
is used.If
only
key is used, it behaves in the same way but if the result from the folder search is greater than 1, an error is thrown. This is to be used in the instance when you know you only have one run (very common) and want to glob this without putting in every run name, but want some protection you havn't accidently added some other random data there.One thing that is a little tricky is the runs might not be in the intended order. Because we expect neuroblueprint, we can check the sessions are in the correct order. However, we can't do this with runs. For this reason for now it is not allowd to use the
all
key at the run level when concatenating across runs - which would be severely effected if the runs went out of order. Otherwise everything is performed per-run which is okay even if they are out of order.Tests are quite thorought but not entirely complete, see #166