[med-svn] [qcumber] 02/15: Take over packaging from qc-pipeline for qcumber

Andreas Tille tille at debian.org
Wed Nov 23 08:21:08 UTC 2016


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository qcumber.

commit 03d8ef924d3272bd2f0328c8920458c26dbc157b
Author: Andreas Tille <tille at debian.org>
Date:   Fri Oct 21 15:34:17 2016 +0200

    Take over packaging from qc-pipeline for qcumber
---
 debian/README.Debian                               | 24 +++++++++++++++
 debian/changelog                                   | 11 +++++++
 debian/compat                                      |  1 +
 debian/control                                     | 36 ++++++++++++++++++++++
 debian/copyright                                   | 15 +++++++++
 debian/doc-base                                    | 15 +++++++++
 debian/docs                                        |  3 ++
 debian/gbp.conf                                    | 15 +++++++++
 debian/get-minikrakendb                            | 36 ++++++++++++++++++++++
 debian/install                                     |  3 ++
 debian/links                                       |  1 +
 debian/patches/adapt_config.patch                  | 19 ++++++++++++
 debian/patches/config_in_etc.patch                 | 35 +++++++++++++++++++++
 debian/patches/python3_explicit.patch              | 12 ++++++++
 debian/patches/series                              |  4 +++
 .../set_absolute_path_to_tex_template.patch        | 23 ++++++++++++++
 debian/rules                                       | 17 ++++++++++
 debian/source/format                               |  1 +
 debian/watch                                       |  3 ++
 19 files changed, 274 insertions(+)

diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..d5ec208
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,24 @@
+QCpipeline for Debian
+=====================
+
+The original docx was converted to PDF via
+
+    libreoffice --invisible --convert-to pdf QC\ Pipeline.docx
+
+
+
+The MiniKraken DB (2.7 GB): A pre-built 4 GB database constructed from
+complete bacterial, archaeal, and viral genomes in RefSeq (as of Dec. 8,
+2014). This can be used by users without the computational resources
+needed to build a Kraken database.
+   (see https://ccb.jhu.edu/software/kraken/)
+
+   https://ccb.jhu.edu/software/kraken/dl/minikraken.tgz
+
+To download and install this database you can use the script
+
+   get-minikrakendb
+
+in this directory.
+
+ -- Andreas Tille <TilleA at rki.de>  Wed, 16 Mar 2016 11:01:55 +0100
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..94e4a2a
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,11 @@
+qcumber (1.1.2-1) UNRELEASED; urgency=medium
+
+  * Initial release (Closes: #<bug>)
+
+ -- Andreas Tille <tille at debian.org>  Fri, 21 Oct 2016 15:28:14 +0200
+
+qc-pipeline (0.0.20160303-1) UNRELEASED; urgency=medium
+
+  * local packaging
+
+ -- Andreas Tille <TilleA at rki.de>  Wed, 16 Mar 2016 11:01:55 +0100
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..230ef4a
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,36 @@
+Source: qcumber
+Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Uploaders: Andreas Tille <tille at debian.org>
+Section: science
+Priority: optional
+Build-Depends: debhelper (>= 9),
+               dh-python,
+               python3-all,
+               fastqc,
+               trimmomatic,
+               bowtie2,
+               kraken,
+               texlive-latex-base
+Standards-Version: 3.9.8
+Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/qcumber.git
+Vcs-Git: https://anonscm.debian.org/git/debian-med/qcumber.git
+Homepage: https://gitlab.com/RKIBioinformaticsPipelines/QCumber
+X-Python-Version: >= 3.4
+
+Package: qcumber
+Architecture: any
+Depends: ${python3:Depends},
+         ${misc:Depends},
+         python3-jinja2,
+         python3-matplotlib
+Conflicts: qc-pipeline
+Provides: qc-pipeline
+Replaces: qc-pipeline
+Description: quality control of genomic sequences
+ QCPipeline is a tool for quality control. The workflow is as followed:
+ .
+  1. Quality control with FastQC
+  2. Trim Reads with Trimmomatic
+  3. Quality control of trimmed reads with FastQC
+  4. Map reads against reference using bowtie2
+  5. Classify reads with Kraken
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..fe6be77
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,15 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: <pkg>
+Source: <path_to_download>
+
+Files: *
+Copyright: 2016 Vivi Lieu <LieuV at rki.de>
+License: <license>
+
+Files: combineFastQC.py
+Copyright: 2015 Stephan Fuchs <FuchsS at rki.de>
+License: <license>
+
+Files: debian/*
+Copyright: 2016 Andreas Tille <TilleA at rki.de>
+License: <license>
diff --git a/debian/doc-base b/debian/doc-base
new file mode 100644
index 0000000..a3a8051
--- /dev/null
+++ b/debian/doc-base
@@ -0,0 +1,15 @@
+Document: qc-pipeline
+Title: QCpipeline
+Author: Vivi Lieu <LieuV at rki.de>
+Abstract:  quality control of genomic sequences
+ QCPipeline is a tool for quality control. The workflow is as followed:
+ .
+  1. Quality control with FastQC
+  2. Trim Reads with Trimmomatic
+  3. Quality control of trimmed reads with FastQC
+  4. Map reads against reference using bowtie2
+  5. Classify reads with Kraken
+Section: Science/Biology
+
+Format: pdf
+Files: /usr/share/doc/qc-pipeline/QC_Pipeline.pdf
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..36666dc
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1,3 @@
+debian/get-minikrakendb
+readme.txt
+QC_Pipeline.pdf
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..3d995de
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,15 @@
+# This package uses pristine-tar, and does not follow the canonical layout of git-buildpackage.
+
+[DEFAULT]
+# the default branch for upstream sources:
+upstream-branch = master
+# the default branch for the debian patch:
+debian-branch = debian/jessie-backports
+# the default tag formats used:
+upstream-tag = %(version)s
+# use pristine-tar:
+pristine-tar = True
+
+[dch]
+# include 7 digits of the commit id in the changelog enty:
+id-length = 7
diff --git a/debian/get-minikrakendb b/debian/get-minikrakendb
new file mode 100755
index 0000000..1625dfd
--- /dev/null
+++ b/debian/get-minikrakendb
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+KRAKENDBDIR=/var/lib/kraken
+
+check_krakendb_md5 () {
+  if ! grep -q "$1.*$2" minikraken.md5 ; then
+    echo "$2 has changed md5sum - please investigate"
+  fi
+}
+
+if [ ! -d $KRAKENDBDIR ] ; then
+cat <<EOT
+Please care for the installation of $KRAKENDBDIR and make sure you have
+sufficient permission to write to this directory.
+EOT
+    exit 1
+fi
+
+cd $KRAKENDBDIR
+
+if ! touch testfile 2>/dev/null ; then
+     echo "You do not have permission to write to $KRAKENDBDIR."
+     exit 1
+fi
+rm testfile
+
+wget https://ccb.jhu.edu/software/kraken/dl/minikraken.tgz
+tar xaf minikraken.tgz
+md5sum `find . -type f` > minikraken.md5
+
+check_krakendb_md5 30eab12118158d0b31718106785195e2 minikraken.tgz
+check_krakendb_md5 362490d24caaa619102c27fa11caebe2 minikraken_20141208/MiniKraken.README
+check_krakendb_md5 2e2253a440d18baaaac8b3ef400d3393 minikraken_20141208/database.kdb
+check_krakendb_md5 68e3c1c8502fd7bc84649a96666c844f minikraken_20141208/taxonomy/nodes.dmp
+check_krakendb_md5 ee5f25d7aa0a259be9ac82074f07e443 minikraken_20141208/taxonomy/names.dmp
+check_krakendb_md5 f4a97df0e8a55451af9d5bd94ca7186e minikraken_20141208/database.idx
diff --git a/debian/install b/debian/install
new file mode 100644
index 0000000..4e88ce7
--- /dev/null
+++ b/debian/install
@@ -0,0 +1,3 @@
+*.py		usr/share/qc-pipeline
+config.txt	etc/qc-pipeline
+*.tex		usr/share/qc-pipeline
diff --git a/debian/links b/debian/links
new file mode 100644
index 0000000..1e99dfc
--- /dev/null
+++ b/debian/links
@@ -0,0 +1 @@
+usr/share/qc-pipeline/runQCPipeline.py	usr/bin/runQCPipeline
diff --git a/debian/patches/adapt_config.patch b/debian/patches/adapt_config.patch
new file mode 100644
index 0000000..d9e5fd3
--- /dev/null
+++ b/debian/patches/adapt_config.patch
@@ -0,0 +1,19 @@
+Author: Andreas Tille <TilleA at rki.de>
+Last-Update: Wed, 16 Mar 2016 11:01:55 +0100
+Description: Use Debian packaged locations
+
+--- a/config.txt
++++ b/config.txt
+@@ -1,9 +1,9 @@
+ [DEFAULT]
+-kraken_db =/home/andruscha/programs/kraken/minikraken_20141208/ 
++kraken_db = /var/lib/kraken/minikraken_20141208
+ 
+ [PATH]
+-kraken = /home/andruscha/programs/kraken/kraken_build/
+-adapter = /data/GS/tools/Trimmomatic-0.32/adapters/
++kraken = /usr/lib/kraken
++adapter = /usr/share/trimmomatic/
+ fastqc = 
+ trimmomatic =
+ bowtie2 =
diff --git a/debian/patches/config_in_etc.patch b/debian/patches/config_in_etc.patch
new file mode 100644
index 0000000..b4a2537
--- /dev/null
+++ b/debian/patches/config_in_etc.patch
@@ -0,0 +1,35 @@
+Author: Andreas Tille <TilleA at rki.de>
+Last-Update: Wed, 16 Mar 2016 11:01:55 +0100
+Description: Config file should be in /etc/qc-pipeline
+
+--- a/classes.py
++++ b/classes.py
+@@ -15,7 +15,7 @@ import shutil
+ def get_tool_path(name):
+ 
+ 	config = configparser.ConfigParser()
+-	config.read(join(dirname(__file__), "config.txt"))
++	config.read(join("/etc/qc-pipeline", "config.txt"))
+ 	path_dict = config["PATH"]
+ 	return path_dict[name]
+ 
+@@ -32,7 +32,7 @@ class Pipeline:
+ 		self.fastqc_version = toLatex(subprocess.check_output(join(get_tool_path("fastqc"), "fastqc") + " --version", shell = True).decode("utf-8"))
+ 
+ 		config = configparser.ConfigParser()
+-		config.read(join(dirname(__file__), "config.txt"))
++		config.read(join("/etc/qc-pipeline", "config.txt"))
+ 		if "VERSION" in config:
+ 			self.trimmo_version = config["VERSION"]["trimmomatic"]
+ 		else:
+--- a/runQCPipeline.py
++++ b/runQCPipeline.py
+@@ -203,7 +203,7 @@ def check_project(argMap):
+ 
+ if __name__ == "__main__":
+ 	config = configparser.ConfigParser()
+-	config.read(join(dirname(__file__), "config.txt"))
++	config.read(join("/etc/qc-pipeline", "config.txt"))
+ 	kraken_db = ""
+ 	if "DEFAULT" in config:
+ 		if "kraken_db" in config["DEFAULT"].keys():
diff --git a/debian/patches/python3_explicit.patch b/debian/patches/python3_explicit.patch
new file mode 100644
index 0000000..9c85c5c
--- /dev/null
+++ b/debian/patches/python3_explicit.patch
@@ -0,0 +1,12 @@
+Author: Andreas Tille <TilleA at rki.de>
+Last-Update: Wed, 16 Mar 2016 11:01:55 +0100
+Description: seems dh-python needs proper first line
+
+--- a/runQCPipeline.py
++++ b/runQCPipeline.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python3.4
++#!/usr/bin/python3
+ # -*- coding: utf-8 -*-
+ __author__ = 'LieuV'
+ __version__ = "1.1.2"
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..dc8fde8
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,4 @@
+python3_explicit.patch
+set_absolute_path_to_tex_template.patch
+adapt_config.patch
+config_in_etc.patch
diff --git a/debian/patches/set_absolute_path_to_tex_template.patch b/debian/patches/set_absolute_path_to_tex_template.patch
new file mode 100644
index 0000000..0fd6a35
--- /dev/null
+++ b/debian/patches/set_absolute_path_to_tex_template.patch
@@ -0,0 +1,23 @@
+Author: Andreas Tille <TilleA at rki.de>
+Last-Update: Wed, 16 Mar 2016 11:01:55 +0100
+Description: Inside the Debian package we know exactly the location of the
+ tex template - make sure it will be found reliably
+
+--- a/runQCPipeline.py
++++ b/runQCPipeline.py
+@@ -154,10 +154,11 @@ def writeReport(sample, argMap):
+ 	report_name = os.path.join(sample.mainResultsPath,
+ 		 "summary_" + sample.name + "_" + datetime.datetime.strftime(datetime.datetime.now(), "%d-%m-%y_%H-%M"))
+ 	print("Writing latex " ,report_name)
+-	env = Environment()
+-	env.loader = FileSystemLoader(os.path.dirname(__file__))
+-
+-	template = env.get_template("report.tex")
++	template_dir = '/usr/share/qc-pipeline'
++ 	template_file = 'report.tex'
++	loader = FileSystemLoader(template_dir)
++	env = Environment(loader=loader)
++	template = env.get_template(template_file)
+ 	pdf_latex = template.render(sample=sample, pipeline=Pipeline(), trim_param = sample.readSets[0].trimRes.print_param(argMap["minlen"], argMap["trimOption"], argMap["palindrome"]))
+ 
+ 	latex = open(report_name + ".tex", "w")
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..8b0c283
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,17 @@
+#!/usr/bin/make -f
+
+# DH_VERBOSE := 1
+
+%:
+	dh $@ --with python3 # --buildsystem=pybuild
+
+override_dh_compress:
+	dh_compress --exclude=.pdf
+
+override_dh_fixperms:
+	dh_fixperms
+	# main script should be executable
+	chmod a+x debian/*/usr/share/*/runQCPipeline.py
+
+#get-orig-source:
+#	. debian/get-orig-source
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..576121b
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,3 @@
+version=4
+opts=filenamemangle=s/.*\.tar\.gz\?ref=v?(\d\S*)/QCumber-$1\.tar\.gz/g \
+  https://gitlab.com/RKIBioinformaticsPipelines/QCumber/tags .*archive\.tar\.gz\?ref=v?(\d\S*)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/qcumber.git



More information about the debian-med-commit mailing list