Skip to content
Commits on Source (4)
language: python
sudo: false
sudo: required
dist: xenial
python:
- 'nightly'
- '3.7'
- '3.6'
- '3.5'
- '3.4'
......@@ -36,7 +38,7 @@ deploy:
secure: MbSaeuitkVTZqxa0PJ3RcR1aMf+B/sMbcx2sWOo9xfLlRFDFpYWJZ0EfXWEhrVu2YWXpBsasgunTDWSi0jNcZMH92MzOC+UTVYr45LO5sy6hm4iSiAgm/DPgYWdjP0SFKr7eL/HWPS+gHvgkXL1upleX21O358bxaezoasuKFvs=
on:
all_branches: true
python: 2.7
python: 3.6
tags: true
repo: mdshw5/pyfaidx
matrix:
......
python-pyfaidx (0.5.5.1-1) UNRELEASED; urgency=medium
python-pyfaidx (0.5.5.2-1) unstable; urgency=medium
* New upstream version
Closes: #911874
* Standards-Version: 4.2.1
* Secure URI in copyright format
-- Andreas Tille <tille@debian.org> Thu, 25 Oct 2018 20:30:14 +0200
-- Andreas Tille <tille@debian.org> Sat, 27 Oct 2018 07:11:40 +0200
python-pyfaidx (0.5.4-1) unstable; urgency=medium
......
......@@ -25,7 +25,7 @@ if sys.version_info > (3, ):
dna_bases = re.compile(r'([ACTGNactgnYRWSKMDVHBXyrwskmdvhbx]+)')
__version__ = '0.5.5.1'
__version__ = '0.5.5.2'
class KeyFunctionError(ValueError):
......@@ -813,7 +813,7 @@ class FastaRecord(object):
raise
def __iter__(self):
""" Construct a line-based iterator that respects the original line lengths. """
""" Construct a line-based generator that respects the original line lengths. """
line_len = self._fa.faidx.index[self.name].lenc
start = 0
while True:
......@@ -822,11 +822,11 @@ class FastaRecord(object):
yield self[start:end]
else:
yield self[start:]
raise StopIteration
return
start += line_len
def __reversed__(self):
""" Reverse line-based iterator """
""" Reverse line-based generator """
line_len = self._fa.faidx.index[self.name].lenc
# have to determine last line length
last_line = len(self) % line_len
......@@ -839,7 +839,7 @@ class FastaRecord(object):
yield self[start:end][::-1]
else:
yield self[:end][::-1]
raise StopIteration
return
if end == len(self): # first iteration
end -= last_line
else:
......