[med-svn] [Git][med-team/poretools][master] 5 commits: Fix circular import, "poretools times" output

Nilesh Patra gitlab at salsa.debian.org
Wed Jun 3 11:14:00 BST 2020



Nilesh Patra pushed to branch master at Debian Med / poretools


Commits:
59a74018 by Nilesh Patra at 2020-06-03T15:18:30+05:30
Fix circular import, "poretools times" output

- - - - -
a7c6533e by Nilesh Patra at 2020-06-03T15:19:04+05:30
Add autopkgtests

- - - - -
0e0fcf6b by Nilesh Patra at 2020-06-03T09:56:54+00:00
Fix with cme

- - - - -
73fc01b0 by Nilesh Patra at 2020-06-03T10:00:09+00:00
Update upstream/metadata

- - - - -
58e4e4c0 by Nilesh Patra at 2020-06-03T15:40:45+05:30
Remove un-needed override

- - - - -


6 changed files:

- debian/control
- debian/patches/python3.patch
- − debian/source/lintian-overrides
- + debian/tests/control
- + debian/tests/run-unit-test
- debian/upstream/metadata


Changes:

=====================================
debian/control
=====================================
@@ -11,10 +11,11 @@ Build-Depends: debhelper-compat (= 12),
                python3-matplotlib,
                python3-seaborn,
                python3-pandas
-Standards-Version: 4.4.0
+Standards-Version: 4.5.0
 Vcs-Browser: https://salsa.debian.org/med-team/poretools
 Vcs-Git: https://salsa.debian.org/med-team/poretools.git
 Homepage: https://poretools.readthedocs.org
+Rules-Requires-Root: no
 
 Package: poretools
 Architecture: all


=====================================
debian/patches/python3.patch
=====================================
@@ -6,10 +6,8 @@ Author: Steve Langasek <steve.langasek at ubuntu.com>
 Last-Modified: 2019-08-15
 Bug-Debian: https://bugs.debian.org/934845
 
-Index: poretools-0.6.0+dfsg/setup.py
-===================================================================
---- poretools-0.6.0+dfsg.orig/setup.py
-+++ poretools-0.6.0+dfsg/setup.py
+--- a/setup.py
++++ b/setup.py
 @@ -3,7 +3,7 @@
  
  version_py = os.path.join(os.path.dirname(__file__), 'poretools', 'version.py')
@@ -19,23 +17,18 @@ Index: poretools-0.6.0+dfsg/setup.py
  long_description = """
  ``poretools`` is a toolset for working with nanopore sequencing data'
  """
-Index: poretools-0.6.0+dfsg/poretools/__init__.py
-===================================================================
---- poretools-0.6.0+dfsg.orig/poretools/__init__.py
-+++ poretools-0.6.0+dfsg/poretools/__init__.py
-@@ -1,5 +1,5 @@
+--- a/poretools/__init__.py
++++ b/poretools/__init__.py
+@@ -1,5 +1,4 @@
  import os
  import sys
 -import scripts
 -from Fast5File import *
 -from version import __version__
 +from . import scripts
-+from .Fast5File import *
 +from .version import __version__
-Index: poretools-0.6.0+dfsg/poretools/Fast5File.py
-===================================================================
---- poretools-0.6.0+dfsg.orig/poretools/Fast5File.py
-+++ poretools-0.6.0+dfsg/poretools/Fast5File.py
+--- a/poretools/Fast5File.py
++++ b/poretools/Fast5File.py
 @@ -11,8 +11,8 @@
  
  
@@ -282,10 +275,8 @@ Index: poretools-0.6.0+dfsg/poretools/Fast5File.py
 +			except Exception as e:
  				self.keyinfo = None
  				logger.warning("Cannot find keyinfo. Exiting.\n")
-Index: poretools-0.6.0+dfsg/poretools/formats.py
-===================================================================
---- poretools-0.6.0+dfsg.orig/poretools/formats.py
-+++ poretools-0.6.0+dfsg/poretools/formats.py
+--- a/poretools/formats.py
++++ b/poretools/formats.py
 @@ -19,7 +19,7 @@
  				phred = ord(score) - 33
  				error_count += 10.0 ** (-phred / 10.0)
@@ -295,10 +286,8 @@ Index: poretools-0.6.0+dfsg/poretools/formats.py
  			return 0.0
  
  
