[med-svn] [Git][med-team/python-pyfaidx][master] 5 commits: routine-update: New upstream version

Nilesh Patra gitlab at salsa.debian.org
Sat Dec 12 13:04:02 GMT 2020



Nilesh Patra pushed to branch master at Debian Med / python-pyfaidx


Commits:
f02905d7 by Nilesh Patra at 2020-12-12T18:30:04+05:30
routine-update: New upstream version

- - - - -
008eb56e by Nilesh Patra at 2020-12-12T18:30:05+05:30
New upstream version 0.5.9.2
- - - - -
3faf6982 by Nilesh Patra at 2020-12-12T18:30:07+05:30
Update upstream source from tag 'upstream/0.5.9.2'

Update to upstream version '0.5.9.2'
with Debian dir ec2f0e7678798550c31510ad2cbeec3cbcf86944
- - - - -
29f8cad0 by Nilesh Patra at 2020-12-12T18:30:07+05:30
routine-update: Standards-Version: 4.5.1

- - - - -
d7dc7eaf by Nilesh Patra at 2020-12-12T18:30:23+05:30
routine-update: Ready to upload to unstable

- - - - -


3 changed files:

- debian/changelog
- debian/control
- pyfaidx/__init__.py


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+python-pyfaidx (0.5.9.2-1) unstable; urgency=medium
+
+  * Team upload.
+  * New upstream version
+  * Standards-Version: 4.5.1 (routine-update)
+
+ -- Nilesh Patra <npatra974 at gmail.com>  Sat, 12 Dec 2020 18:30:23 +0530
+
 python-pyfaidx (0.5.9.1-1) unstable; urgency=medium
 
   [ Andreas Tille ]


=====================================
debian/control
=====================================
@@ -15,7 +15,7 @@ Build-Depends: debhelper-compat (= 13),
                python3-mock,
                samtools,
                tabix <!nocheck>
-Standards-Version: 4.5.0
+Standards-Version: 4.5.1
 Vcs-Browser: https://salsa.debian.org/med-team/python-pyfaidx
 Vcs-Git: https://salsa.debian.org/med-team/python-pyfaidx.git
 Homepage: https://github.com/mdshw5/pyfaidx


=====================================
pyfaidx/__init__.py
=====================================
@@ -29,7 +29,7 @@ if sys.version_info > (3, ):
 
 dna_bases = re.compile(r'([ACTGNactgnYRWSKMDVHBXyrwskmdvhbx]+)')
 
-__version__ = '0.5.9.1'
+__version__ = '0.5.9.2'
 
 
 class KeyFunctionError(ValueError):
@@ -659,11 +659,12 @@ class Faidx(object):
 
         # Calculate offset (https://github.com/samtools/htslib/blob/20238f354894775ed22156cdd077bc0d544fa933/faidx.c#L398)
         newlines_before = int(
-            (start0 - 1) / i.lenc * (i.lenb - i.lenc)) if start0 > 0 and i.lenc else 0
-        newlines_to_end = int(end / i.lenc * (i.lenb - i.lenc)) if i.lenc else 0
+            (start0 - 1) / i.lenc) if start0 > 0 and i.lenc else 0
+        newlines_to_end = int(end / i.lenc) if i.lenc else 0
         newlines_inside = newlines_to_end - newlines_before
-        seq_blen = newlines_inside + seq_len
-        bstart = i.offset + newlines_before + start0
+        newline_blen = i.lenb - i.lenc
+        seq_blen = newlines_inside * newline_blen + seq_len
+        bstart = i.offset + newlines_before * newline_blen + start0
         if seq_blen < 0 and self.strict_bounds:
             raise FetchError("Requested coordinates start={0:n} end={1:n} are "
                              "invalid.\n".format(start, end))
@@ -674,7 +675,7 @@ class Faidx(object):
         with self.lock:
             if self._bgzf:  # We can't add to virtual offsets, so we need to read from the beginning of the record and trim the beginning if needed
                 self.file.seek(i.offset)
-                chunk = start0 + newlines_before + newlines_inside + seq_len
+                chunk = start0 + (newlines_before * newline_blen) + (newlines_inside * newline_blen) + seq_len
                 chunk_seq = self.file.read(chunk).decode()
                 seq = chunk_seq[start0 + newlines_before:]
             else:



View it on GitLab: https://salsa.debian.org/med-team/python-pyfaidx/-/compare/0d6730165fd7ca690a02a150fb2767ac4bb00788...d7dc7eaf8b11cef65628aed56ac5659d290a7c6c

-- 
View it on GitLab: https://salsa.debian.org/med-team/python-pyfaidx/-/compare/0d6730165fd7ca690a02a150fb2767ac4bb00788...d7dc7eaf8b11cef65628aed56ac5659d290a7c6c
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/20201212/22d84ec3/attachment-0001.html>


More information about the debian-med-commit mailing list