[med-svn] [Git][med-team/pyensembl][upstream] New upstream version 2.0.0+ds

Étienne Mollier (@emollier) gitlab at salsa.debian.org
Mon May 2 20:54:54 BST 2022



Étienne Mollier pushed to branch upstream at Debian Med / pyensembl


Commits:
f4768b42 by Étienne Mollier at 2022-05-02T21:37:54+02:00
New upstream version 2.0.0+ds
- - - - -


25 changed files:

- PKG-INFO
- pyensembl.egg-info/PKG-INFO
- pyensembl.egg-info/entry_points.txt
- pyensembl/__init__.py
- pyensembl/common.py
- pyensembl/database.py
- pyensembl/download_cache.py
- pyensembl/ensembl_release_versions.py
- pyensembl/ensembl_url_templates.py
- pyensembl/exon.py
- pyensembl/fasta.py
- pyensembl/gene.py
- pyensembl/genome.py
- pyensembl/locus.py
- pyensembl/locus_with_genome.py
- pyensembl/memory_cache.py
- pyensembl/normalization.py
- pyensembl/reference_name.py
- pyensembl/search.py
- pyensembl/sequence_data.py
- pyensembl/shell.py
- pyensembl/species.py
- pyensembl/transcript.py
- + pyensembl/version.py
- setup.py


Changes:

=====================================
PKG-INFO
=====================================
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pyensembl
-Version: 1.9.4
+Version: 2.0.0
 Summary: Python interface to ensembl reference genome metadata
 Home-page: https://github.com/openvax/pyensembl
 Author: Alex Rubinsteyn


=====================================
pyensembl.egg-info/PKG-INFO
=====================================
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pyensembl
-Version: 1.9.4
+Version: 2.0.0
 Summary: Python interface to ensembl reference genome metadata
 Home-page: https://github.com/openvax/pyensembl
 Author: Alex Rubinsteyn


=====================================
pyensembl.egg-info/entry_points.txt
=====================================
@@ -1,3 +1,2 @@
 [console_scripts]
 pyensembl = pyensembl.shell:run
-


=====================================
pyensembl/__init__.py
=====================================
@@ -10,8 +10,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from __future__ import print_function, division, absolute_import
-
 from .memory_cache import MemoryCache
 from .database import Database
 from .download_cache import DownloadCache
@@ -39,10 +37,10 @@ from .species import (
     normalize_species_name
 )
 from .transcript import Transcript
-
-__version__ = '1.9.4'
+from .version import __version__
 
 __all__ = [
+    "__version__",
     "MemoryCache",
     "DownloadCache",
     "Database",


=====================================
pyensembl/common.py
=====================================
@@ -10,11 +10,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from __future__ import print_function, absolute_import
+import pickle
 
 from functools import wraps
 
-from six.moves import cPickle as pickle
 
 def dump_pickle(obj, filepath):
     with open(filepath, "wb") as f:


=====================================
pyensembl/database.py
=====================================
@@ -10,8 +10,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from __future__ import print_function, division, absolute_import
-
 import logging
 from os.path import split, join, exists, splitext
 import sqlite3


=====================================
pyensembl/download_cache.py
=====================================
@@ -10,7 +10,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from __future__ import print_function, division, absolute_import
 
 from os import listdir, remove
 from os.path import join, exists, split, abspath, isdir


=====================================
pyensembl/ensembl_release_versions.py
=====================================
@@ -10,10 +10,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from __future__ import print_function, division, absolute_import
-
 MIN_ENSEMBL_RELEASE = 54
-MAX_ENSEMBL_RELEASE = 104
+MAX_ENSEMBL_RELEASE = 106
 
 def check_release_number(release):
     """
@@ -25,8 +23,8 @@ def check_release_number(release):
     except:
         raise ValueError("Invalid Ensembl release: %s" % release)
 
-    if release < MIN_ENSEMBL_RELEASE or release > MAX_ENSEMBL_RELEASE:
+    if release < MIN_ENSEMBL_RELEASE:
         raise ValueError(
-            "Invalid Ensembl releases %d, must be between %d and %d" % (
-                release, MIN_ENSEMBL_RELEASE, MAX_ENSEMBL_RELEASE))
+            "Invalid Ensembl releases %d, must be greater than %d" % (
+                release, MIN_ENSEMBL_RELEASE))
     return release


=====================================
pyensembl/ensembl_url_templates.py
=====================================
@@ -19,7 +19,6 @@ For example, the human chromosomal DNA sequences for release 78 are in:
     ftp://ftp.ensembl.org/pub/release-78/fasta/homo_sapiens/dna/
 
 """
-from __future__ import print_function, division, absolute_import
 
 from .species import Species, find_species_by_name
 from .ensembl_release_versions import check_release_number


=====================================
pyensembl/exon.py
=====================================
@@ -10,7 +10,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from __future__ import print_function, division, absolute_import
 
 from .locus import Locus
 


=====================================
pyensembl/fasta.py
=====================================
@@ -18,13 +18,10 @@ Unfortunately, small errors creep in to different FASTA files on the
 Ensembl FTP server that no proper FASTA parser lets you skip over.
 """
 
-from __future__ import print_function, division, absolute_import
 
 from gzip import GzipFile
 import logging
 
-from six import binary_type, PY3
-
 
 logger = logging.getLogger(__name__)
 
@@ -34,9 +31,9 @@ def _parse_header_id(line):
     Pull the transcript or protein identifier from the header line
     which starts with '>'
     """
-    if type(line) is not binary_type:
+    if type(line) is not bytes:
         raise TypeError("Expected header line to be of type %s but got %s" % (
-            binary_type, type(line)))
+            bytes, type(line)))
 
     if len(line) <= 1:
         raise ValueError("No identifier on FASTA line")
