Skip to content

Commit

Permalink
updated Astring for tobytes
Browse files Browse the repository at this point in the history
  • Loading branch information
Acribbs committed Apr 1, 2024
1 parent 94e7e7c commit 63a7a95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cgat/AString.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __getitem__(self, *args):
"""return slice as a string."""

if IS_PY3:
return array.__getitem__(self, *args).tostring().decode("ascii")
return array.__getitem__(self, *args).tobytes().decode("ascii")
else:
return array.__getitem__(self, *args).tostring()

Expand All @@ -67,6 +67,6 @@ def __setitem__(self, start, end, sub):

def __str__(self):
if IS_PY3:
return self.tostring().decode("ascii")
return self.tobytes().decode("ascii")
else:
return self.tostring()
1 change: 0 additions & 1 deletion cgat/tools/gtf2fasta.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,6 @@ def annotateGenome(iterator, fasta, options, default_code=DEFAULT_CODE):

E.info("started output")
for k in sorted(annotations.keys()):
# options.stdout.write(">%s\n%s\n" % (k, annotations[k].tostring()))
options.stdout.write(">%s\n%s\n" % (k, "".join(annotations[k])))


Expand Down

0 comments on commit 63a7a95

Please sign in to comment.