[med-svn] [Git][med-team/python-nanomath][master] 3 commits: New upstream version 1.2.1+ds

Nilesh Patra (@nilesh) gitlab at salsa.debian.org
Sun May 16 14:29:49 BST 2021



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


Commits:
461e5d26 by Nilesh Patra at 2021-05-16T18:56:01+05:30
New upstream version 1.2.1+ds
- - - - -
e6ace3f3 by Nilesh Patra at 2021-05-16T18:56:01+05:30
Update upstream source from tag 'upstream/1.2.1+ds'

Update to upstream version '1.2.1+ds'
with Debian dir e7e7ce0148ed345eacb60f253f275101c9da4cba
- - - - -
9d4cbf72 by Nilesh Patra at 2021-05-16T18:57:38+05:30
Interim changelog entry

- - - - -


5 changed files:

- PKG-INFO
- debian/changelog
- nanomath.egg-info/PKG-INFO
- nanomath/nanomath.py
- nanomath/version.py


Changes:

=====================================
PKG-INFO
=====================================
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: nanomath
-Version: 1.2.0
+Version: 1.2.1
 Summary: A few simple math function for other Oxford Nanopore processing scripts
 Home-page: https://github.com/wdecoster/nanomath
 Author: Wouter De Coster


=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+python-nanomath (1.2.1+ds-1) UNRELEASED; urgency=medium
+
+  * New upstream version 1.2.1+ds
+
+ -- Nilesh Patra <nilesh at debian.org>  Sun, 16 May 2021 18:56:28 +0530
+
 python-nanomath (1.2.0+ds-1) unstable; urgency=medium
 
   * New upstream version


=====================================
nanomath.egg-info/PKG-INFO
=====================================
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: nanomath
-Version: 1.2.0
+Version: 1.2.1
 Summary: A few simple math function for other Oxford Nanopore processing scripts
 Home-page: https://github.com/wdecoster/nanomath
 Author: Wouter De Coster


=====================================
nanomath/nanomath.py
=====================================
@@ -53,6 +53,11 @@ class Stats(object):
                                          col="quals",
                                          values=["quals", "lengths"])
             self._reads_above_qual = [reads_above_qual(df, q) for q in self._qualgroups]
+        else:
+            self._top5_lengths = get_top_5(df=df,
+                                           col="lengths",
+                                           values=["lengths"],
+                                           fill='quals')
 
     def long_features_as_string(self):
         """formatting long features to a string to print for legacy stats output"""
@@ -95,12 +100,16 @@ class Stats(object):
 
     def unwind_long_features_top5(self, feature, name):
         """for tsv stats output"""
+        if feature not in self.__dict__:
+            return
         for entry, label in zip(self.__dict__[feature], range(1, 6)):
             self.__dict__[name + ':' + str(label)] = '{} ({})'.format(round(entry[0], ndigits=1),
                                                                       round(entry[1], ndigits=1))
 
     def unwind_long_features_above_qual(self, feature, name):
         """for tsv stats output"""
+        if feature not in self.__dict__:
+            return
         for entry, label in zip(self.__dict__[feature],
                                 ['>Q{}:'.format(q) for q in self._qualgroups]):
             numberAboveQ, megAboveQ = entry
@@ -148,13 +157,20 @@ def ave_qual(quals, qround=False, tab=errs_tab(128)):
         return None
 
 
-def get_top_5(df, col, values):
+def get_top_5(df, col, values, fill=False):
     if "readIDs" in df:
         values.append("readIDs")
-    return df.sort_values(col, ascending=False) \
-        .head(5)[values] \
-        .reset_index(drop=True) \
-        .itertuples(index=False, name=None)
+    if fill:
+        return df.sort_values(col, ascending=False) \
+            .head(5)[values] \
+            .assign(fill=[0]*5) \
+            .reset_index(drop=True) \
+            .itertuples(index=False, name=None)
+    else:
+        return df.sort_values(col, ascending=False) \
+            .head(5)[values] \
+            .reset_index(drop=True) \
+            .itertuples(index=False, name=None)
 
 
 def reads_above_qual(df, qual):


=====================================
nanomath/version.py
=====================================
@@ -1 +1 @@
-__version__ = "1.2.0"
+__version__ = "1.2.1"



View it on GitLab: https://salsa.debian.org/med-team/python-nanomath/-/compare/98ae0949e3970fc8ba26243457ddc65d30046723...9d4cbf7267b245f11e68c505f4c0766512f943b2

-- 
View it on GitLab: https://salsa.debian.org/med-team/python-nanomath/-/compare/98ae0949e3970fc8ba26243457ddc65d30046723...9d4cbf7267b245f11e68c505f4c0766512f943b2
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/20210516/960553e1/attachment-0001.htm>


More information about the debian-med-commit mailing list