[med-svn] [Git][med-team/tiddit][master] 4 commits: Use pybuild build system

Andreas Tille (@tille) gitlab at salsa.debian.org
Tue Jul 26 16:32:14 BST 2022



Andreas Tille pushed to branch master at Debian Med / tiddit


Commits:
070cc59b by Andreas Tille at 2022-07-26T17:30:29+02:00
Use pybuild build system

- - - - -
ca90b8c1 by Andreas Tille at 2022-07-26T17:30:45+02:00
Fix manpages

- - - - -
8132bd38 by Andreas Tille at 2022-07-26T17:31:02+02:00
No need for extra install

- - - - -
a8ad2868 by Andreas Tille at 2022-07-26T17:31:33+02:00
Drop unneeded patch

- - - - -


12 changed files:

- debian/changelog
- debian/control
- debian/createmanpages
- − debian/install
- − debian/man/TIDDIT.1
- − debian/man/TIDDIT.py.1
- debian/manpages
- − debian/patches/Fix-tiddit-binary-location.patch
- debian/patches/series
- debian/rules
- debian/tests/run-unit-test
- + debian/tiddit.1


Changes:

=====================================
debian/changelog
=====================================
@@ -3,6 +3,10 @@ tiddit (3.1.0+dfsg-1) UNRELEASED; urgency=medium
   * Fix watchfile to detect new versions on github
   * New upstream version
   * Standards-Version: 4.6.1 (routine-update)
+  * Adapt manpage to new binary name
+  * Drop cmake drom Build-Depends, add python3-setuptools,
+    python3-numpy to Build-Depends
+  * Use pybuild build system
 
  -- Andreas Tille <tille at debian.org>  Tue, 26 Jul 2022 09:44:27 +0200
 


=====================================
debian/control
=====================================
@@ -4,10 +4,11 @@ Uploaders: Andreas Tille <tille at debian.org>
 Section: science
 Priority: optional
 Build-Depends: debhelper-compat (= 13),
-               cmake,
                dh-python,
                cython3,
                python3-dev,
+               python3-setuptools,
+               python3-numpy,
                libbamtools-dev (>= 2.5.1+dfsg-6),
                zlib1g-dev
 Standards-Version: 4.6.1


=====================================
debian/createmanpages
=====================================
@@ -1,5 +1,5 @@
 #!/bin/sh
-MANDIR=debian/man
+MANDIR=debian
 mkdir -p $MANDIR
 
 VERSION=`dpkg-parsechangelog | awk '/^Version:/ {print $2}' | sed -e 's/^[0-9]*://' -e 's/-.*//' -e 's/[+~]dfsg$//'`
@@ -13,25 +13,10 @@ 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=TIDDIT.py
-help2man --no-info --no-discard-stderr --help-option=" " \
+help2man --no-info --no-discard-stderr  \
          --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
-
-progname=TIDDIT
-help2man --no-info --no-discard-stderr --help-option="--help" \
-         --name="$NAME" \
-            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1
-echo $AUTHOR >> $MANDIR/${progname}.1
+            --version-string="$VERSION" ${PROGNAME} > $MANDIR/${PROGNAME}.1
+echo $AUTHOR >> $MANDIR/${PROGNAME}.1
 
 echo "$MANDIR/*.1" > debian/manpages
 


