spacemake
spacemake copied to clipboard
Using checkpoints for a single workflow
I adapted the workflow so it only needs to call a single target
rule, using checkpoints.
I have tested with the (tiny) test data and some real mouse brain samples - with and without spatial pucks, with and without puck collection, with and without meshing. Tests were run for the main, merging and downsampling workflows.
Important: I have tested all with snakemake 7.32.4. Previous versions (especially 5.x-6.x) might not work - workflow stops unexpectedly with apparently no error.
To be done before merging:
- [x] There is an issue with the qc reports of puck_collections. When there are two run modes for a single sample, one that meshes and other that doesn't, the qc_sheet input parameters contain files from both run modes, and they have different number of columns (e.g., meshed
obs
do not haven_joined
, and order of columns is different). I am fixing this. - [ ] Need to see if the current tests are suitable for this (should be, the results do not change, just the number of target rules)
- [ ] Double check merging - generate pucks
So, I also see adding of {polyA_adapter_trimmed}
to a bunch of string constants pertaining to pucks and I don't understand why we need it there now (but not before). Personally, I am not a big fan of the filename inflation. Perhaps, eventually we should move to run_mode (or adapter_flavor, or barcode_flavor) in the filename - if there are even different relevant options of making the file in the first place. Inserting each little flag seems too granular. Even though historically it made sense, I am afreaid it does not scale well to the complexity we already have let alone may get in the future. Should discuss w Nikos, too?
When you say "double check merging - generate pucks" ideally, we'd have a new test case in tests/
;-) wink wink * nudge nudge*
Tested this and everything looks in order.