[med-svn] [Git][med-team/dnapi][master] 14 commits: Enhance description

Andreas Tille gitlab at salsa.debian.org
Sun Apr 19 11:33:38 BST 2020



Andreas Tille pushed to branch master at Debian Med / dnapi


Commits:
8d89bd72 by Andreas Tille at 2020-03-26T07:54:10+01:00
Enhance description

- - - - -
7204f152 by Andreas Tille at 2020-03-26T07:54:59+01:00
Remove cruft from repository

- - - - -
b5878732 by Andreas Tille at 2020-03-26T07:56:08+01:00
Close ITP bug which was forgotten in upload to new

- - - - -
f916fcb7 by Andreas Tille at 2020-03-26T07:56:42+01:00
routine-update: Add salsa-ci file

- - - - -
26f126c4 by Andreas Tille at 2020-03-26T07:56:42+01:00
Trim trailing whitespace.

Fixes: lintian: file-contains-trailing-whitespace
See-also: https://lintian.debian.org/tags/file-contains-trailing-whitespace.html

- - - - -
06e0519a by Andreas Tille at 2020-03-26T07:56:45+01:00
Set upstream metadata fields: Bug-Database, Bug-Submit, Repository, Repository-Browse.
- - - - -
bbeadbf6 by Andreas Tille at 2020-03-26T08:00:42+01:00
Section: python

- - - - -
5f67145f by Andreas Tille at 2020-03-26T08:23:59+01:00
Move user applications into separate package

- - - - -
c2a35958 by Andreas Tille at 2020-03-26T08:25:03+01:00
Lintian-override for executables with script extensions

- - - - -
86c31ac9 by Andreas Tille at 2020-03-26T08:26:38+01:00
Install examples to prepare autopkgtest

- - - - -
29de095b by Andreas Tille at 2020-03-26T08:42:41+01:00
dnapi: Depends: {python3:Depends}, ${misc:Depends}

- - - - -
e4195887 by Andreas Tille at 2020-03-26T11:09:39+01:00
Add manpages

- - - - -
c18d8d59 by Andreas Tille at 2020-03-26T11:24:45+01:00
Make sure manpages of Python scripts will be installed correctly

- - - - -
7149c96d by Andreas Tille at 2020-03-26T11:25:37+01:00
Upload to unstable

- - - - -


27 changed files:

- debian/changelog
- debian/control
- + debian/createmanpages
- + debian/dnapi.examples
- + debian/dnapi.lintian-overrides
- + debian/manpages
- + debian/mans/dnapi.py.1
- + debian/mans/qual_offset.py.1
- + debian/mans/qual_trim.py.1
- + debian/mans/to_fasta.py.1
- − debian/python3-dnapi.postinst.debhelper
- − debian/python3-dnapi.prerm.debhelper
- − debian/python3-dnapi.substvars
- − debian/python3-dnapi/DEBIAN/control
- − debian/python3-dnapi/DEBIAN/md5sums
- − debian/python3-dnapi/DEBIAN/postinst
- − debian/python3-dnapi/DEBIAN/prerm
- − debian/python3-dnapi/usr/bin/dnapi.py
- − debian/python3-dnapi/usr/bin/qual_offset.py
- − debian/python3-dnapi/usr/bin/qual_trim.py
- − debian/python3-dnapi/usr/bin/to_fasta.py
- − debian/python3-dnapi/usr/share/doc/python3-dnapi/README.Debian
- − debian/python3-dnapi/usr/share/doc/python3-dnapi/changelog.Debian.gz
- − debian/python3-dnapi/usr/share/doc/python3-dnapi/copyright
- debian/rules
- + debian/salsa-ci.yml
- debian/upstream/metadata


Changes:

=====================================
debian/changelog
=====================================
@@ -1,5 +1,23 @@
+dnapi (1.1-2) unstable; urgency=medium
+
+  * Team upload.
+  * Enhance description
+  * Add salsa-ci file (routine-update)
+  * Trim trailing whitespace.
+  * Set upstream metadata fields: Bug-Database, Bug-Submit, Repository,
+    Repository-Browse.
+  * Section: python
+  * Move user applications into separate package
+  * Lintian-override for executables with script extensions
+  * Install examples to prepare autopkgtest
+  * dnapi: Depends: {python3:Depends}, ${misc:Depends}
+  * d/rules: PYBUILD_NAME=dnapilib
+  * Add manpages
+
+ -- Andreas Tille <tille at debian.org>  Thu, 26 Mar 2020 11:24:49 +0100
+
 dnapi (1.1-1) unstable; urgency=medium
 
