OpenMS icon indicating copy to clipboard operation
OpenMS copied to clipboard

KNIME nodes that have NAN for double parameter are broken

Open timosachsenberg opened this issue 1 year ago • 2 comments

IDFilter score:psm is by default NAN (wherever this variable is defined)

  • "nan" is written out to CTD files (generated on Linux)
  • the CTD Parser skips it because Java Double.parseDouble() does not accept "nan" but expects "NaN"

Decisions we need to take:

  • is it sensible to use the new NAN? Will probably interfere with many GUI / interfaces that display tool parameter
  • where to put the workaround? e.g., while writing CTD and parsing (in OpenMS) or in GKN

timosachsenberg avatar Oct 22 '24 13:10 timosachsenberg

My suggestion: why even have a default value if the default is to do no filtering.. Empty string = not set

jpfeuffer avatar Oct 22 '24 13:10 jpfeuffer

I like the idea but we would need to check that this is properly handled e.g. some downstream tools might pass -mydoubleparameter like a flag if the string is empty. And e.g. what OpenMS would do in this case.

timosachsenberg avatar Oct 22 '24 13:10 timosachsenberg

My suggestion: why even have a default value if the default is to do no filtering.. Empty string = not set

This does not work with our current way we handle optional params (they need a non-empty default). And it looks weird on the commandline, -score:psm "" -moreflags...

Our current implementation does not care about upper/lowercase for NAN/nan/NaN,nAn... all the same. So what about writing NaN to the CTD/INI, so Java is happy? Alternatively, adapting the GKN also sounds like it's not a major problem.

In any case I much prefer the new params, since the old ones' names are inaccurate and you cannot filter for an FDR=0 with them (since this switches off the filtering).

cbielow avatar Oct 28 '24 16:10 cbielow