[med-svn] [Git][med-team/nanoplot][master] 4 commits: not requiring statsmodel

Étienne Mollier gitlab at salsa.debian.org
Wed Apr 29 22:20:44 BST 2020



Étienne Mollier pushed to branch master at Debian Med / nanoplot


Commits:
08fa1547 by Etienne Mollier at 2020-04-29T22:46:08+02:00
not requiring statsmodel

it is upstream's approach toward issues encountered while
running the provided test agains the nanotest data coming from
python3-nanoget-examples.  Works as long as python3-statsmodels
is out of the system; to be concluded I guess...

- - - - -
a1c5d389 by Etienne Mollier at 2020-04-29T22:48:19+02:00
only decompress files needing to be

- - - - -
a54c52ba by Etienne Mollier at 2020-04-29T23:03:30+02:00
added manual page for NanoPlot

- - - - -
26bf1f46 by Etienne Mollier at 2020-04-29T23:12:46+02:00
relaxed sets of available arguments

this fixes lintian warnings about unbreakable lines.

- - - - -


7 changed files:

- + debian/NanoPlot.1
- debian/control
- + debian/createmanpages
- + debian/manpages
- + debian/patches/not-requiring-statsmodels.patch
- + debian/patches/series
- debian/tests/run-unit-test


Changes:

=====================================
debian/NanoPlot.1
=====================================
@@ -0,0 +1,23 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.14.
+.TH NANOPLOT "1" "April 2020" "NanoPlot 1.29.0" "User Commands"
+.SH NAME
+NanoPlot \- plotting scripts for long read sequencing data
+.SH DESCRIPTION
+usage: NanoPlot [\-h] [\-v] [\-t THREADS] [\-\-verbose] [\-\-store] [\-\-raw] [\-\-huge]
+.IP
+[\-o OUTDIR] [\-p PREFIX] [\-\-maxlength N] [\-\-minlength N]
+[\-\-drop_outliers] [\-\-downsample N] [\-\-loglength]
+[\-\-percentqual] [\-\-alength] [\-\-minqual N] [\-\-runtime_until N]
+[\-\-readtype {1D, 2D, 1D2}] [\-\-barcoded] [\-c COLOR]
+[\-cm COLORMAP]
+[\-f {eps, jpeg, jpg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff }]
+[\-\-plots [{kde, hex, dot, pauvre} [{kde, hex, dot, pauvre} ...]]]
+[\-\-listcolors] [\-\-listcolormaps] [\-\-no\-N50] [\-\-N50]
+[\-\-title TITLE] [\-\-font_scale FONT_SCALE] [\-\-dpi DPI]
+[\-\-hide_stats]
+(\fB\-\-fastq\fR file [file ...] | \fB\-\-fasta\fR file [file ...] | \fB\-\-fastq_rich\fR file [file ...] | \fB\-\-fastq_minimal\fR file [file ...] | \fB\-\-summary\fR file [file ...] | \fB\-\-bam\fR file [file ...] | \fB\-\-ubam\fR file [file ...] | \fB\-\-cram\fR file [file ...] | \fB\-\-pickle\fR pickle)
+.PP
+NanoPlot: error: one of the arguments \fB\-\-fastq\fR \fB\-\-fasta\fR \fB\-\-fastq_rich\fR \fB\-\-fastq_minimal\fR \fB\-\-summary\fR \fB\-\-bam\fR \fB\-\-ubam\fR \fB\-\-cram\fR \fB\-\-pickle\fR is required
+.SH AUTHOR
+This manpage was written by Etienne Mollier for the Debian distribution and
+can be used for any other usage of the program.


=====================================
debian/control
=====================================
@@ -29,7 +29,6 @@ Depends: ${python3:Depends},
          python3-matplotlib,
          python3-dateutil,
          python3-seaborn,
-         python3-statsmodels,
          python3-pauvre,
          python3-plotly,
          python3-nanoget,


=====================================
debian/createmanpages
=====================================
@@ -0,0 +1,29 @@
+#!/bin/sh
+set -e
+MANDIR=debian
+mkdir -p $MANDIR
+
+VERSION=`dpkg-parsechangelog | awk '/^Version:/ {print $2}' | sed -e 's/^[0-9]*://' -e 's/-.*//' -e 's/[+~]dfsg$//'`
+NAME=`grep "^Description:" debian/control | sed 's/^Description: *//' | head -n1`
+PROGNAME=`grep "^Package:" debian/control | sed 's/^Package: *//' | head -n1`
+
+AUTHOR=".SH AUTHOR\n\
+This manpage was written by $DEBFULLNAME for the Debian distribution and\n\
+can be used for any other usage of the program.\
+"
+
+# If program name is different from package name or title should be
+# different from package short description change this here
+progname=NanoPlot
+help2man --no-info --no-discard-stderr --help-option=" " \
+         --name="$NAME" \
+            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1
+echo $AUTHOR >> $MANDIR/${progname}.1
+
+echo "$MANDIR/*.1" > debian/manpages
+
+cat <<EOT
+Please enhance the help2man output.
+The following web page might be helpful in doing so:
+    http://liw.fi/manpages/
+EOT


