strobealign icon indicating copy to clipboard operation
strobealign copied to clipboard

Consider subcommands for indexing

Open marcelm opened this issue 2 years ago • 0 comments

I mainly want to ensure a good user interface. If a user says "only create an index" in some way, there should be an error if alignment options are used. They should not be silently ignored. If indexing and mapping functionality is split into two subcommands, this would be straightforward: The indexing subcommand accepts indexing parameters, and the mapping subcommand accepts lots of alignment parameters. So indexing options aren’t available when mapping and vice versa.

This is a solid point. I guess the tradeoff is a good user interface vs an option to do a one command run (as for minimap2). Perhaps both can be achieved with the argparser we now use? Like strobealign index strobealign align or strobealign idx-n-aln?

The question is what 'will not work' means at the moment. IMO, this must either not be possible (for example because there’s no way of providing index parameters when mapping) or at least throw a clear error message. It would be best if the required index parameters were just read from the index when a pre-generated one is used.

I meant it as in that there will be little to no correct alignments (but strobealign will likely still run without error). Most reads will probably be unmapped (depending on the magnitude of the difference in settings). @johan-gson pointed out that we could easily check for identical mapping parameters when we load the index and throw an error if they are different. I think that will be a nice addition.

Originally posted by @ksahlin in https://github.com/ksahlin/StrobeAlign/issues/48#issuecomment-1231356627

marcelm avatar Sep 08 '22 09:09 marcelm