=====================================
debian/install deleted
=====================================
@@ -1,2 +0,0 @@
-bin/*		usr/bin
-TIDDIT.py	usr/bin


=====================================
debian/man/TIDDIT.1 deleted
=====================================
@@ -1,26 +0,0 @@
-.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.12.
-.TH TIDDIT "1" "June 2020" "TIDDIT 2.12.0" "User Commands"
-.SH NAME
-TIDDIT \- structural variant calling
-.SH SYNOPSIS
-.B TIDDIT
-\fI\,<module> \/\fR[\fI\,options\/\fR]
-.SH DESCRIPTION
-TIDDIT\-2.12.0 \- a structural variant caller
-.PP
-modules
-.TP
-\fB\-\-help\fR
-produce help message
-.TP
-\fB\-\-sv\fR
-collect SV signals
-.TP
-\fB\-\-cov\fR
-select the cov module to analyse the coverage of the genome using bins of a specified size
-.TP
-\fB\-\-gc\fR
-select the gc module to compute the gc content across the genome using bins of a specified size(accepts a fasta through stdin)
-.SH AUTHOR
- This manpage was written by Nilesh Patra for the Debian distribution and
- can be used for any other usage of the program.


=====================================
debian/man/TIDDIT.py.1 deleted
=====================================
@@ -1,26 +0,0 @@
-.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.15.
-.TH TIDDIT.PY "1" "May 2020" "TIDDIT.py 2.11.0" "User Commands"
-.SH NAME
-TIDDIT.py \- structural variant calling
-.SH SYNOPSIS
-.B TIDDIT.py
-[\-\-sv] [\-\-cov]
-.SH DESCRIPTION
-TIDDIT is a tool to used to identify chromosomal rearrangements using
-Mate Pair or Paired End sequencing data. TIDDIT identifies intra and inter-
-chromosomal translocations, deletions, tandem-duplications and
-inversions, using supplementary alignments as well as discordant pairs.
-.P
-TIDDIT has two analysis modules. The sv mode, which is used to search
-for structural variants. And the cov mode that analyse the read depth of
-a bam file and generates a coverage report.
-.SH OPTIONS
-.TP
-\fB\-\-sv\fR
-call structural variation
-.TP
-\fB\-\-cov\fR
-generate a coverage bed file
-.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/manpages
=====================================
@@ -1 +1 @@
-debian/man/*.1
+debian/*.1


=====================================
debian/patches/Fix-tiddit-binary-location.patch deleted
=====================================
@@ -1,65 +0,0 @@
-Author: Nilesh Patra <npatra974 at gmail.com>
-Description: Search for the binary in same location: since both are eventually installed to /usr/bin
-Last Changed: Sun Jun 28 2020
---- a/TIDDIT.py
-+++ b/TIDDIT.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#! /usr/bin/python3
- import argparse
- import os
- import sys
-@@ -60,14 +60,14 @@
- 		print ("error,  could not find the bam file")
- 		quit()
- 
--	if not os.path.isfile("{}/bin/TIDDIT".format(args.wd)):
-+	if not os.path.isfile("{}/TIDDIT".format(args.wd)):
- 		print ("error,  could not find the TIDDIT executable file, try rerun the INSTALL.sh script")
- 		quit()
- 
- 	if not args.bam.endswith(".cram"):
--		command_str="{}/bin/TIDDIT --sv -b {} -o {} -p {} -r {} -q {} -n {} -s {}".format(args.wd,args.bam,args.o,args.p,args.r,args.q,args.n,args.s)
-+		command_str="{}/TIDDIT --sv -b {} -o {} -p {} -r {} -q {} -n {} -s {}".format(args.wd,args.bam,args.o,args.p,args.r,args.q,args.n,args.s)
- 	else:
--		command_str="samtools view -hbu {} -T {} | {}/bin/TIDDIT --sv -b /dev/stdin -o {} -p {} -r {} -q {} -n {} -s {}".format(args.bam,args.ref,args.wd,args.o,args.p,args.r,args.q,args.n,args.s)
-+		command_str="samtools view -hbu {} -T {} | {}/TIDDIT --sv -b /dev/stdin -o {} -p {} -r {} -q {} -n {} -s {}".format(args.bam,args.ref,args.wd,args.o,args.p,args.r,args.q,args.n,args.s)
- 	
- 
- 	if args.i:
-@@ -82,9 +82,9 @@
- 			t=time.time()
- 			print ("Generating GC wig file")
- 			if args.ref.endswith(".gz"):
--				os.system("zcat {} | {}/bin/TIDDIT --gc -z 50 -o {}".format(args.ref,args.wd,args.o))
-+				os.system("zcat {} | {}/TIDDIT --gc -z 50 -o {}".format(args.ref,args.wd,args.o))
- 			else:
--				os.system("cat {} | {}/bin/TIDDIT --gc -z 50 -o {}".format(args.ref,args.wd,args.o))
-+				os.system("cat {} | {}/TIDDIT --gc -z 50 -o {}".format(args.ref,args.wd,args.o))
- 			print ("Constructed GC wig in {} sec".format(time.time()-t))
- 
- 	if not args.no_cluster:
-@@ -108,12 +108,12 @@
- 			quit()
- 
- 	if not args.bam.endswith(".cram"):
--		command="{}/bin/TIDDIT --cov -b {} -o {} -z {}".format(args.wd,args.bam,args.o,args.z)
-+		command="{}/TIDDIT --cov -b {} -o {} -z {}".format(args.wd,args.bam,args.o,args.z)
- 	else:
- 		if not args.ref:
- 			print("error, missing reference sequence!")
- 			quit()
--		command="samtools view -hbu {} -T {} | {}/bin/TIDDIT --cov -b /dev/stdin -o {} -z {}".format(args.bam,args.ref,args.wd,args.o,args.z)
-+		command="samtools view -hbu {} -T {} | {}/TIDDIT --cov -b /dev/stdin -o {} -z {}".format(args.bam,args.ref,args.wd,args.o,args.z)
- 
- 	if args.w:
- 		command += " -w"
-@@ -124,7 +124,7 @@
- 	if not os.path.isfile(args.bam):
- 		print ("error,  could not find the bam file")
- 		quit()
--	if not os.path.isfile("{}/bin/TIDDIT".format(args.wd)):
-+	if not os.path.isfile("{}/TIDDIT".format(args.wd)):
- 		print ("error,  could not find the TIDDIT executable file, try rerun the INSTALL.sh script")
- 		quit()
- 	os.system(command)


=====================================
debian/patches/series
=====================================
@@ -1,2 +1 @@
 use_debian_packaged_libs.patch
-#Fix-tiddit-binary-location.patch


=====================================
debian/rules
=====================================
@@ -7,29 +7,14 @@ export LC_ALL=C.UTF-8
 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
 
 %:
-	dh $@ --with python3 --buildsystem=cmake
+	dh $@ --with python3 --buildsystem=pybuild
 
-override_dh_auto_configure:
-	dh_auto_configure -- -DCMAKE_BUILD_TYPE=RelWithDebInfo
-	dh_auto_configure --sourcedirectory=src --buildsystem=pybuild
-
-override_dh_auto_build:
-	sed -i 's/betwen/between/' src/data_structures/Translocation.cpp
-	dh_auto_build
-	dh_auto_build --sourcedirectory=src --buildsystem=pybuild
-
-override_dh_auto_install:
-	dh_auto_install
-	dh_auto_install --sourcedirectory=src --buildsystem=pybuild
+override_dh_clean:
+	dh_clean
+	rm -f tiddit/*.c
 
 override_dh_python3:
 	dh_python3 --shebang=/usr/bin/python3
 
 override_dh_installman:
 	dh_installman --language=C
-
-### When overriding auto_test make sure DEB_BUILD_OPTIONS will be respected
-#override_dh_auto_test:
-#ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
-#	do_stuff_for_testing
-#endif


=====================================
debian/tests/run-unit-test
=====================================
@@ -16,9 +16,10 @@ gunzip -r *
 cat normal.sam | samtools view -Sb - > normal.bam
 cat tumor.sam | samtools view -Sb - > tumor.bam
 
+set -x
 echo 'Test 1'
-TIDDIT --cov -b normal.bam -o test1
-TIDDIT --cov -w -b normal.bam -o test1
+tiddit --cov -bam normal.bam -o test1
+tiddit --cov -w -bam normal.bam -o test1
 for f in test1.*
 do
 	[ -s $f ] || exit 1
@@ -28,8 +29,8 @@ rm -f ./test1*
 echo 'PASS'
 
 echo 'Test 2'
-TIDDIT --cov -b normal.bam -o test2
-TIDDIT --cov -w -b tumor.bam -o test2
+tiddit --cov -b normal.bam -o test2
+tiddit --cov -w -b tumor.bam -o test2
 for f in test2.*
 do
 	[ -s $f ] || exit 1


=====================================
debian/tiddit.1
=====================================
@@ -0,0 +1,16 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.49.2.
+.TH TIDDIT "1" "July 2022" "tiddit 3.1.0" "User Commands"
+.SH NAME
+tiddit \- structural variant calling
+.SH DESCRIPTION
+usage: tiddit\-3.1.0 [\-\-sv] [\-\-cov]
+.SS "options:"
+.TP
+\fB\-\-sv\fR
+call structural variation
+.TP
+\fB\-\-cov\fR
+generate a coverage bed file
+.SH AUTHOR
+ This manpage was written by Andreas Tille for the Debian distribution and
+ can be used for any other usage of the program.



View it on GitLab: https://salsa.debian.org/med-team/tiddit/-/compare/d5464c8576a0489e7e0c466fc6987c895a7bb229...a8ad2868ffde3b7b7f3e17f63bcf6b6c225e2591

-- 
View it on GitLab: https://salsa.debian.org/med-team/tiddit/-/compare/d5464c8576a0489e7e0c466fc6987c895a7bb229...a8ad2868ffde3b7b7f3e17f63bcf6b6c225e2591
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/20220726/9e0375f9/attachment-0001.htm>


More information about the debian-med-commit mailing list