=====================================
debian/manpages
=====================================
@@ -0,0 +1 @@
+debian/*.1


=====================================
debian/patches/not-requiring-statsmodels.patch
=====================================
@@ -0,0 +1,55 @@
+Description: not requiring statsmodels
+ Statsmodel does not seem to handle well data coming from certain BAM files,
+ and upstream simply dropped requiring it.  This solves the following as long
+ as python3-statsmodel is absent of the machine, but it reappears in case the
+ package is installed for whatever reason:
+ .
+  2020-04-29 19:35:11,174 Selected KDE bandwidth is 0. Cannot estimate density.
+ Traceback (most recent call last):
+   File "/usr/lib/python3/dist-packages/statsmodels/nonparametric/kde.py", line 451, in kdensityfft
+     bw = float(bw)
+ ValueError: could not convert string to float: 'scott'
+ 
+ During handling of the above exception, another exception occurred:
+ 
+ Traceback (most recent call last):
+   File "/usr/lib/python3/dist-packages/nanoplot/NanoPlot.py", line 96, in main
+     plots = make_plots(datadf, settings)
+   File "/usr/lib/python3/dist-packages/nanoplot/NanoPlot.py", line 227, in make_plots
+     nanoplotter.scatter(
+   File "/usr/lib/python3/dist-packages/nanoplotter/nanoplotter_main.py", line 193, in scatter
+     plot = sns.jointplot(
+   File "/usr/lib/python3/dist-packages/seaborn/axisgrid.py", line 2338, in jointplot
+     grid.plot_marginals(kdeplot, **marginal_kws)
+   File "/usr/lib/python3/dist-packages/seaborn/axisgrid.py", line 1823, in plot_marginals
+     func(self.x, **kwargs)
+   File "/usr/lib/python3/dist-packages/seaborn/distributions.py", line 703, in kdeplot
+     ax = _univariate_kdeplot(data, shade, vertical, kernel, bw,
+   File "/usr/lib/python3/dist-packages/seaborn/distributions.py", line 293, in _univariate_kdeplot
+     x, y = _statsmodels_univariate_kde(data, kernel, bw,
+   File "/usr/lib/python3/dist-packages/seaborn/distributions.py", line 367, in _statsmodels_univariate_kde
+     kde.fit(kernel, bw, fft, gridsize=gridsize, cut=cut, clip=clip)
+   File "/usr/lib/python3/dist-packages/statsmodels/nonparametric/kde.py", line 138, in fit
+     density, grid, bw = kdensityfft(endog, kernel=kernel, bw=bw,
+   File "/usr/lib/python3/dist-packages/statsmodels/nonparametric/kde.py", line 453, in kdensityfft
+     bw = bandwidths.select_bandwidth(X, bw, kern) # will cross-val fit this pattern?
+   File "/usr/lib/python3/dist-packages/statsmodels/nonparametric/bandwidths.py", line 174, in select_bandwidth
+     raise RuntimeError(err)
+ RuntimeError: Selected KDE bandwidth is 0. Cannot estimate density.
+Origin: upstream, https://github.com/wdecoster/NanoPlot/commit/da185a2e9d4f494987aedeb1eb15374cdbf99d7a
+Bug: https://github.com/wdecoster/NanoPlot/issues/177
+Applied-Upstream: 1.29.1
+Last-Update: 2020-04-29
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- nanoplot.orig/setup.py
++++ nanoplot/setup.py
+@@ -41,7 +41,7 @@
+                       'nanoget>=1.9.0',
+                       'nanomath>=0.23.1',
+                       "pauvre==0.1.86",
+-                      "statsmodels==0.10.1",
++                      #"statsmodels==0.10.1",
+                       'plotly>=4.1.0',
+                       ],
+     package_data={'NanoPlot': []},


=====================================
debian/patches/series
=====================================
@@ -0,0 +1 @@
+not-requiring-statsmodels.patch


=====================================
debian/tests/run-unit-test
=====================================
@@ -14,6 +14,6 @@ cp -a /usr/share/doc/python3-nanoget/examples/nanotest "${AUTOPKGTEST_TMP}"
 
 cd "${AUTOPKGTEST_TMP}"
 
-gunzip -r *
+gunzip -r nanotest/alignment.bam.gz nanotest/sequencing_summary.txt.gz
 
 sh test.sh



View it on GitLab: https://salsa.debian.org/med-team/nanoplot/-/compare/a2e3551b7509e7c743285c1e464735cd6d76363f...26bf1f46dd4ebcc762e4a5c3eddb0fb93da329f4

-- 
View it on GitLab: https://salsa.debian.org/med-team/nanoplot/-/compare/a2e3551b7509e7c743285c1e464735cd6d76363f...26bf1f46dd4ebcc762e4a5c3eddb0fb93da329f4
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/20200429/9cf14c40/attachment-0001.html>


More information about the debian-med-commit mailing list