LooseLab / readfish

CLI tool for flexible and fast adaptive sampling on ONT sequencers
https://looselab.github.io/readfish/
GNU General Public License v3.0
164 stars 31 forks source link

Validation of decisions listed in `Barcodes`/`Regions` in Toml #328

Open Adoni5 opened 5 months ago

Adoni5 commented 5 months ago

Issue

Currently decisions do not undergo any validation in TOMLs. Actions must be one of stop_receiving, unblock or proceed, but Decisions can be anything.

For example the following Region Decision -> Action will fail

[[Region]]
no_map = "banter"

But this will succeed

[[Region]]
banter = "stop_receiving"

Proposal

Propose we also check the contents of the Region using cattrs

Testing TOML

I've attached a testing toml that should fail. All these validations should happen before testing the plugins, so we should be able to test without updating the path to the index/caller. Suggest using --no-check-plugins and --no-describe during testing.

human_chr_selection.txt

mattloose commented 5 months ago

I agree - banter should not be allowed.