-Index: poretools-0.6.0+dfsg/poretools/times.py
-===================================================================
---- poretools-0.6.0+dfsg.orig/poretools/times.py
-+++ poretools-0.6.0+dfsg/poretools/times.py
+--- a/poretools/times.py
++++ b/poretools/times.py
 @@ -1,4 +1,4 @@
 -import Fast5File
 +from . import Fast5File
@@ -318,15 +307,17 @@ Index: poretools-0.6.0+dfsg/poretools/times.py
  	
  	for fast5 in Fast5File.Fast5FileSet(args.files):
  		if fast5.is_open:
-@@ -29,7 +29,7 @@
+@@ -29,8 +29,8 @@
  				read_length = 0
  
  			lt = localtime(start_time)
 -			print "\t".join([fast5.get_channel_number(),
-+			print("\t".join([fast5.get_channel_number(),
- 				fast5.filename, 
+-				fast5.filename, 
++			print("\t".join([str(fast5.get_channel_number()),
++				str(fast5.filename),
  				str(read_length),
  				str(fast5.get_exp_start_time()),
+ 				str(start_time), \
 @@ -39,5 +39,5 @@
  				strftime('%Y-%m-%dT%H:%M:%S%z', lt),
  				strftime('%d', lt),
@@ -334,10 +325,8 @@ Index: poretools-0.6.0+dfsg/poretools/times.py
 -				strftime('%M', lt)])
 +				strftime('%M', lt)]))
  			fast5.close()
-Index: poretools-0.6.0+dfsg/poretools/events.py
-===================================================================
---- poretools-0.6.0+dfsg.orig/poretools/events.py
-+++ poretools-0.6.0+dfsg/poretools/events.py
+--- a/poretools/events.py
++++ b/poretools/events.py
 @@ -1,4 +1,4 @@
 -import Fast5File
 +from . import Fast5File
@@ -367,10 +356,8 @@ Index: poretools-0.6.0+dfsg/poretools/events.py
  
  		fast5.close()
  
-Index: poretools-0.6.0+dfsg/poretools/qualdist.py
-===================================================================
---- poretools-0.6.0+dfsg.orig/poretools/qualdist.py
-+++ poretools-0.6.0+dfsg/poretools/qualdist.py
+--- a/poretools/qualdist.py
++++ b/poretools/qualdist.py
 @@ -1,4 +1,4 @@
 -import Fast5File
 +from . import Fast5File
@@ -386,10 +373,8 @@ Index: poretools-0.6.0+dfsg/poretools/qualdist.py
 \ No newline at end of file
 +		print ('\t'.join(str(s) for s in [chr(q+33), q, qual_count[q], 
 +			total_nucs, float(qual_count[q]) / float(total_nucs)]))
-Index: poretools-0.6.0+dfsg/poretools/metadata.py
-===================================================================
---- poretools-0.6.0+dfsg.orig/poretools/metadata.py
-+++ poretools-0.6.0+dfsg/poretools/metadata.py
+--- a/poretools/metadata.py
++++ b/poretools/metadata.py
 @@ -1,4 +1,4 @@
 -import Fast5File
 +from . import Fast5File
@@ -419,10 +404,8 @@ Index: poretools-0.6.0+dfsg/poretools/metadata.py
 +			print("%s\t%s\t%s" % (asic_id, asic_temp, heatsink_temp))
  
  			fast5.close()
-Index: poretools-0.6.0+dfsg/poretools/fastq.py
-===================================================================
---- poretools-0.6.0+dfsg.orig/poretools/fastq.py
-+++ poretools-0.6.0+dfsg/poretools/fastq.py
+--- a/poretools/fastq.py
++++ b/poretools/fastq.py
 @@ -1,4 +1,4 @@
 -import Fast5File
 +from . import Fast5File
@@ -438,10 +421,8 @@ Index: poretools-0.6.0+dfsg/poretools/fastq.py
  
  		fast5.close()
  
-Index: poretools-0.6.0+dfsg/poretools/occupancy.py
-===================================================================
---- poretools-0.6.0+dfsg.orig/poretools/occupancy.py
-+++ poretools-0.6.0+dfsg/poretools/occupancy.py
+--- a/poretools/occupancy.py
++++ b/poretools/occupancy.py
 @@ -1,4 +1,4 @@
 -import Fast5File
 +from . import Fast5File
@@ -481,10 +462,8 @@ Index: poretools-0.6.0+dfsg/poretools/occupancy.py
              fast5.close()
  
      if args.plot_type == 'read_count':
-Index: poretools-0.6.0+dfsg/poretools/index.py
-===================================================================
---- poretools-0.6.0+dfsg.orig/poretools/index.py
-+++ poretools-0.6.0+dfsg/poretools/index.py
+--- a/poretools/index.py
++++ b/poretools/index.py
 @@ -1,4 +1,4 @@
 -import Fast5File
 +from . import Fast5File
@@ -514,10 +493,8 @@ Index: poretools-0.6.0+dfsg/poretools/index.py
 +			asic_id, asic_temp, heatsink_temp,channel_number,exp_start_time,exp_start_time_string,start_time,start_time_string,duration,fast5_version))
  
  		fast5.close()
-Index: poretools-0.6.0+dfsg/poretools/readstats.py
-===================================================================
---- poretools-0.6.0+dfsg.orig/poretools/readstats.py
-+++ poretools-0.6.0+dfsg/poretools/readstats.py
+--- a/poretools/readstats.py
++++ b/poretools/readstats.py
 @@ -1,8 +1,8 @@
 -import Fast5File
 +from . import Fast5File
@@ -537,10 +514,8 @@ Index: poretools-0.6.0+dfsg/poretools/readstats.py
 +		print("%s\t%s\t%s\t%s\t%s" % (start_time, channel_number, read_number, template_len, complement_len))
  
  		fast5.close()
-Index: poretools-0.6.0+dfsg/poretools/winner.py
-===================================================================
---- poretools-0.6.0+dfsg.orig/poretools/winner.py
-+++ poretools-0.6.0+dfsg/poretools/winner.py
+--- a/poretools/winner.py
++++ b/poretools/winner.py
 @@ -1,4 +1,4 @@
 -import Fast5File
 +from . import Fast5File
@@ -554,10 +529,8 @@ Index: poretools-0.6.0+dfsg/poretools/winner.py
 -	print longest_read
 +	print(longest_read)
  
-Index: poretools-0.6.0+dfsg/poretools/stats.py
-===================================================================
---- poretools-0.6.0+dfsg.orig/poretools/stats.py
-+++ poretools-0.6.0+dfsg/poretools/stats.py
+--- a/poretools/stats.py
++++ b/poretools/stats.py
 @@ -1,5 +1,5 @@
 -import statistics as stat
 -import Fast5File
@@ -635,10 +608,8 @@ Index: poretools-0.6.0+dfsg/poretools/stats.py
 +			print("N75\t%d" % (nxvalues[75]))
  		else:
  			logger.warning("No valid sequences observed.\n")
-Index: poretools-0.6.0+dfsg/poretools/nucdist.py
-===================================================================
---- poretools-0.6.0+dfsg.orig/poretools/nucdist.py
-+++ poretools-0.6.0+dfsg/poretools/nucdist.py
+--- a/poretools/nucdist.py
++++ b/poretools/nucdist.py
 @@ -1,4 +1,4 @@
 -import Fast5File
 +from . import Fast5File
@@ -654,10 +625,8 @@ Index: poretools-0.6.0+dfsg/poretools/nucdist.py
 \ No newline at end of file
 +		print ('\t'.join(str(s) for s in [n, nuc_count[n], 
 +			total_nucs, float(nuc_count[n]) / float(total_nucs)]))
-Index: poretools-0.6.0+dfsg/poretools/tabular.py
-===================================================================
---- poretools-0.6.0+dfsg.orig/poretools/tabular.py
-+++ poretools-0.6.0+dfsg/poretools/tabular.py
+--- a/poretools/tabular.py
++++ b/poretools/tabular.py
 @@ -1,8 +1,8 @@
 -import Fast5File
 +from . import Fast5File
@@ -678,10 +647,8 @@ Index: poretools-0.6.0+dfsg/poretools/tabular.py
 \ No newline at end of file
 +			print ('\t'.join([str(len(fq.seq)), fq.name, fq.seq, fq.qual]))
 +		fast5.close()
-Index: poretools-0.6.0+dfsg/poretools/fasta.py
-===================================================================
---- poretools-0.6.0+dfsg.orig/poretools/fasta.py
-+++ poretools-0.6.0+dfsg/poretools/fasta.py
+--- a/poretools/fasta.py
++++ b/poretools/fasta.py
 @@ -1,4 +1,4 @@
 -import Fast5File
 +from . import Fast5File
@@ -697,10 +664,8 @@ Index: poretools-0.6.0+dfsg/poretools/fasta.py
  
  		fast5.close()
  
-Index: poretools-0.6.0+dfsg/poretools/statistics.py
-===================================================================
---- poretools-0.6.0+dfsg.orig/poretools/statistics.py
-+++ poretools-0.6.0+dfsg/poretools/statistics.py
+--- a/poretools/statistics.py
++++ b/poretools/statistics.py
 @@ -27,25 +27,25 @@
  		return None
  
@@ -741,10 +706,8 @@ Index: poretools-0.6.0+dfsg/poretools/statistics.py
  
  	else:
  		return None
-Index: poretools-0.6.0+dfsg/poretools/poretools_main.py
-===================================================================
---- poretools-0.6.0+dfsg.orig/poretools/poretools_main.py
-+++ poretools-0.6.0+dfsg/poretools/poretools_main.py
+--- a/poretools/poretools_main.py
++++ b/poretools/poretools_main.py
 @@ -13,43 +13,43 @@
  
  def run_subtool(parser, args):
@@ -835,10 +798,8 @@ Index: poretools-0.6.0+dfsg/poretools/poretools_main.py
           if e.errno != 32:  # ignore SIGPIPE
               raise
  
-Index: poretools-0.6.0+dfsg/poretools/combine.py
-===================================================================
---- poretools-0.6.0+dfsg.orig/poretools/combine.py
-+++ poretools-0.6.0+dfsg/poretools/combine.py
+--- a/poretools/combine.py
++++ b/poretools/combine.py
 @@ -1,6 +1,6 @@
  import tarfile
  import sys
@@ -847,10 +808,8 @@ Index: poretools-0.6.0+dfsg/poretools/combine.py
  
  #logging
  import logging
-Index: poretools-0.6.0+dfsg/poretools/hist.py
-===================================================================
---- poretools-0.6.0+dfsg.orig/poretools/hist.py
-+++ poretools-0.6.0+dfsg/poretools/hist.py
+--- a/poretools/hist.py
++++ b/poretools/hist.py
 @@ -6,7 +6,7 @@
  from matplotlib import pyplot as plt
  
@@ -860,30 +819,24 @@ Index: poretools-0.6.0+dfsg/poretools/hist.py
  
  import logging
  logger = logging.getLogger('poretools')
-Index: poretools-0.6.0+dfsg/poretools/organise.py
-===================================================================
---- poretools-0.6.0+dfsg.orig/poretools/organise.py
-+++ poretools-0.6.0+dfsg/poretools/organise.py
+--- a/poretools/organise.py
++++ b/poretools/organise.py
 @@ -1,4 +1,4 @@
 -import Fast5File
 +from . import Fast5File
  import sys
  import os
  from os import makedirs
-Index: poretools-0.6.0+dfsg/poretools/qual_v_pos.py
-===================================================================
---- poretools-0.6.0+dfsg.orig/poretools/qual_v_pos.py
-+++ poretools-0.6.0+dfsg/poretools/qual_v_pos.py
+--- a/poretools/qual_v_pos.py
++++ b/poretools/qual_v_pos.py
 @@ -1,4 +1,4 @@
 -import Fast5File
 +from . import Fast5File
  from collections import defaultdict
  import pandas
  import matplotlib.pyplot as plt
-Index: poretools-0.6.0+dfsg/poretools/squiggle.py
-===================================================================
---- poretools-0.6.0+dfsg.orig/poretools/squiggle.py
-+++ poretools-0.6.0+dfsg/poretools/squiggle.py
+--- a/poretools/squiggle.py
++++ b/poretools/squiggle.py
 @@ -10,7 +10,7 @@
  import logging
  logger = logging.getLogger('poretools')
@@ -902,10 +855,8 @@ Index: poretools-0.6.0+dfsg/poretools/squiggle.py
      for fast5 in fast5_set:
          # only create a squiggle plot for multiple reads if saving to file.
          if args.saveas is None:
-Index: poretools-0.6.0+dfsg/poretools/yield_plot.py
-===================================================================
---- poretools-0.6.0+dfsg.orig/poretools/yield_plot.py
-+++ poretools-0.6.0+dfsg/poretools/yield_plot.py
+--- a/poretools/yield_plot.py
++++ b/poretools/yield_plot.py
 @@ -1,4 +1,4 @@
 -import Fast5File
 +from . import Fast5File


=====================================
debian/source/lintian-overrides deleted
=====================================
@@ -1,2 +0,0 @@
-# It does. It's just that the options are listed one-per-line.
-debian-watch-file-should-mangle-version line 9


=====================================
debian/tests/control
=====================================
@@ -0,0 +1,4 @@
+Tests: run-unit-test
+Depends: @
+Restrictions: allow-stderr
+


=====================================
debian/tests/run-unit-test
=====================================
@@ -0,0 +1,123 @@
+#!/bin/bash
+set -e
+
+pkg=poretools
+
+if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
+  AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
+  trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cp /usr/share/${pkg}/data -a "${AUTOPKGTEST_TMP}"
+
+cd "${AUTOPKGTEST_TMP}"
+gunzip -r *
+
+mv data test_data
+echo 'Test 1'
+echo 'poretools fastq --min-length 5000 test_data/'
+poretools fastq --min-length 5000 test_data/
+echo 'PASS'
+echo
+
+echo 'Test 2'
+echo 'poretools yield_plot \
+          --plot-type basepairs \
+          --saveas foo.pdf \
+          test_data/'
+
+poretools yield_plot \
+          --plot-type basepairs \
+          --saveas foo.pdf \
+          test_data/
+
+echo 'poretools yield_plot \
+          --plot-type basepairs \
+          --saveas foo.png \
+	  --theme-bw \'
+
+poretools yield_plot \
+          --plot-type basepairs \
+          --saveas foo.png \
+	  --theme-bw \
+          test_data/
+echo 'PASS'
+echo
+
+echo 'Test 3'
+echo 'poretools winner test_data/'
+poretools winner test_data/
+
+echo 'poretools winner --type all test_data/'
+poretools winner --type all test_data/
+
+echo 'poretools winner --type 2D test_data/'
+poretools winner --type 2D test_data/
+
+echo 'poretools winner --type fwd,rev test_data/'
+poretools winner --type fwd,rev test_data/
+
+echo 'poretools winner --type best test_data/'
+poretools winner --type best test_data/
+echo 'PASS'
+echo
+
+echo 'Test 4'
+echo 'poretools stats test_data/'
+poretools stats test_data/
+echo 'PASS'
+echo
+
+echo 'Test 5'
+echo 'poretools hist --num-bins 20 --max-length 10000 test_data/ --saveas pdf'
+poretools hist --num-bins 20 --max-length 10000 test_data/ --saveas pdf
+echo 'PASS'
+echo
+
+echo 'Test 6'
+echo 'poretools nucdist test_data/'
+poretools nucdist test_data/
+echo 'PASS'
+echo
+
+echo 'Test 7'
+echo 'poretools qualdist test_data/'
+poretools qualdist test_data/
+echo 'PASS'
+echo
+
+echo 'Test 8'
+echo 'poretools qualpos test_data/'
+poretools qualpos test_data/
+echo 'PASS'
+echo
+
+echo 'Test 9'
+echo 'poretools tabular  test_data/2016_3_4_3507_1_ch120_read418_strand.fast5'
+poretools tabular  test_data/2016_3_4_3507_1_ch120_read418_strand.fast5 
+echo 'PASS'
+echo
+
+echo 'Test 10'
+echo 'poretools events test_data/ | head -5'
+poretools events test_data/ | head -5
+echo 'PASS'
+echo
+
+echo 'Test 11'
+echo 'poretools events --pre-basecalled test_data/ | head -5'
+poretools events --pre-basecalled test_data/ | head -5
+echo 'PASS'
+echo
+
+echo 'Test 12'
+echo 'poretools times test_data/'
+poretools times test_data/
+echo 'PASS'
+echo
+
+echo 'Test 13'
+echo 'poretools index test_data | head -5'
+poretools index test_data | head -5
+echo 'PASS'
+echo


=====================================
debian/upstream/metadata
=====================================
@@ -20,3 +20,10 @@ Registry:
     Entry: NA
   - Name: conda:bioconda
     Entry: poretools
+Archive:
+Bug-Database: https://github.com/arq5x/poretools/issues
+Bug-Submit: https://github.com/arq5x/poretools/issues/new
+Changelog: https://github.com/arq5x/poretools/tags
+Repository: https://github.com/arq5x/poretools.git
+Repository-Browse: https://github.com/arq5x/poretools
+



View it on GitLab: https://salsa.debian.org/med-team/poretools/-/compare/fe9b3dddc1938d867df8dd7749ccec82d64b2686...58e4e4c052cee506944a7ed5402e53fafc5668fd

-- 
View it on GitLab: https://salsa.debian.org/med-team/poretools/-/compare/fe9b3dddc1938d867df8dd7749ccec82d64b2686...58e4e4c052cee506944a7ed5402e53fafc5668fd
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/20200603/8511785c/attachment-0001.html>


More information about the debian-med-commit mailing list