Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default 'do_' lend themselves to be bools rather than strings ? #196

Open
WardDeb opened this issue Jan 8, 2025 · 3 comments
Open

Default 'do_' lend themselves to be bools rather than strings ? #196

WardDeb opened this issue Jan 8, 2025 · 3 comments

Comments

@WardDeb
Copy link
Member

WardDeb commented Jan 8, 2025

These are set as default:

info_dict["do_basecall"] = config["default_process"]["do_basecall"]
info_dict["do_align"] = config["default_process"]["do_align"]
info_dict["do_modbed"] = config["default_process"]["do_modbed"]

and written as strings in the config, while from just glancing over the code could just be bools ?

@adRn-s
Copy link
Member

adRn-s commented Jan 17, 2025

Just for context: YAML spec had changed what's interpreted as boolean across versions. So, parsers may do different things and still be correct. Python's parser should be fine.

I actually implemented these as "YES" and "NO" strings, with a bash hattrick to convert variables to uppercase. I don't recall what the issue was, but it was working until it didn't... so, there's that. Perhaps @caballero can provide some context, as he had to revert my changes to move forward with a flowcell back then.

@caballero
Copy link
Contributor

we tried using yes/no and true/false, there are incorrect interpretation at different levels in python/snakemake code, so I preferred to roll back to use a string

@WardDeb
Copy link
Member Author

WardDeb commented Jan 17, 2025

I'm not sure I follow, bools from yaml seem to work, as this is how verbosity is set. This could get awkward if the conditionals are used within shell, but imo that should be avoided cfr. #192

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants