poseidon-framework / poseidon-hs

A toolset to work with modular genotype databases in the Poseidon format
https://poseidon-framework.github.io/#/trident
MIT License
7 stars 2 forks source link

Entity names should not be allowed to include () bracket openings and closings #243

Open stschiff opened 1 year ago

stschiff commented 1 year ago

In Xerxes, we have a YAML and a simple text interface to read in statistics. The simple text interface looks like

F3(Pop1, Pop2, Pop3)

because of this structure, the names of the groups cannot contain bracket openings and closings, and that is something that has to part of the parser. Right now, poseidon-hs does not include that constraints, which unfortunately leads to Xerxes having a redundant parser (https://github.com/poseidon-framework/poseidon-analysis-hs/blob/fedf433d10b5fb9f7bd9847928193c8fbc7f4318/src/Poseidon/Analysis/FStatsConfig.hs#L162)

It would be nice if we could simply add the two symbols ( and ) to the forbidden symbols in entity names here (https://github.com/poseidon-framework/poseidon-hs/blob/e7c1ce6813be3369b545d6f5834128fe1a74ceac/src/Poseidon/EntitiesList.hs#L126) so we can avoid this redundancy.

nevrome commented 1 year ago

Should this be added to the Poseidon schema? :thinking:

stschiff commented 1 year ago

Hmm... good point. I don't really know, to be honest. Technically, it is unnecessary to forbid brackets altogether, since I could in principle parse things like "MyFavoriteGroup(take 1)" by matching opening and closing brackets. The only thing that wouldn't work is "LetsTryAndHackThis)".

Finally, I could also change the interface to accept group names in quotation marks, optionally. Perhaps that would even be better...

I would not act on the schema for now, I will think more about it.