-  * Initial release (Closes: #nnnn)  <nnnn is the bug number of your ITP>
+  * Initial release (Closes: #953821)
 
  -- Steffen Moeller <moeller at debian.org>  Fri, 13 Mar 2020 21:08:02 +0100


=====================================
debian/control
=====================================
@@ -1,29 +1,41 @@
 Source: dnapi
-Section: science
-Priority: optional
 Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
 Uploaders: Steffen Moeller <moeller at debian.org>
+Section: science
+Testsuite: autopkgtest-pkg-python
+Priority: optional
 Build-Depends: debhelper-compat (= 12),
                dh-python,
                python3-setuptools,
                python3-all
 Standards-Version: 4.5.0
-Homepage: https://github.com/jnktsj/DNApi/
 Vcs-Browser: https://salsa.debian.org/med-team/dnapi
 Vcs-Git: https://salsa.debian.org/med-team/dnapi.git
-Testsuite: autopkgtest-pkg-python
+Homepage: https://github.com/jnktsj/DNApi/
 Rules-Requires-Root: no
 
 Package: dnapi
 Architecture: all
-Depends: python3-dnapilib
+Depends: ${python3:Depends},
+         ${misc:Depends},
+         python3-dnapilib
 Description: adapter prediction for small RNA sequencing - utils
- de novo adapter prediction (iterative) algorithm for small RNA sequencing
- data.
+ This package provides de novo adapter prediction (iterative) algorithm
+ for small RNA sequencing data.
+ .
+ DNApi can predict most 3' adapters correctly with the default
+ parameters. You can tweak the parameters and can run different
+ prediction modes.
 
 Package: python3-dnapilib
 Architecture: all
-Depends: ${python3:Depends}, ${misc:Depends}
+Section: python
+Depends: ${python3:Depends},
+         ${misc:Depends}
 Description: adapter prediction for small RNA sequencing - library
- de novo adapter prediction (iterative) algorithm for small RNA sequencing
- data.
+ This Python3 module provides de novo adapter prediction (iterative)
+ algorithm for small RNA sequencing data.
+ .
+ DNApi can predict most 3' adapters correctly with the default
+ parameters. You can tweak the parameters and can run different
+ prediction modes.


=====================================
debian/createmanpages
=====================================
@@ -0,0 +1,46 @@
+#!/bin/sh
+MANDIR=debian/mans
+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=dnapi.py
+help2man --no-info --no-discard-stderr --help-option=" -h" \
+         --name="Predict or evaluate 3'adapter sequence(s)" \
+            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1
+echo $AUTHOR >> $MANDIR/${progname}.1
+
+progname=qual_offset.py
+help2man --no-info --no-discard-stderr --help-option=" -h" \
+         --name="Estimate quality score encoding" \
+            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1
+echo $AUTHOR >> $MANDIR/${progname}.1
+
+progname=qual_trim.py
+help2man --no-info --no-discard-stderr --help-option=" -h" \
+         --name="Perform quality trimming for single-end reads." \
+            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1
+echo $AUTHOR >> $MANDIR/${progname}.1
+
+progname=to_fasta.py
+help2man --no-info --no-discard-stderr --help-option=" -h" \
+         --name="Remove adapters and collapse reads from FASTQ to FASTA" \
+            --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/dnapi.examples
=====================================
@@ -0,0 +1 @@
+examples/*


=====================================
debian/dnapi.lintian-overrides
=====================================
@@ -0,0 +1,2 @@
+# see https://lists.debian.org/debian-med/2018/06/msg00043.html
+dnapi: script-with-language-extension usr/bin/*.*


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


=====================================
debian/mans/dnapi.py.1
=====================================
@@ -0,0 +1,75 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.13.
+.TH DNAPI.PY "1" "March 2020" "dnapi.py 1.1" "User Commands"
+.SH NAME
+dnapi.py \- Predict or evaluate 3'adapter sequence(s)
+.SH DESCRIPTION
+usage: dnapi.py [options] FASTQ
+.PP
+Predict or evaluate 3'adapter sequence(s)
+.SS "positional arguments:"
+.TP
+FASTQ
+including stdin or compressed file {zip,gz,tar,bz}
+.SS "optional arguments:"
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+show this help message and exit
+.TP
+\fB\-\-version\fR
+show program's version number and exit
+.SS "adapter prediction parameters:"
+.TP
+\fB\-k\fR [KMER_BEG:KMER_END:INCREMENT | KMER_LEN]
+range of kmers or a single kmer to predict 3'adapters
+(default: 9:11:2)
+.TP
+\fB\-r\fR [RATIO_BEG:RATIO_END:INTCREMENT | RATIO]
+range of ratios or a single ratio to filter less
+abundant kmers (default: 1.2:1.4:0.1)
+.TP
+\fB\-\-show\-all\fR
+show other candidates if any
+.SS "exhaustive adapter search:"
+.TP
+\fB\-\-map\-command\fR COMMAND
+read mapping command to be tested
+.TP
+\fB\-\-subsample\-rate\fR FLOAT
+subsampling fraction of reads (default: 1.0)
+.TP
+\fB\-\-output\-dir\fR DIRECTORY
+output directory to write report and cleansed reads
+(default: ./dnapi_out)
+.TP
+\fB\-\-no\-output\-files\fR
+only display report and suppress output files
+.TP
+\fB\-\-temp\-dir\fR DIRECTORY
+place to make temporary directory (default: \fI\,/tmp\/\fP)
+.SS "evaluation of candidate adapters:"
+.TP
+\fB\-\-adapter\-seq\fR SEQ [SEQ ...]
+list of 3'adapters for evaluation
+.SS "adapter removal parameters:"
+.TP
+\fB\-\-prefix\-match\fR LENGTH
+3'adapter match length to trim (default: 7)
+.TP
+\fB\-\-min\-len\fR LENGTH
+minimum read length to keep for mapping (default: 16)
+.TP
+\fB\-\-max\-len\fR LENGTH
+maximum read length to keep for mapping (default: 36)
+.TP
+\fB\-\-trim\-5p\fR LENGTH
+trim specified number of bases from 5'ends after
+adapter removal (default: 0)
+.TP
+\fB\-\-trim\-3p\fR LENGTH
+trim specified number of bases from 3'ends after
+adapter removal (default: 0)
+.PP
+Report bug to: Junko Tsuji <jnktsj at gmail.com>
+.SH AUTHOR
+ This manpage was written by Andreas Tille for the Debian distribution and
+ can be used for any other usage of the program.


=====================================
debian/mans/qual_offset.py.1
=====================================
@@ -0,0 +1,19 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.13.
+.TH QUAL_OFFSET.PY "1" "March 2020" "qual_offset.py 1.1" "User Commands"
+.SH NAME
+qual_offset.py \- Estimate quality score encoding
+.SH DESCRIPTION
+usage: qual_offset.py [\-h] FASTQ
+.PP
+Estimate quality score encoding
+.SS "positional arguments:"
+.TP
+FASTQ
+including stdin or compressed file {zip,gz,tar,bz}
+.SS "optional arguments:"
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+show this help message and exit
+.SH AUTHOR
+ This manpage was written by Andreas Tille for the Debian distribution and
+ can be used for any other usage of the program.


=====================================
debian/mans/qual_trim.py.1
=====================================
@@ -0,0 +1,40 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.13.
+.TH QUAL_TRIM.PY "1" "March 2020" "qual_trim.py 1.1" "User Commands"
+.SH NAME
+qual_trim.py \- Perform quality trimming for single-end reads.
+.SH DESCRIPTION
+usage: qual_trim.py [\-h] [\-b BASE] [\-p PROB] [\-q SCORE] [\-l BP] [\-\-illumina5]
+.TP
+[\-\-solexa]
+FASTQ
+.PP
+Perform quality trimming for single\-end reads.
+.SS "positional arguments:"
+.TP
+FASTQ
+including stdin or compressed file {zip,gz,tar,bz}
+.SS "optional arguments:"
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+show this help message and exit
+.TP
+\fB\-b\fR BASE
+ASCII\-encoded quality offset, e.g. 33 or 64 (default: 33)
+.TP
+\fB\-p\fR PROB
+error probability cutoff (default: 0.1)
+.TP
+\fB\-q\fR SCORE
+quality score cutoff (default: '\-p 0.1')
+.TP
+\fB\-l\fR BP
+minimum read length in bp (default: 16)
+.TP
+\fB\-\-illumina5\fR
+Illumina 1.5+ encoding marked with 'B'
+.TP
+\fB\-\-solexa\fR
+Solexa encoding
+.SH AUTHOR
+ This manpage was written by Andreas Tille for the Debian distribution and
+ can be used for any other usage of the program.


=====================================
debian/mans/to_fasta.py.1
=====================================
@@ -0,0 +1,57 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.13.
+.TH TO_FASTA.PY "1" "March 2020" "to_fasta.py 1.1" "User Commands"
+.SH NAME
+to_fasta.py \- Remove adapters and collapse reads from FASTQ to FASTA
+.SH DESCRIPTION
+usage: to_fasta.py [\-h] [\-3 SEQ] [\-5 SEQ] [\-\-trim\-5p BP] [\-\-trim\-3p BP]
+.IP
+[\-\-seed\-5p BP] [\-\-seed\-3p BP] [\-m BP] [\-x BP] [\-s] [\-B]
+[\-a]
+FASTQ
+.PP
+Remove adapters and collapse reads from FASTQ to FASTA
+.SS "positional arguments:"
+.TP
+FASTQ
+including stdin or compressed file {zip,gz,tar,bz}
+.SS "optional arguments:"
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+show this help message and exit
+.TP
+\fB\-3\fR SEQ
+3'adapter sequence
+.TP
+\fB\-5\fR SEQ
+5'adapter sequence
+.TP
+\fB\-\-trim\-5p\fR BP
+trim specified number of bases from 5'ends
+.TP
+\fB\-\-trim\-3p\fR BP
+trim specified number of bases from 3'ends
+.TP
+\fB\-\-seed\-5p\fR BP
+5' adapter match length in bp (default: 7)
+.TP
+\fB\-\-seed\-3p\fR BP
+3' adapter match length in bp (default: 7)
+.TP
+\fB\-m\fR BP
+minimum read length in bp (default: 16)
+.TP
+\fB\-x\fR BP
+maximum read length in bp (default: 36)
+.TP
+\fB\-s\fR
+sensitive adapter search with 1 mismatch (default: off)
+.TP
+\fB\-B\fR
+only print the reads with both 5' and 3' adapter matches
+.TP
+\fB\-a\fR
+print all reads with and without adapter matches if the reads
+are in the range specified with '\-m' and '\-x'
+.SH AUTHOR
+ This manpage was written by Andreas Tille for the Debian distribution and
+ can be used for any other usage of the program.


=====================================
debian/python3-dnapi.postinst.debhelper deleted
=====================================
@@ -1,10 +0,0 @@
-
-# Automatically added by dh_python3:
-if which py3compile >/dev/null 2>&1; then
-	py3compile -p python3-dnapi 
-fi
-if which pypy3compile >/dev/null 2>&1; then
-	pypy3compile -p python3-dnapi  || true
-fi
-
-# End automatically added section


=====================================
debian/python3-dnapi.prerm.debhelper deleted
=====================================
@@ -1,10 +0,0 @@
-
-# Automatically added by dh_python3:
-if which py3clean >/dev/null 2>&1; then
-	py3clean -p python3-dnapi 
-else
-	dpkg -L python3-dnapi | perl -ne 's,/([^/]*)\.py$,/__pycache__/\1.*, or next; unlink $_ or die $! foreach glob($_)'
-	find /usr/lib/python3/dist-packages/ -type d -name __pycache__ -empty -print0 | xargs --null --no-run-if-empty rmdir
-fi
-
-# End automatically added section


=====================================
debian/python3-dnapi.substvars deleted
=====================================
@@ -1,3 +0,0 @@
-python3:Depends=python3:any
-misc:Depends=
-misc:Pre-Depends=


=====================================
debian/python3-dnapi/DEBIAN/control deleted
=====================================
@@ -1,14 +0,0 @@
-Package: python3-dnapi
-Source: dnapi
-Version: 1.1-1
-Architecture: all
-Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
-Installed-Size: 56
-Depends: python3:any
-Section: science
-Priority: optional
-Homepage: https://github.com/jnktsj/DNApi/
-Description: <insert up to 60 chars description> (Python 3)
- <insert long description, indented with spaces>
- .
- This package installs the library for Python 3.


=====================================
debian/python3-dnapi/DEBIAN/md5sums deleted
=====================================
@@ -1,15 +0,0 @@
-3f4a2455da19fcb3499ab1f5f50fb405  usr/bin/dnapi.py
-48c71a177c9fcae385e44ef24e747112  usr/bin/qual_offset.py
-6210de9a0e784bf8826d922c0bda1e78  usr/bin/qual_trim.py
-0fb7c49c8f67abebf14193ae03d8d92d  usr/bin/to_fasta.py
-430e7498712cb3cb9b3aa7c4c8358ee9  usr/lib/python3/dist-packages/DNApi-1.1.egg-info/PKG-INFO
-68b329da9893e34099c7d8ad5cb9c940  usr/lib/python3/dist-packages/DNApi-1.1.egg-info/dependency_links.txt
-cc3a2d4806b534640673d29a2e0e07c1  usr/lib/python3/dist-packages/DNApi-1.1.egg-info/top_level.txt
-cfbcc2f119242f67820a60c62bef81b0  usr/lib/python3/dist-packages/dnapilib/__init__.py
-58fd62c5617f11c9b55aa0782dc394d6  usr/lib/python3/dist-packages/dnapilib/apred.py
-e3166aea3e28e837aed2563869cfdcfb  usr/lib/python3/dist-packages/dnapilib/exhaust.py
-8433664a81e7ef9550e21dda129db2b4  usr/lib/python3/dist-packages/dnapilib/io_utils.py
-4d51523fd1621a09a4f5f65f49e40ff1  usr/lib/python3/dist-packages/dnapilib/kmer.py
-a703bf26b90dbaf4274c3f0cc3a4b06c  usr/share/doc/python3-dnapi/README.Debian
-dc3b2275e15978587469141b883b28b8  usr/share/doc/python3-dnapi/changelog.Debian.gz
-03fa6097dbd2372ec358ca173ffb113e  usr/share/doc/python3-dnapi/copyright


=====================================
debian/python3-dnapi/DEBIAN/postinst deleted
=====================================
@@ -1,12 +0,0 @@
-#!/bin/sh
-set -e
-
-# Automatically added by dh_python3:
-if which py3compile >/dev/null 2>&1; then
-	py3compile -p python3-dnapi 
-fi
-if which pypy3compile >/dev/null 2>&1; then
-	pypy3compile -p python3-dnapi  || true
-fi
-
-# End automatically added section


=====================================
debian/python3-dnapi/DEBIAN/prerm deleted
=====================================
@@ -1,12 +0,0 @@
-#!/bin/sh
-set -e
-
-# Automatically added by dh_python3:
-if which py3clean >/dev/null 2>&1; then
-	py3clean -p python3-dnapi 
-else
-	dpkg -L python3-dnapi | perl -ne 's,/([^/]*)\.py$,/__pycache__/\1.*, or next; unlink $_ or die $! foreach glob($_)'
-	find /usr/lib/python3/dist-packages/ -type d -name __pycache__ -empty -print0 | xargs --null --no-run-if-empty rmdir
-fi
-
-# End automatically added section


=====================================
debian/python3-dnapi/usr/bin/dnapi.py deleted
=====================================
@@ -1,243 +0,0 @@
-#!/usr/bin/python3
-
-import sys
-import os.path
-import re
-import uuid
-import signal
-import fileinput
-import subprocess
-from argparse import ArgumentParser
-
-import dnapilib
-from dnapilib.io_utils import get_file_obj
-from dnapilib.apred import adapter_prediction
-from dnapilib.apred import iterative_adapter_prediction
-from dnapilib.exhaust import rm_temp_dir
-from dnapilib.exhaust import fastq_input_prep
-from dnapilib.exhaust import map_clean_reads
-from dnapilib.exhaust import make_stats_report
-
-
-TEMP_DIR = None
-MAP_TO_GENOME = False
-SAMPLE_NUM = 50000
-
-
-def convert_interval(s_in, s_op, func):
-    """Return range of kmers or filtering ratios.
-
-    """
-    msg = "bad {}: {} {}"
-    try:
-        s = list(map(func, s_in.split(":")))
-    except:
-        raise Exception(msg.format("value", s_op, s_in))
-    if len(s) == 1:
-        return s
-    if len(s) == 3:
-        beg, end, interval = s
-        values = []
-        while beg < end:
-            values.append(beg)
-            beg += interval
-        values.append(end)
-        return values
-    else:
-        raise Exception(msg.format("interval", s_op, s_in))
-
-
-def parse_args():
-    """Return options and required arguments.
-
-    """
-    parser = ArgumentParser(
-                 usage="%(prog)s [options] FASTQ",
-                 description="Predict or evaluate 3'adapter sequence(s)",
-                 epilog="Report bug to: Junko Tsuji <jnktsj at gmail.com>")
-
-    parser.add_argument("FASTQ",
-        type=str,
-        help="including stdin or compressed file {zip,gz,tar,bz}")
-    parser.add_argument("--version", action="version",
-        version="%(prog)s {}".format(dnapilib.__version__))
-
-    predop = parser.add_argument_group("adapter prediction parameters")
-    predop.add_argument("-k",
-        metavar="[KMER_BEG:KMER_END:INCREMENT | KMER_LEN]",
-        default="9:11:2",
-        help="range of kmers or a single kmer to predict 3'adapters "
-             "(default: %(default)s)")
-    predop.add_argument("-r",
-        metavar="[RATIO_BEG:RATIO_END:INTCREMENT | RATIO]",
-        default="1.2:1.4:0.1",
-        help="range of ratios or a single ratio to filter less abundant kmers"
-             " (default: %(default)s)")
-    predop.add_argument("--show-all",
-        action="store_true",
-        help="show other candidates if any")
-
-    exhaop = parser.add_argument_group("exhaustive adapter search")
-    exhaop.add_argument("--map-command",
-        metavar="COMMAND",
-        default=None,
-        help="read mapping command to be tested")
-    exhaop.add_argument("--subsample-rate",
-        metavar="FLOAT",
-        default=1.0, type=float,
-        help="subsampling fraction of reads (default: %(default)s)")
-    exhaop.add_argument("--output-dir",
-        metavar="DIRECTORY",
-        default="./dnapi_out",
-        help="output directory to write report and cleansed reads"
-             " (default: ./dnapi_out)")
-    exhaop.add_argument("--no-output-files",
-        action="store_true",
-        help="only display report and suppress output files")
-    exhaop.add_argument("--temp-dir",
-        metavar="DIRECTORY",
-        default="/tmp",
-        help="place to make temporary directory (default: %(default)s)")
-
-    evalop = parser.add_argument_group("evaluation of candidate adapters")
-    evalop.add_argument("--adapter-seq",
-        dest="seq", nargs="+",
-        default=None,
-        help="list of 3'adapters for evaluation")
-
-    adrmop = parser.add_argument_group("adapter removal parameters")
-    adrmop.add_argument("--prefix-match",
-        metavar="LENGTH",
-        default=7, type=int,
-        help="3'adapter match length to trim (default: %(default)s)")
-    adrmop.add_argument("--min-len",
-        metavar="LENGTH",
-        default=16, type=int,
-        help="minimum read length to keep for mapping (default: %(default)s)")
-    adrmop.add_argument("--max-len",
-        metavar="LENGTH",
-        default=36, type=int,
-        help="maximum read length to keep for mapping (default: %(default)s)")
-    adrmop.add_argument("--trim-5p",
-        metavar="LENGTH",
-        default=0, type=int,
-        help="trim specified number of bases from 5'ends after adapter removal"
-             " (default: %(default)s)")
-    adrmop.add_argument("--trim-3p",
-        metavar="LENGTH",
-        default=0, type=int,
-        help="trim specified number of bases from 3'ends after adapter removal"
-             " (default: %(default)s)")
-
-    args = parser.parse_args()
-
-    if args.map_command:
-        err_find = "can't find {}"
-        soft = os.path.expanduser(args.map_command.split()[0])
-        if os.path.dirname(soft):
-            if not os.path.exists(soft):
-                raise Exception(err_find.format(soft))
-        else:
-            try:
-                subprocess.call("which {}".format(soft).split())
-            except OSError:
-                raise Exception(err_find.format(soft))
-        if not re.findall("@in", args.map_command):
-            raise Exception("can't locate input argument: @in")
-        if not re.findall("@out", args.map_command):
-            raise Exception("can't locate output argument: @out")
-        if args.prefix_match <= 0:
-            raise Exception("bad value: --prefix-match")
-        if args.min_len <= 0:
-            raise Exception("bad value: --min-len")
-        if args.max_len <= 0:
-            raise Exception("bad value: --max-len")
-        if args.trim_5p < 0:
-            raise Exception("bad value: --trim-5p")
-        if args.trim_3p < 0:
-            raise Exception("bad value: --trim-3p")
-        if args.subsample_rate <= 0 or 1 < args.subsample_rate:
-            raise Exception("bad subsampling rate")
-        global MAP_TO_GENOME
-        MAP_TO_GENOME = True
-
-    return args
-
-
-def main():
-    args = parse_args()
-    fastq = args.FASTQ
-
-    Ks = convert_interval(args.k, "-k", int)
-    Rs = convert_interval(args.r, "-r", float)
-
-    if not MAP_TO_GENOME:
-        if len(Ks) > 1 or len(Rs) > 1:
-            adapts = iterative_adapter_prediction(fastq, Rs, Ks, SAMPLE_NUM)
-        else:
-            adapts = adapter_prediction(fastq, Rs[0], Ks[0], SAMPLE_NUM)
-        if args.show_all:
-            for x in adapts:
-                print("{}\tscore={:.2f}".format(*x))
-        else:
-            print(adapts[0][0])
-
-    else:
-        global TEMP_DIR
-        TEMP_DIR = "{}/DNApi_tmp_{}".format(
-            args.temp_dir, str(uuid.uuid4()))
-        subprocess.call(("mkdir {}".format(TEMP_DIR)).split())
-
-        original_fastq = fastq
-        fastq, total_read, sd = fastq_input_prep(
-            fastq, args.subsample_rate, TEMP_DIR)
-
-        if args.seq:
-            adapts = set(args.seq)
-            setstr = ["user-input" for i in range(len(adapts))]
-        else:
-            msg = "warning: predicted adapter is too short (<{0}): '{1}'\n" \
-                + "warning: '{1}' will not be further investigated\n"
-            params = {}
-            for k in Ks:
-                for r in Rs:
-                    aout = adapter_prediction(fastq, r, k, SAMPLE_NUM)[0][0]
-                    if len(aout) < args.prefix_match:
-                        sys.stderr.write(msg.format(l, s))
-                        continue
-                    aseq = aout[: args.prefix_match+5]
-                    params.setdefault(aseq,[]).append("{}:{:.1f}".format(k,r))
-            adapts = list(params.keys())
-            setstr = [';'.join(s) for s in params.values()]
-            adapts.append("RAW_INPUT")
-            setstr.append("NO_TREATMENT")
-
-        if not adapts:
-            raise Exception("no valid adapters to further process")
-
-        table = []
-        for i, aseq in enumerate(adapts):
-            cnts = map_clean_reads(
-                       fastq, aseq[:args.prefix_match], args.trim_5p,
-                       args.trim_3p, args.min_len, args.max_len,
-                       args.map_command, TEMP_DIR)
-            read_stats = [c / total_read * 100 for c in cnts]
-            table.append([aseq, cnts[0], read_stats[0],
-                          cnts[1], read_stats[1], setstr[i]])
-        make_stats_report(
-            table, total_read, args.subsample_rate, args.prefix_match,
-            sd, original_fastq, args.output_dir, TEMP_DIR, args.no_output_files)
-
-
-if __name__ == "__main__":
-    signal.signal(signal.SIGPIPE, signal.SIG_DFL)
-    try:
-        main()
-    except KeyboardInterrupt:
-        rm_temp_dir(TEMP_DIR)
-    except Exception as e:
-        prog = os.path.basename(sys.argv[0])
-        rm_temp_dir(TEMP_DIR)
-        sys.exit("{}: error: {}".format(prog, str(e)))
-    finally:
-        rm_temp_dir(TEMP_DIR)


=====================================
debian/python3-dnapi/usr/bin/qual_offset.py deleted
=====================================
@@ -1,59 +0,0 @@
-#!/usr/bin/python3
-
-"""Guess fastq quality encoding offset by checking the range
-    of the ASCII-encoded quality scores in FASTQ.
-
-"""
-
-import sys
-import os.path
-import signal
-import subprocess
-from argparse import ArgumentParser
-
-cur = os.path.dirname(os.path.abspath(__file__))
-sys.path.append(os.path.dirname(cur))
-from dnapilib.io_utils import get_file_obj, fastq_quality
-
-
-def guess_qual_offset(args):
-    platform = [ ('Sanger/Illumina-1.8+', 33,  76, 33),
-                 ('Illumina-1.5+', 67, 104, 64),
-                 ('Illumina-1.3+', 54, 104, 64),
-                 ('Solexa', 59, 104, 64) ]
-    q_chars = set()
-    fastqs = fastq_quality(get_file_obj(args.FASTQ))
-    sample_num = 50000
-    for i, quality in enumerate(fastqs):
-        if i == sample_num:
-            break
-        q_chars = q_chars.union(quality)
-
-    q_int = sorted(list(map(ord, q_chars)))
-    if len(q_int) <= 1:
-        raise Exception("unknown quality encoding")
-    for pl in platform:
-        if pl[1] <= q_int[1] and q_int[-2] <= pl[2]:
-            return "{}:base={}".format(pl[0], pl[3])
-
-    raise Exception("unknown quality encoding")
-
-
-if __name__ == "__main__":
-    signal.signal(signal.SIGPIPE, signal.SIG_DFL)
-    prog = os.path.basename(sys.argv[0])
-    if sys.version_info.major <= 2:
-        raise ValueError("{} requires python version 3 or higher".format(prog))
-
-    parser = ArgumentParser(
-                 description="Estimate quality score encoding")
-    parser.add_argument("FASTQ",
-        type=str,
-        help="including stdin or compressed file {zip,gz,tar,bz}")
-    args = parser.parse_args()
-
-    try:
-        print(guess_qual_offset(args))
-    except KeyboardInterrupt: pass
-    except Exception as e:
-        sys.exit(prog + ": error: " + str(e))


=====================================
debian/python3-dnapi/usr/bin/qual_trim.py deleted
=====================================
@@ -1,141 +0,0 @@
-#!/usr/bin/python3
-
-"""Perform quality trimming with the same algorithm as
-   bwa_trim_read() in bwaseqio.c, BWA. For Solexa quliaty,
-   the scores are converted to Phred quality for trimming.
-
-   Formula to convert Solexa quality to Phred quality is:
-   Phred = 10 * log_10(1 + 10 ** (Solexa / 10.0))
-
-   Formulas to calculate Phred and Solexa quality scores
-   from sequencing error probability are:
-   Phred  = -10 * log_10(P)
-   Solexa = -10 * log_10(P / (1 - P))
-
-"""
-
-import sys
-import re
-import os.path
-import signal
-import math
-from argparse import ArgumentParser
-
-
-cur = os.path.dirname(os.path.abspath(__file__))
-sys.path.append(os.path.dirname(cur))
-from dnapilib.io_utils import get_file_obj, fastq_record
-
-
-def solexa_to_phred(x):
-    return int(round(10 * math.log10(1+10**(x/10.0))))
-
-
-def illumina_64B(x):
-    if x == 2:
-        return 0
-    else:
-        return x
-
-
-def illumina_33(x):
-    return x
-
-
-def calc_qual_score(p, solexa):
-    if solexa:
-        d = 1.0 - p if not p else 1
-        return solexa_to_phred(int(-10 * math.log10(p/d)))
-    else:
-        return int(-10 * math.log10(p))
-
-
-def qual_trim(args):
-    if args.solexa:
-        args.b = 64
-        func = solexa_to_phred
-    elif args.illumina5:
-        func = illumina_64B
-    else:
-        func = illumina_33
-
-    if args.b not in (33, 64):
-        raise Exception("wrong quality score base")
-    if args.l < 1:
-        raise Exception("specify longer read length")
-    if args.p < 0 or args.p > 1:
-        raise Exception("bad error probability cutoff")
-    if not args.solexa and args.q < 0:
-        raise Exception("bad quality score cutoff")
-
-    if args.q:
-        cutoff = args.q
-    else:
-        cutoff = calc_qual_score(args.p, args.solexa)
-
-    base = args.b
-    minlen = args.l
-    ns = re.compile('N', re.IGNORECASE)
-    fastqs = fastq_record(get_file_obj(args.FASTQ))
-    for read in fastqs:
-        read = read.rstrip().split("\n")
-        qual = read[3]
-        s, max_s = 0, 0
-        max_i = len(read[3])
-        if minlen > max_i:
-            continue
-        for i in reversed(range(max_i)):
-            q = func(ord(qual[i]) - base)
-            s += cutoff - q
-            if s < 0:
-                break
-            if s > max_s:
-                max_s, max_i = s, i
-        read[1] = read[1][:max_i]
-        read[3] = read[3][:max_i]
-        n_num = len(ns.findall(read[1]))
-        if n_num < len(read[1]) and len(read[1]) >= minlen:
-            print("\n".join(read))
-
-
-if __name__ == "__main__":
-    signal.signal(signal.SIGPIPE, signal.SIG_DFL)
-    prog = os.path.basename(sys.argv[0])
-    if sys.version_info.major <= 2:
-        raise ValueError("{} requires python version 3 or higher".format(prog))
-
-    parser = ArgumentParser(
-                 description="Perform quality trimming for single-end reads.")
-    parser.add_argument("FASTQ",
-        type=str,
-        help="including stdin or compressed file {zip,gz,tar,bz}")
-    parser.add_argument("-b",
-        metavar="BASE",
-        type=int, default=33,
-        help="ASCII-encoded quality offset, e.g. 33 or 64 (default: %(default)s)")
-    parser.add_argument("-p",
-        metavar="PROB",
-        type=float, default=0.1,
-        help="error probability cutoff (default: %(default)s)")
-    parser.add_argument("-q",
-        metavar="SCORE",
-        type=int, default=0,
-        help="quality score cutoff (default: '-p 0.1')")
-    parser.add_argument("-l",
-        type=int, default=16,
-        metavar="BP",
-        help="minimum read length in bp (default: %(default)s)")
-    parser.add_argument("--illumina5",
-        action="store_true",
-        help="Illumina 1.5+ encoding marked with 'B'")
-    parser.add_argument("--solexa",
-        action="store_true",
-        help="Solexa encoding")
-
-    args = parser.parse_args()
-
-    try:
-        qual_trim(args)
-    except KeyboardInterrupt: pass
-    except Exception as e:
-        sys.exit(prog + ": error: " + str(e))


=====================================
debian/python3-dnapi/usr/bin/to_fasta.py deleted
=====================================
@@ -1,191 +0,0 @@
-#!/usr/bin/python3
-
-"""Clip off adapters from reads in FASTQ by searching kmer
-   exact prefix matches. There is an option '-s' that tries
-   to find prefix matches in length of (k + 1) nucleotides
-   with 1 mismatch if perfect prefix matches are not found.
-   After adapter removal, the program tallies clean reads
-   and writes non-redundant reads with the counts in FASTA.
-
-"""
-
-
-import sys
-import re
-import os.path
-import signal
-from operator import itemgetter
-from argparse import ArgumentParser
-
-
-cur = os.path.dirname(os.path.abspath(__file__))
-sys.path.append(os.path.dirname(cur))
-from dnapilib.io_utils import get_file_obj, fastq_sequence
-
-
-def make_regex(a_seq, a_len, is_3prime, sensitive):
-    if not a_seq:
-        return None, None
-
-    cutoff = a_len
-    if sensitive:
-        cutoff = a_len + 1
-
-    if len(a_seq) < cutoff:
-        message = "input adapters longer than {} nt"
-        raise Exception(message.format(cutoff-1))
-
-    a_seq = a_seq.upper().replace('U', 'T')
-    if is_3prime:
-        pat = "(.*)"
-        p_seq, m_seq = a_seq[:a_len], a_seq[:a_len+1]
-        beg, end = 0, a_len
-    else:
-        pat = "(.*?)"
-        p_seq, m_seq = a_seq[-a_len:], a_seq[-(a_len+1):]
-        beg, end = 1, a_len+1
-
-    pp = re.compile(pat+p_seq, re.IGNORECASE)
-    if not sensitive:
-        return pp, []
-
-    mp = []
-    seed = list(m_seq)
-    for i in range(beg, end):
-        ps = seed[:]
-        ps[i] = '.'
-        x = re.compile(pat+''.join(ps), re.IGNORECASE)
-        mp.append(x)
-    return pp, mp
-
-
-def match_adapters(seq, pp, mps, sensitive, pi=0, mi=0, l=0):
-    if not pp:
-        return l, '*'
-
-    p = pp.search(seq)
-    if p:
-        return (p.end()-pi), '0'
-
-    if not sensitive:
-        return l, '*'
-    else:
-        for mp in mps:
-            m = mp.search(seq)
-            if m:
-                return (m.end()-mi), '1'
-    return l, '*'
-
-
-def to_fasta(args):
-    if args.m <= 0:
-        raise Exception("bad value: -m")
-    if args.x <= 0:
-        raise Exception("bad value: -x")
-    if args.m == args.x:
-        raise Exception("bad read length cutoff range")
-    if not args.f and not args.b:
-        raise Exception("input adapter sequence")
-    if args.f == args.b:
-        raise Exception("5' and 3' adapters are same sequences")
-    if args.seed_5p <= 0:
-        raise Exception("bad value: --seed-5p")
-    if args.seed_3p <= 0:
-        raise Exception("bad value: --seed-3p")
-    if args.trim_3p < 0:
-        raise Exception("input positive value for 3'trimming")
-    if args.trim_5p < 0:
-        raise Exception("input positive value for 5'trimming")
-
-    f_seq, f_len = args.f, args.seed_5p
-    b_seq, b_len = args.b, args.seed_3p
-    if not f_seq and b_seq:
-        req = lambda x, y: y != '*' or args.a
-    elif f_seq and b_seq:
-        if args.B:
-            req = lambda x, y: x != '*' and y != '*' or args.a
-        else:
-            req = lambda x, y: x != '*' or y != '*' or args.a
-    elif f_seq and not b_seq:
-        req = lambda x, y: x != '*' or args.a
-
-    f_pp, f_mp = make_regex(f_seq, f_len, False, args.s)
-    b_pp, b_mp = make_regex(b_seq, b_len, True,  args.s)
-
-    fas = {}
-    for seq in fastq_sequence(get_file_obj(args.FASTQ)):
-        seq_len = len(seq)
-        f_i, f_mm = match_adapters(seq, f_pp, f_mp, args.s)
-        b_i, b_mm = match_adapters(seq, b_pp, b_mp, args.s,
-                                   b_len, b_len+1, seq_len)
-        ins = seq[f_i+args.trim_5p : b_i-args.trim_3p]
-        ins_len = len(ins)
-        if req(f_mm, b_mm) and (args.m <= ins_len and ins_len <= args.x):
-            fas[ins] = fas.get(ins, 0) + 1
-
-    fas = sorted(fas.items(), key=itemgetter(0))
-    for seq, cnt in fas:
-        print(">{0}_{1}\n{0}".format(seq, cnt))
-
-
-if __name__ == "__main__":
-    signal.signal(signal.SIGPIPE, signal.SIG_DFL)
-    prog = os.path.basename(sys.argv[0])
-    if sys.version_info.major <= 2:
-        raise ValueError("{} requires python version 3 or higher".format(prog))
-
-    parser = ArgumentParser(
-        description="Remove adapters and collapse reads from FASTQ to FASTA")
-    parser.add_argument("FASTQ",
-        type=str,
-        help="including stdin or compressed file {zip,gz,tar,bz}")
-    parser.add_argument("-3",
-        metavar="SEQ",
-        dest="b",
-        help="3'adapter sequence")
-    parser.add_argument("-5",
-        metavar="SEQ",
-        dest="f",
-        help="5'adapter sequence")
-    parser.add_argument("--trim-5p",
-        metavar="BP",
-        type=int, default=0,
-        help="trim specified number of bases from 5'ends")
-    parser.add_argument("--trim-3p",
-        metavar="BP",
-        type=int, default=0,
-        help="trim specified number of bases from 3'ends")
-    parser.add_argument("--seed-5p",
-        metavar="BP",
-        type=int, default=7,
-        help="5' adapter match length in bp (default: %(default)s)")
-    parser.add_argument("--seed-3p",
-        metavar="BP",
-        type=int,default=7,
-        help="3' adapter match length in bp (default: %(default)s)")
-    parser.add_argument("-m",
-        metavar="BP",
-        type=int, default=16,
-        help="minimum read length in bp (default: %(default)s)")
-    parser.add_argument("-x",
-        metavar="BP",
-        type=int, default=36,
-        help="maximum read length in bp (default: %(default)s)")
-    parser.add_argument("-s",
-        action="store_true",
-        help="sensitive adapter search with 1 mismatch (default: off)")
-    parser.add_argument("-B",
-        action="store_true",
-        help="only print the reads with both 5' and 3' adapter matches")
-    parser.add_argument("-a",
-        action="store_true",
-        help="print all reads with and without adapter matches if the "
-             "reads are in the range specified with '-m' and '-x'")
-
-    args = parser.parse_args()
-
-    try:
-        to_fasta(args)
-    except KeyboardInterrupt: pass
-    except Exception as e:
-        sys.exit(prog + ": error: " + str(e))


=====================================
debian/python3-dnapi/usr/share/doc/python3-dnapi/README.Debian deleted
=====================================
@@ -1,6 +0,0 @@
-dnapi for Debian
----------------
-
-This is an optional dependency for bcbio.
-
- -- Steffen Moeller <moeller at debian.org>  Fri, 13 Mar 2020 21:08:02 +0100


=====================================
debian/python3-dnapi/usr/share/doc/python3-dnapi/changelog.Debian.gz deleted
=====================================
Binary files a/debian/python3-dnapi/usr/share/doc/python3-dnapi/changelog.Debian.gz and /dev/null differ


=====================================
debian/python3-dnapi/usr/share/doc/python3-dnapi/copyright deleted
=====================================
@@ -1,30 +0,0 @@
-Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
-Upstream-Name: DNApi
-Source: https://github.com/jnktsj/DNApi
-
-Files: *
-Copyright: 2015, 2016 Junko Tsuji
-License: MIT
-
-Files: debian/*
-Copyright: 2020 Steffen Moeller <moeller at debian.org>
-License: MIT
-
-License: MIT
- Permission is hereby granted, free of charge, to any person obtaining a
- copy of this software and associated documentation files (the "Software"),
- to deal in the Software without restriction, including without limitation
- the rights to use, copy, modify, merge, publish, distribute, sublicense,
- and/or sell copies of the Software, and to permit persons to whom the
- Software is furnished to do so, subject to the following conditions:
- .
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
- .
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


=====================================
debian/rules
=====================================
@@ -3,20 +3,23 @@
 # output every command that modifies files on the build system.
 #export DH_VERBOSE = 1
 
-export PYBUILD_NAME=dnapi
+include /usr/share/dpkg/default.mk
+
+export PYBUILD_NAME=dnapilib
 
 %:
 	dh $@ --with python3 --buildsystem=pybuild
 
+override_dh_install:
+	dh_install
+	# Move user applications into separate package
+	mkdir -p debian/$(DEB_SOURCE)/usr
+	mv debian/python3-$(PYBUILD_NAME)/usr/bin debian/$(DEB_SOURCE)/usr
 
-# If you need to rebuild the Sphinx documentation
-# Add spinxdoc to the dh --with line
-#
-# And uncomment the following lines
-#override_dh_auto_build: export http_proxy=127.0.0.1:9
-#override_dh_auto_build: export https_proxy=127.0.0.1:9
-#override_dh_auto_build:
-#	dh_auto_build
-#	PYTHONPATH=. python3 -m sphinx -N -bhtml docs/ build/html # HTML generator
-#	PYTHONPATH=. python3 -m sphinx -N -bman docs/ build/man # Manpage generator
+override_dh_installman:
+	dh_installman --language=C
 
+# somehow .fq files will not be compressed
+override_dh_compress:
+	dh_compress
+	find debian -name '*.fq' -exec gzip \{\} \;


=====================================
debian/salsa-ci.yml
=====================================
@@ -0,0 +1,4 @@
+---
+include:
+  - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
+  - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml


=====================================
debian/upstream/metadata
=====================================
@@ -1,3 +1,5 @@
+Bug-Database: https://github.com/jnktsj/DNApi/issues
+Bug-Submit: https://github.com/jnktsj/DNApi/issues/new
 Reference:
  - Author: Junko Tsuji and Zhiping Weng
    Year: 2016
@@ -21,3 +23,5 @@ Registry:
    Entry: dnapi
  - Name: bio.tools
    Entry: NA
+Repository: https://github.com/jnktsj/DNApi.git
+Repository-Browse: https://github.com/jnktsj/DNApi



View it on GitLab: https://salsa.debian.org/med-team/dnapi/-/compare/ab1228d63927a672ac6f121718d75c767e5c61d7...7149c96dd5cd0ff5c69e45dd7707f9dd7ae5e226

-- 
View it on GitLab: https://salsa.debian.org/med-team/dnapi/-/compare/ab1228d63927a672ac6f121718d75c767e5c61d7...7149c96dd5cd0ff5c69e45dd7707f9dd7ae5e226
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/20200419/0dca2fb8/attachment-0001.html>


More information about the debian-med-commit mailing list