meowcat / MSnio

3 stars 3 forks source link

User defined fields #10

Open michaelwitting opened 5 years ago

michaelwitting commented 5 years ago

Shall we have the option for people to also include user defined fields? We cannot use them, but they could go to a dedicated slot, e.g. userdef. The of course have to follow some rules, otherwise it cannot be parsed. Just an idea that came to my mind today.

meowcat commented 5 years ago

Fundamentally, (in my opinion) the MSnio (we should finally decide on a name! #3 ) package should first and foremost provide IO and conversion infrastructure, and second a "default" ruleset to use it with. In the end, both the central field definitions and the format-specific schemas should just be two YAML files and anyone can make their own versions of it.

So there are already two ways of making new fields: 1) make your own versions of the YAML files 2) propose a pull request for the "official" YAML files if your field is of general interest.

But it is still a good question if and how a generic data field could be useful in the standard definition. I think #1 goes in this direction. Same as for PROCESSING, we don't know all specific subtags a priori but we can specify a canonical way to read and write them from a file. (E.g. using Synon: $:99 in NIST MSP or COMMENT in MassBank, even though a subtag usage of COMMENT in MassBank is unofficial!!!)