From 3a99f2daab83198590130c18cc36eb58aba9b6f6 Mon Sep 17 00:00:00 2001 From: John Eargle Date: Thu, 28 May 2015 14:23:55 -0500 Subject: [PATCH 1/3] added 1-letter amino acid codes --- pyhgvs/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyhgvs/__init__.py b/pyhgvs/__init__.py index c9b2c1b..0a11c70 100644 --- a/pyhgvs/__init__.py +++ b/pyhgvs/__init__.py @@ -170,7 +170,7 @@ class HGVSRegex(object): for regex in CDNA_ALLELE] # Peptide syntax - PEP = "([A-Z]([a-z]{2}))+" + PEP = "(([A-Z]([a-z]{2}))|([GAVLIMFWPSTCYNQDEKRH\*]))+" PEP_REF = "(?P" + PEP + ")" PEP_REF2 = "(?P" + PEP + ")" PEP_ALT = "(?P" + PEP + ")" From 55b7541a5df9c58b92c4459b279ccbdd027f6cdb Mon Sep 17 00:00:00 2001 From: John Eargle Date: Thu, 28 May 2015 16:19:34 -0500 Subject: [PATCH 2/3] added termination suffix to frameshift (fs) --- pyhgvs/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyhgvs/__init__.py b/pyhgvs/__init__.py index 0a11c70..663c154 100644 --- a/pyhgvs/__init__.py +++ b/pyhgvs/__init__.py @@ -175,7 +175,7 @@ class HGVSRegex(object): PEP_REF2 = "(?P" + PEP + ")" PEP_ALT = "(?P" + PEP + ")" - PEP_EXTRA = "(?P(|=|\?)(|fs))" + PEP_EXTRA = "(?P(|=|\?)(|fs((Ter|\*)\d+)?))" # Peptide allele syntax PEP_ALLELE = [ From bb86c0372a21b313022b3e5d31c9e829a8389ec5 Mon Sep 17 00:00:00 2001 From: Kirill Tsukanov Date: Fri, 11 May 2018 12:01:02 +0300 Subject: [PATCH 3/3] Fix install error when PIP 10 is installed Since PIP 10 has a different module structure, two import calls fail. This change fixes it, while stitll maintaining compatibility with PIP 9 or earlier. --- setup.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index ace27d1..3ca2cef 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,12 @@ #!/usr/bin/env python from setuptools import setup -from pip.req import parse_requirements -from pip.download import PipSession +try: # pip 9 or earlier + from pip.req import parse_requirements + from pip.download import PipSession +except ImportError: # pip 10 or later + from pip._internal.req import parse_requirements + from pip._internal.download import PipSession import sys description = ("This library provides a simple to use Python API for parsing, "