Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Formatting of extensions does not follow spec #804

@schorlton-bugseq

Description

@schorlton-bugseq

Thanks for your work on this important tool!

Running v1.5.6 installed via bioconda:

from hgvs.edit import (
    AAExt,
)
from hgvs.posedit import PosEdit
from hgvs.location import Interval, AAPosition

print(PosEdit(
        pos=Interval(
            start=AAPosition(
                base=1,
                aa="M",
            ),
            end=AAPosition(
                base=1,
                aa="M",
            ),
        ),
        edit=AAExt(
            ref="M",
            aaterm="LGM",
            length=-2
        ),
    )
)

Returns: Met1extLeuGlyMet-2

Based on spec 21.1.3 (https://hgvs-nomenclature.org/stable/recommendations/protein/extension/), a N-terminus extension should be represented as:
Met1ext-2

I think they likely changed either the spec or the docs as I see this in Examples:

Image

I also think C-terminus extensions are impacted:

from hgvs.edit import (
    AAExt,
)
from hgvs.posedit import PosEdit
from hgvs.location import Interval, AAPosition

print(PosEdit(
        pos=Interval(
            start=AAPosition(
                base=10,
                aa="*",
            ),
            end=AAPosition(
                base=10,
                aa="*",
            ),
        ),
        edit=AAExt(
            ref="*",
            aaterm="LG*",
            length=2
        ),
    )
)

Returns Ter10extLeuGlyTer2

But should be Ter10LeuextTer2

Thanks again!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions