Loading .travis.yml +4 −2 Original line number Diff line number Diff line language: python sudo: false sudo: required dist: xenial python: - 'nightly' - '3.7' - '3.6' - '3.5' - '3.4' Loading Loading @@ -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: Loading pyfaidx/__init__.py +5 −5 Original line number Diff line number Diff line Loading @@ -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): Loading Loading @@ -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: Loading @@ -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 Loading @@ -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: Loading Loading
.travis.yml +4 −2 Original line number Diff line number Diff line language: python sudo: false sudo: required dist: xenial python: - 'nightly' - '3.7' - '3.6' - '3.5' - '3.4' Loading Loading @@ -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: Loading
pyfaidx/__init__.py +5 −5 Original line number Diff line number Diff line Loading @@ -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): Loading Loading @@ -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: Loading @@ -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 Loading @@ -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: Loading