From b427c9da5a10c6155f8f69d0387c19914657487a Mon Sep 17 00:00:00 2001 From: Acribbs Date: Mon, 1 Apr 2024 16:58:15 +0100 Subject: [PATCH] removed pins --- cgat/IndexedFasta.py | 4 ++-- cgat/SequenceProperties.py | 2 +- conda/environments/cgat-apps.yml | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cgat/IndexedFasta.py b/cgat/IndexedFasta.py index 1ffdf89f..543ac373 100644 --- a/cgat/IndexedFasta.py +++ b/cgat/IndexedFasta.py @@ -901,7 +901,7 @@ def getSequence(self, if self.mNoSeek: # read directly from position - p.fromstring( + p.frombytes( self.mDatabaseFile.read(block_size, data[3], first_pos, last_pos)) else: @@ -909,7 +909,7 @@ def getSequence(self, last_pos += pos_seq self.mDatabaseFile.seek(first_pos) - p.fromstring(self.mDatabaseFile.read(last_pos - first_pos)) + p.frombytes(self.mDatabaseFile.read(last_pos - first_pos)) if str(strand) in ("-", "0", "-1"): p = AString(Genomics.reverse_complement(str(p))) diff --git a/cgat/SequenceProperties.py b/cgat/SequenceProperties.py index 7817ec73..52ff675e 100644 --- a/cgat/SequenceProperties.py +++ b/cgat/SequenceProperties.py @@ -141,7 +141,7 @@ def loadSequence(self, sequence, seqtype="na"): # map to printable letters: hid has length 22, so the padded '=' are # truncated. You have to add them, if you ever want to decode, # but who would do such a thing :=) - r = base64.encodestring(h)[0:22].decode("ascii") + r = base64.encodebytes(h)[0:22].decode("ascii") # finally substitute some characters: # '/' for '_', so we have legal file names diff --git a/conda/environments/cgat-apps.yml b/conda/environments/cgat-apps.yml index 230288bb..d059f719 100644 --- a/conda/environments/cgat-apps.yml +++ b/conda/environments/cgat-apps.yml @@ -26,7 +26,6 @@ dependencies: - pybigwig - pysam>=0.18.0 - pyyaml -- pytest<=5.4.3 - quicksect - rdflib - scikit-learn