pypiper
pypiper copied to clipboard
Command created by NGSTk.calculate_frip doesn't always write a value
An empty FRiP file can be created when the command returned by calculate_frip is executed. I think this is due to an empty peaks file. In such a case, it may make more sense to write a nan rather than an empty file. More broadly, calculate_frip feels like the sort of function that should return a numeric value that the user then writes to a file or otherwise uses, rather than a command-returning function.
Actually, it looks like simple_frip is for that purpose. In that case, it feels like simple_frip should be called calc_frip or calculate_frip while what's currently calculate_frip should be called something like write_frip, output_frip, or report_frip.
The numeric-return version is now in dev as calc_frip, using simple_frip to generate its command. I'd still favor renaming to disambiguate return type, with something like calc_frip, build_calc_frip_command, and build_write_frip_command for the actual calculator, calculator command generator, and calc+write command generator, respectively.
@afrendeiro these are your functions, can you respond?
So the thing is, I'm not using that (and other functions) anymore. I don't think it makes sense to either blindly change or remove functions I'm not using if I don't know where/what is using them. I am however okay with following upstream changes you guys introduce since you have a better overview of these types of dependencies. Let me know what you prefer.