New Upstream Snapshot - python-nanomath
Ready changes
Summary
Merged new upstream version: 1.2.1+git20210604.1.79b7f85+ds (was: 1.2.1+ds).
Resulting package
Built on 2023-01-20T06:02 (took 13m56s)
The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:
apt install -t fresh-snapshots python3-nanomath
Diff
diff --git a/PKG-INFO b/PKG-INFO
index 3aaf2c1..a015165 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,4 +1,4 @@
-Metadata-Version: 1.2
+Metadata-Version: 2.1
Name: nanomath
Version: 1.2.1
Summary: A few simple math function for other Oxford Nanopore processing scripts
@@ -6,47 +6,7 @@ Home-page: https://github.com/wdecoster/nanomath
Author: Wouter De Coster
Author-email: decosterwouter@gmail.com
License: GPLv3
-Description: # nanomath
- This module provides a few simple math and statistics functions for other scripts processing Oxford Nanopore sequencing data
-
- [![Twitter URL](https://img.shields.io/twitter/url/https/twitter.com/wouter_decoster.svg?style=social&label=Follow%20%40wouter_decoster)](https://twitter.com/wouter_decoster)
- [![install with conda](https://anaconda.org/bioconda/nanomath/badges/installer/conda.svg)](https://anaconda.org/bioconda/nanomath)
- [![install with Debian](https://www.debian.org/logos/button-mini.png)](https://tracker.debian.org/pkg/python-nanomath)
- [![Build Status](https://travis-ci.org/wdecoster/nanomath.svg?branch=master)](https://travis-ci.org/wdecoster/nanomath)
- [![Code Health](https://landscape.io/github/wdecoster/nanomath/master/landscape.svg?style=flat)](https://landscape.io/github/wdecoster/nanomath/master)
-
-
- ## FUNCTIONS
- * Calculate read N50 from a set of lengths `get_N50(readlenghts)`
- * Remove extreme length outliers from a dataset `remove_length_outliers(dataframe, columname)`
- * Calculate the average Phred quality of a read `ave_qual(qualscores)`
- * Write out the statistics report after calling readstats function `write_stats(dataframe, outputname)`
- * Compute a number of statistics, return a dictionary `calc_read_stats(dataframe)`
-
-
- ## INSTALLATION
- ```bash
- pip install nanomath
- ```
- or
- [![install with conda](https://anaconda.org/bioconda/nanomath/badges/installer/conda.svg)](https://anaconda.org/bioconda/nanomath)
- ```
- conda install -c bioconda nanomath
- ```
-
- ## STATUS
- [![Build Status](https://travis-ci.org/wdecoster/nanomath.svg?branch=master)](https://travis-ci.org/wdecoster/nanomath)
-
-
- ## CONTRIBUTORS
- [@alexomics](https://github.com/alexomics) for fixing the indentation of the printed stats
-
-
- ## CITATION
- If you use this tool, please consider citing our [publication](https://academic.oup.com/bioinformatics/advance-article/doi/10.1093/bioinformatics/bty149/4934939).
-
Keywords: nanopore sequencing plotting quality control
-Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
@@ -56,3 +16,43 @@ Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Requires-Python: >=3
+License-File: LICENSE
+
+# nanomath
+This module provides a few simple math and statistics functions for other scripts processing Oxford Nanopore sequencing data
+
+[![Twitter URL](https://img.shields.io/twitter/url/https/twitter.com/wouter_decoster.svg?style=social&label=Follow%20%40wouter_decoster)](https://twitter.com/wouter_decoster)
+[![install with conda](https://anaconda.org/bioconda/nanomath/badges/installer/conda.svg)](https://anaconda.org/bioconda/nanomath)
+[![install with Debian](https://www.debian.org/logos/button-mini.png)](https://tracker.debian.org/pkg/python-nanomath)
+[![Build Status](https://travis-ci.org/wdecoster/nanomath.svg?branch=master)](https://travis-ci.org/wdecoster/nanomath)
+[![Code Health](https://landscape.io/github/wdecoster/nanomath/master/landscape.svg?style=flat)](https://landscape.io/github/wdecoster/nanomath/master)
+
+
+## FUNCTIONS
+* Calculate read N50 from a set of lengths `get_N50(readlenghts)`
+* Remove extreme length outliers from a dataset `remove_length_outliers(dataframe, columname)`
+* Calculate the average Phred quality of a read `ave_qual(qualscores)`
+* Write out the statistics report after calling readstats function `write_stats(dataframe, outputname)`
+* Compute a number of statistics, return a dictionary `calc_read_stats(dataframe)`
+
+
+## INSTALLATION
+```bash
+pip install nanomath
+```
+or
+[![install with conda](https://anaconda.org/bioconda/nanomath/badges/installer/conda.svg)](https://anaconda.org/bioconda/nanomath)
+```
+conda install -c bioconda nanomath
+```
+
+## STATUS
+[![Build Status](https://travis-ci.org/wdecoster/nanomath.svg?branch=master)](https://travis-ci.org/wdecoster/nanomath)
+
+
+## CONTRIBUTORS
+[@alexomics](https://github.com/alexomics) for fixing the indentation of the printed stats
+
+
+## CITATION
+If you use this tool, please consider citing our [publication](https://academic.oup.com/bioinformatics/advance-article/doi/10.1093/bioinformatics/bty149/4934939).
diff --git a/README.rst b/README.rst
deleted file mode 100644
index 731fb2c..0000000
--- a/README.rst
+++ /dev/null
@@ -1,63 +0,0 @@
-nanomath
-========
-
-This module provides a few simple math and statistics functions for
-other scripts processing Oxford Nanopore sequencing data
-
-|Twitter URL| |install with conda| |install with Debian| |Build Status|
-|Code Health|
-
-FUNCTIONS
----------
-
-- Calculate read N50 from a set of lengths ``get_N50(readlenghts)``
-- Remove extreme length outliers from a dataset
- ``remove_length_outliers(dataframe, columname)``
-- Calculate the average Phred quality of a read
- ``ave_qual(qualscores)``
-- Write out the statistics report after calling readstats function
- ``write_stats(dataframe, outputname)``
-- Compute a number of statistics, return a dictionary
- ``calc_read_stats(dataframe)``
-
-INSTALLATION
-------------
-
-.. code:: bash
-
- pip install nanomath
-
-| or
-| |install with conda|
-
-::
-
- conda install -c bioconda nanomath
-
-STATUS
-------
-
-|Build Status|
-
-CONTRIBUTORS
-------------
-
-[@alexomics](https://github.com/alexomics) for fixing the indentation of
-the printed stats
-
-CITATION
---------
-
-If you use this tool, please consider citing our
-`publication <https://academic.oup.com/bioinformatics/advance-article/doi/10.1093/bioinformatics/bty149/4934939>`__.
-
-.. |Twitter URL| image:: https://img.shields.io/twitter/url/https/twitter.com/wouter_decoster.svg?style=social&label=Follow%20%40wouter_decoster
- :target: https://twitter.com/wouter_decoster
-.. |install with conda| image:: https://anaconda.org/bioconda/nanomath/badges/installer/conda.svg
- :target: https://anaconda.org/bioconda/nanomath
-.. |install with Debian| image:: https://www.debian.org/logos/button-mini.png
- :target: https://tracker.debian.org/pkg/python-nanomath
-.. |Build Status| image:: https://travis-ci.org/wdecoster/nanomath.svg?branch=master
- :target: https://travis-ci.org/wdecoster/nanomath
-.. |Code Health| image:: https://landscape.io/github/wdecoster/nanomath/master/landscape.svg?style=flat
- :target: https://landscape.io/github/wdecoster/nanomath/master
diff --git a/debian/changelog b/debian/changelog
index 3389544..a64cb0a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+python-nanomath (1.2.1+git20210604.1.79b7f85+ds-1) UNRELEASED; urgency=low
+
+ * New upstream snapshot.
+
+ -- Debian Janitor <janitor@jelmer.uk> Fri, 20 Jan 2023 05:50:47 -0000
+
python-nanomath (1.2.1+ds-1) unstable; urgency=medium
* New upstream version 1.2.1+ds
diff --git a/nanomath.egg-info/PKG-INFO b/nanomath.egg-info/PKG-INFO
index 3aaf2c1..a015165 100644
--- a/nanomath.egg-info/PKG-INFO
+++ b/nanomath.egg-info/PKG-INFO
@@ -1,4 +1,4 @@
-Metadata-Version: 1.2
+Metadata-Version: 2.1
Name: nanomath
Version: 1.2.1
Summary: A few simple math function for other Oxford Nanopore processing scripts
@@ -6,47 +6,7 @@ Home-page: https://github.com/wdecoster/nanomath
Author: Wouter De Coster
Author-email: decosterwouter@gmail.com
License: GPLv3
-Description: # nanomath
- This module provides a few simple math and statistics functions for other scripts processing Oxford Nanopore sequencing data
-
- [![Twitter URL](https://img.shields.io/twitter/url/https/twitter.com/wouter_decoster.svg?style=social&label=Follow%20%40wouter_decoster)](https://twitter.com/wouter_decoster)
- [![install with conda](https://anaconda.org/bioconda/nanomath/badges/installer/conda.svg)](https://anaconda.org/bioconda/nanomath)
- [![install with Debian](https://www.debian.org/logos/button-mini.png)](https://tracker.debian.org/pkg/python-nanomath)
- [![Build Status](https://travis-ci.org/wdecoster/nanomath.svg?branch=master)](https://travis-ci.org/wdecoster/nanomath)
- [![Code Health](https://landscape.io/github/wdecoster/nanomath/master/landscape.svg?style=flat)](https://landscape.io/github/wdecoster/nanomath/master)
-
-
- ## FUNCTIONS
- * Calculate read N50 from a set of lengths `get_N50(readlenghts)`
- * Remove extreme length outliers from a dataset `remove_length_outliers(dataframe, columname)`
- * Calculate the average Phred quality of a read `ave_qual(qualscores)`
- * Write out the statistics report after calling readstats function `write_stats(dataframe, outputname)`
- * Compute a number of statistics, return a dictionary `calc_read_stats(dataframe)`
-
-
- ## INSTALLATION
- ```bash
- pip install nanomath
- ```
- or
- [![install with conda](https://anaconda.org/bioconda/nanomath/badges/installer/conda.svg)](https://anaconda.org/bioconda/nanomath)
- ```
- conda install -c bioconda nanomath
- ```
-
- ## STATUS
- [![Build Status](https://travis-ci.org/wdecoster/nanomath.svg?branch=master)](https://travis-ci.org/wdecoster/nanomath)
-
-
- ## CONTRIBUTORS
- [@alexomics](https://github.com/alexomics) for fixing the indentation of the printed stats
-
-
- ## CITATION
- If you use this tool, please consider citing our [publication](https://academic.oup.com/bioinformatics/advance-article/doi/10.1093/bioinformatics/bty149/4934939).
-
Keywords: nanopore sequencing plotting quality control
-Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
@@ -56,3 +16,43 @@ Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Requires-Python: >=3
+License-File: LICENSE
+
+# nanomath
+This module provides a few simple math and statistics functions for other scripts processing Oxford Nanopore sequencing data
+
+[![Twitter URL](https://img.shields.io/twitter/url/https/twitter.com/wouter_decoster.svg?style=social&label=Follow%20%40wouter_decoster)](https://twitter.com/wouter_decoster)
+[![install with conda](https://anaconda.org/bioconda/nanomath/badges/installer/conda.svg)](https://anaconda.org/bioconda/nanomath)
+[![install with Debian](https://www.debian.org/logos/button-mini.png)](https://tracker.debian.org/pkg/python-nanomath)
+[![Build Status](https://travis-ci.org/wdecoster/nanomath.svg?branch=master)](https://travis-ci.org/wdecoster/nanomath)
+[![Code Health](https://landscape.io/github/wdecoster/nanomath/master/landscape.svg?style=flat)](https://landscape.io/github/wdecoster/nanomath/master)
+
+
+## FUNCTIONS
+* Calculate read N50 from a set of lengths `get_N50(readlenghts)`
+* Remove extreme length outliers from a dataset `remove_length_outliers(dataframe, columname)`
+* Calculate the average Phred quality of a read `ave_qual(qualscores)`
+* Write out the statistics report after calling readstats function `write_stats(dataframe, outputname)`
+* Compute a number of statistics, return a dictionary `calc_read_stats(dataframe)`
+
+
+## INSTALLATION
+```bash
+pip install nanomath
+```
+or
+[![install with conda](https://anaconda.org/bioconda/nanomath/badges/installer/conda.svg)](https://anaconda.org/bioconda/nanomath)
+```
+conda install -c bioconda nanomath
+```
+
+## STATUS
+[![Build Status](https://travis-ci.org/wdecoster/nanomath.svg?branch=master)](https://travis-ci.org/wdecoster/nanomath)
+
+
+## CONTRIBUTORS
+[@alexomics](https://github.com/alexomics) for fixing the indentation of the printed stats
+
+
+## CITATION
+If you use this tool, please consider citing our [publication](https://academic.oup.com/bioinformatics/advance-article/doi/10.1093/bioinformatics/bty149/4934939).
diff --git a/nanomath/nanomath.py b/nanomath/nanomath.py
index 5d260fc..f02fe90 100644
--- a/nanomath/nanomath.py
+++ b/nanomath/nanomath.py
@@ -27,6 +27,11 @@ from math import log
class Stats(object):
def __init__(self, df):
+ if len(df) < 5:
+ sys.stderr.write("\n\nWARNING: less than 5 reads in the dataset!\n")
+ sys.stderr.write("WARNING: some stats might be unexpected or missing\n")
+ sys.stderr.write("WARNING: or a crash might happen, who knows\n")
+ sys.stderr.write("WARNING: this code is not intended for such small datasets\n\n\n")
self.number_of_reads = len(df)
self.number_of_bases = np.sum(df["lengths"])
self._with_readIDs = "readIDs" in df
Debdiff
File lists identical (after any substitutions)
No differences were encountered in the control files