wtsi-hgi / Automated-Enhancer-Gene-SCRAMBLEr

A tool to help automate the Genome Scramble project
MIT License
0 stars 1 forks source link

Include elif condition #14

Closed KMace closed 1 year ago

KMace commented 1 year ago

https://github.com/wtsi-hgi/Automated-Enhancer-Gene-SCRAMBLEr/blob/e280ea27ddcf0f7765e77984144b5e1be724da4c/find_metrics.py#L194

You need an elif condition on the apply_hard_filter() , saying elif minimax == "min" , and then the else should be reserved for anything else, and should raise an error accordingly. You can imagine a situation in which neither min nor max gets passed as an argument, and the data gets erroneously manipulated by your else condition. This may not announce itself as an error until much later on - or it may not even announce itself at all. Which is of course bad, and needs accounting for.