@@ -125,12 +122,7 @@ class FastaParser(object):
                 logger.warn("No sequence data for '%s'", self.current_id)
             else:
                 sequence = b"".join(self.current_lines)
-                if PY3:
-                    # only decoding into an ASCII str for Python 3 since
-                    # the binary sequence type for Python 2 is already 'str'
-                    # and the unicode representation is inefficient
-                    # (using either 16 or 32 bits per character depends on build)
-                    sequence = sequence.decode("ascii")
+                sequence = sequence.decode("ascii")
                 return self.current_id, sequence
 
     def _read_header(self, line):


=====================================
pyensembl/gene.py
=====================================
@@ -10,7 +10,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from __future__ import print_function, division, absolute_import
 
 from memoized_property import memoized_property
 


=====================================
pyensembl/genome.py
=====================================
@@ -15,13 +15,10 @@ Contains the Genome class, with its millions of accessors and wrappers
 around an arbitrary genomic database.
 """
 
-from __future__ import print_function, division, absolute_import
 
 from os import remove
 from os.path import exists, getsize
 
-from six import string_types
-
 from serializable import Serializable
 
 from .memory_cache import MemoryCache
@@ -85,12 +82,12 @@ class Genome(Serializable):
         """
         if transcript_fasta_paths_or_urls is None:
             transcript_fasta_paths_or_urls = []
-        elif isinstance(transcript_fasta_paths_or_urls, string_types):
+        elif isinstance(transcript_fasta_paths_or_urls, str):
             transcript_fasta_paths_or_urls = [transcript_fasta_paths_or_urls]
 
         if protein_fasta_paths_or_urls is None:
             protein_fasta_paths_or_urls = []
-        elif isinstance(protein_fasta_paths_or_urls, string_types):
+        elif isinstance(protein_fasta_paths_or_urls, str):
             protein_fasta_paths_or_urls = [protein_fasta_paths_or_urls]
 
         self.reference_name = reference_name


=====================================
pyensembl/locus.py
=====================================
@@ -10,8 +10,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from __future__ import print_function, division, absolute_import
-
 from serializable import Serializable
 
 from .normalization import normalize_chromosome, normalize_strand


=====================================
pyensembl/locus_with_genome.py
=====================================
@@ -10,7 +10,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from __future__ import print_function, division, absolute_import
 
 from .locus import Locus
 


=====================================
pyensembl/memory_cache.py
=====================================
@@ -22,7 +22,6 @@ A piece of data is returned from one of three sources:
 2) Cache warm on disk. Parse or unpickle the serialized result into memory.
 3) Cache warm in memory. Return cached object.
 """
-from __future__ import print_function, division, absolute_import
 
 import logging
 from os import remove, stat


=====================================
pyensembl/normalization.py
=====================================
@@ -10,9 +10,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from __future__ import print_function, division, absolute_import
-
-from six.moves import intern
+from sys import intern
 from typechecks import is_string, is_integer
 
 # Manually memoizing here, since our simple common.memoize function has


=====================================
pyensembl/reference_name.py
=====================================
@@ -10,8 +10,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from __future__ import print_function, division, absolute_import
-
 from .ensembl_release import EnsemblRelease
 from .species import Species, find_species_by_name
 


=====================================
pyensembl/search.py
=====================================
@@ -10,8 +10,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from __future__ import print_function, division, absolute_import
-
 """
 Helper functions for searching over collections of PyEnsembl objects
 """


=====================================
pyensembl/sequence_data.py
=====================================
@@ -10,8 +10,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from __future__ import print_function, division, absolute_import
-
 from os import remove
 from os.path import exists, abspath, split, join
 import logging


=====================================
pyensembl/shell.py
=====================================
@@ -38,10 +38,7 @@ To install a genome from source files:
  --protein-fasta URL_OR_PATH
 """
 
