cancervariants / gene-normalization

Services and guidelines for normalizing genes
https://gene-normalizer.readthedocs.io/latest/
MIT License
1 stars 3 forks source link

Fix strand enum #350

Open jsstevenson opened 4 months ago

jsstevenson commented 4 months ago

Cool-Seq-Tool's strand class looks like this:

class Strand(IntEnum):
    """Create enum for positive and negative strand"""

    POSITIVE = 1
    NEGATIVE = -1

FUSOR's strand class looks like this:

class Strand(str, Enum):
    """Define possible values for strand"""

    POSITIVE = "+"
    NEGATIVE = "-"

and the Gene Normalizer's class looks like this:

class Strand(str, Enum):
    """Define string constraints for strand attribute."""

    FORWARD = "+"
    REVERSE = "-"

edit: another one! agct:

class Strand(str, Enum):
    """Constrain strand values."""

    POSITIVE = "+"
    NEGATIVE = "-"

This is all very annoying. Ideally, there would be a base Strand class somewhere that all of these tools could import from, but it's not going to be in VRS and it seems like a non-high priority for groups like sequence annotation. In the meantime, we should make all of them consistent, but that entails some decisions and API breaks.

I think I like the Cool-Seq-Tool way the most but obviously it doesn't really matter.