[med-svn] [Git][med-team/tnseq-transit][master] 4 commits: Enable Build-Time tests

Nilesh Patra gitlab at salsa.debian.org
Tue Aug 25 14:53:47 BST 2020



Nilesh Patra pushed to branch master at Debian Med / tnseq-transit


Commits:
fe4b48b9 by Nilesh Patra at 2020-08-25T18:11:43+05:30
Enable Build-Time tests

- - - - -
9e8aa567 by Nilesh Patra at 2020-08-25T13:29:41+00:00
Add autopkgtests

- - - - -
b4667cb9 by Nilesh Patra at 2020-08-25T13:39:44+00:00
Add manpages

- - - - -
e76d90b8 by Nilesh Patra at 2020-08-25T13:40:26+00:00
compat version: 13

- - - - -


8 changed files:

- debian/control
- + debian/createmanpages
- + debian/manpages
- debian/rules
- + debian/tests/control
- + debian/tests/run-unit-test
- + debian/transit-tpp.1
- + debian/transit.1


Changes:

=====================================
debian/control
=====================================
@@ -3,7 +3,7 @@ Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.
 Uploaders: Andreas Tille <tille at debian.org>
 Section: science
 Priority: optional
-Build-Depends: debhelper-compat (= 12),
+Build-Depends: debhelper-compat (= 13),
                dh-python,
                python3-dev,
                python3-setuptools,


=====================================
debian/createmanpages
=====================================
@@ -0,0 +1,38 @@
+#!/bin/sh
+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`
+
+# If program name is different from package name or title should be
+# different from package short description change this here
+progname=transit
+help2man --no-info --no-discard-stderr --help-option="-h" \
+         --name="$NAME" \
+            --version-string="$VERSION" ${progname} > $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
+
+# If program name is different from package name or title should be
+# different from package short description change this here
+progname=transit-tpp
+help2man --no-info --no-discard-stderr --help-option="--help" \
+         --name="$NAME" \
+            --version-string="$VERSION" ${progname} > $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/rules
=====================================
@@ -18,6 +18,12 @@ override_dh_auto_configure:
 	mv tests/H37Rv.fna tests_invalid_data
 	dh_auto_configure
 
+override_dh_auto_test:
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+	dh_auto_test -- --system=custom --test-args="PYTHONPATH=tests {interpreter} -m unittest -v tests/*.py"
+endif
+
+
 override_dh_auto_clean:
 	dh_auto_clean
 	rm -rf tests_invalid_data


=====================================
debian/tests/control
=====================================
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @, python3-all, python3-pytest, python3-freezegun, python3-pytest-mock
+Restrictions: allow-stderr


=====================================
debian/tests/run-unit-test
=====================================
@@ -0,0 +1,34 @@
+#!/bin/bash
+set -e
+
+pkg=tnseq-transit
+CUR_DIR=`pwd`
+
+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 ${CUR_DIR}/src/pytransit/* -a "${AUTOPKGTEST_TMP}"
+
+cd "${AUTOPKGTEST_TMP}"
+gunzip -r *
+
+echo "Test 1"
+transit gumbel data/cholesterol_H37Rv_rep1.wig,data/cholesterol_H37Rv_rep2.wig genomes/H37Rv.prot_table test1
+[ -s test1 ] || exit 1
+echo "PASS"
+
+echo "Test 2"
+transit tn5gaps data/cholesterol_H37Rv_rep1.wig,data/cholesterol_H37Rv_rep2.wig genomes/H37Rv.prot_table test2 -m 2 -r Sum -iN 5 -iC 5
+[ -s test2 ] || exit 1
+echo "PASS"
+
+echo "Test 3"
+transit normalize data/glycerol_H37Rv_rep1.wig data/glycerol_H37Rv_rep2.wig -n TTR
+echo "PASS"
+
+echo "Test 4"
+transit tnseq_stats -c data/cholesterol_glycerol_combined.dat
+echo "PASS"
+


=====================================
debian/transit-tpp.1
=====================================
@@ -0,0 +1,34 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.12.
+.TH TRANSIT-TPP "1" "August 2020" "transit-tpp 3.1.0" "User Commands"
+.SH NAME
+transit-tpp \- statistical calculations of essentiality of genes or genomic regions
+.SH DESCRIPTION
+usage: python PATH/src/tpp.py \fB\-bwa\fR <EXECUTABLE_WITH_PATH> \fB\-ref\fR <fasta\-file|comma_separated_list> \fB\-reads1\fR <FASTQ_OR_FASTA_FILE> [\-reads2 <FASTQ_OR_FASTA_FILE>] \fB\-output\fR <BASE_FILENAME> [OPTIONAL ARGS]
+.IP
+OPTIONAL ARGS:
+.HP
+\fB\-protocol\fR [Sassetti|Tn5|Mme1] # which sample prep protocol was used?; sassetti protocol is the default; this sets the default transposon and primer sequence
+.TP
+\fB\-primer\fR <seq>
+# prefix of reads corresponding to end of transposon at junction with genomic sequence; can override default seq
+.HP
+\fB\-maxreads\fR <INT>
+.TP
+\fB\-mismatches\fR <INT>
+# when searching for constant regions in reads 1 and 2; default is 1
+.TP
+\fB\-flags\fR "<STRING>"
+# args to pass to BWA
+.TP
+\fB\-bwa\-alg\fR [aln|mem]
+# Default: mem. Algorithm to use for mapping reads with bwa
+.HP
+\fB\-primer\-start\-window\fR INT,INT # position in read to search for start of primer; default is [0,20]
+.TP
+\fB\-window\-size\fR INT
+# automatic method to set window
+.HP
+\fB\-barseq_catalog_in\fR|\-barseq_catalog_out <file>
+.TP
+\fB\-replicon\-ids\fR <comma_separated_list_of_names> # if multiple replicons/genomes/contigs/sequences were provided in \fB\-ref\fR, give them names.
+# Enter 'auto' for autogenerated ids.


=====================================
debian/transit.1
=====================================
@@ -0,0 +1,32 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.12.
+.TH TRANSIT "1" "August 2020" "transit 3.1.0" "User Commands"
+.SH NAME
+transit \- statistical calculations of essentiality of genes or genomic regions
+.SH SYNOPSIS
+.B python
+\fI\,/usr/bin/transit <method>\/\fR
+.SH DESCRIPTION
+For commandline mode, please use one of the known methods (or see documentation to add a new one):
+Analysis methods:
+.IP
+\- example
+\- gumbel
+\- binomial
+\- griffin
+\- hmm
+\- resampling
+\- tn5gaps
+\- rankproduct
+\- utest
+\- GI
+\- anova
+\- zinb
+\- pathway_enrichment
+\- tnseq_stats
+\- corrplot
+\- heatmap
+.SS "Other functions:"
+.IP
+\- normalize
+\- convert
+\- export



View it on GitLab: https://salsa.debian.org/med-team/tnseq-transit/-/compare/77778927d429cad6fa707508ae5d561d388fccb7...e76d90b86b06e82cbbb068e10e857ebfdf039545

-- 
View it on GitLab: https://salsa.debian.org/med-team/tnseq-transit/-/compare/77778927d429cad6fa707508ae5d561d388fccb7...e76d90b86b06e82cbbb068e10e857ebfdf039545
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/20200825/34f67cbf/attachment-0001.html>


More information about the debian-med-commit mailing list