-from __future__ import print_function, division, absolute_import
-
 import argparse
-import logging
 import logging.config
 import pkg_resources
 import os


=====================================
pyensembl/species.py
=====================================
@@ -10,8 +10,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from __future__ import print_function, absolute_import, division
-
 from serializable import Serializable
 
 from .ensembl_release_versions import MAX_ENSEMBL_RELEASE
@@ -204,5 +202,60 @@ brown_rat = Species.register(
     synonyms=["brown rat", "lab rat", "rat"],
     reference_assemblies={
         "Rnor_5.0": (75, 79),
-        "Rnor_6.0": (80, MAX_ENSEMBL_RELEASE),
+        "Rnor_6.0": (80, 104),
+        "mRatBN7.2": (105, MAX_ENSEMBL_RELEASE)
+    })
+
+macaque = cyno = Species.register(
+    latin_name="macaca_fascicularis",
+    synonyms=["macaque", "Crab-eating macaque"],
+    reference_assemblies={
+        "Macaca_fascicularis_6.0": (103, MAX_ENSEMBL_RELEASE),
     })
+
+green_monkey = Species.register(
+    latin_name="chlorocebus_sabaeus",
+    synonyms=["green_monkey", "african_green_monkey"],
+    reference_assemblies={
+        "ChlSab1.1": (86, MAX_ENSEMBL_RELEASE),
+    })
+
+rhesus = Species.register(
+    latin_name="macaca_mulatta",
+    synonyms=["rhesus"],
+    reference_assemblies={"Mmul_10": (75, MAX_ENSEMBL_RELEASE)})
+
+rabbit = Species.register(
+    latin_name="oryctolagus_cuniculus",
+    synonyms=["rabbit"],
+    reference_assemblies={"OryCun2.0": (75, MAX_ENSEMBL_RELEASE)})
+
+gerbil = Species.register(
+    latin_name="meriones_unguiculatus",
+    synonyms=["gerbil"],
+    reference_assemblies={"MunDraft-v1.0": (75, MAX_ENSEMBL_RELEASE)})
+
+syrian_hamster = Species.register(
+    latin_name="mesocricetus_auratus",
+    synonyms=["syrian_hamster"],
+    reference_assemblies={"MesAur1.0": (75, MAX_ENSEMBL_RELEASE)})
+
+chinese_hamster = Species.register(
+    latin_name="cricetulus_griseus_chok1gshd",
+    synonyms=["chinese_hamster"],
+    reference_assemblies={"CHOK1GS_HDv1": (75, MAX_ENSEMBL_RELEASE)})
+
+naked_mole_rat = Species.register(
+    latin_name="heterocephalus_glaber_female",
+    synonyms=["naked_mole_rat"],
+    reference_assemblies={"HetGla_female_1.0": (75, MAX_ENSEMBL_RELEASE)})
+
+guinea_pig = Species.register(
+    latin_name="cavia_porcellus",
+    synonyms=["guinea_pig"],
+    reference_assemblies={"Cavpor3.0": (75, MAX_ENSEMBL_RELEASE)})
+
+pig = Species.register(
+    latin_name="sus_scrofa",
+    synonyms=["pig"],
+    reference_assemblies={"Sscrofa11.1": (75, MAX_ENSEMBL_RELEASE)})


=====================================
pyensembl/transcript.py
=====================================
@@ -10,8 +10,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from __future__ import print_function, division, absolute_import
-
 from memoized_property import memoized_property
 
 from .common import memoize


=====================================
pyensembl/version.py
=====================================
@@ -0,0 +1 @@
+__version__ = '2.0.0'
\ No newline at end of file


=====================================
setup.py
=====================================
@@ -31,7 +31,7 @@ except IOError as e:
     readme_markdown = ""
 
 
-with open('%s/__init__.py' % package_name, 'r') as f:
+with open('%s/version.py' % package_name, 'r') as f:
     version = re.search(
         r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
         f.read(),
@@ -68,7 +68,6 @@ if __name__ == '__main__':
             "pandas>=0.15",
             "datacache>=1.1.4",
             "memoized-property>=1.0.2",
-            "six>=1.9.0",
             "gtfparse>=1.1.0",
             "serializable",
             "tinytimer",



View it on GitLab: https://salsa.debian.org/med-team/pyensembl/-/commit/f4768b424d3287211508f61c8b19a6c2af339e40

-- 
View it on GitLab: https://salsa.debian.org/med-team/pyensembl/-/commit/f4768b424d3287211508f61c8b19a6c2af339e40
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20220502/0f7485c0/attachment-0001.htm>


More information about the debian-med-commit mailing list