pypiper icon indicating copy to clipboard operation
pypiper copied to clipboard

Command created by NGSTk.calculate_frip doesn't always write a value

Open vreuter opened this issue 8 years ago • 4 comments

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.

vreuter avatar Oct 09 '17 14:10 vreuter

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.

vreuter avatar Oct 09 '17 15:10 vreuter

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.

vreuter avatar Oct 09 '17 15:10 vreuter

@afrendeiro these are your functions, can you respond?

nsheff avatar Jun 18 '19 21:06 nsheff

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.

afrendeiro avatar Jun 19 '19 07:06 afrendeiro