[med-svn] [rna-star] 03/04: add tests

Sascha Steinbiss sascha at steinbiss.name
Tue May 24 09:44:45 UTC 2016


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

sascha-guest pushed a commit to branch master
in repository rna-star.

commit 3a229520835de20cdf271df0440c900a7492b7c4
Author: Sascha Steinbiss <sascha at steinbiss.name>
Date:   Tue May 24 09:24:57 2016 +0000

    add tests
---
 debian/changelog               |   2 +-
 debian/control                 |   1 +
 debian/rules                   |   3 +++
 debian/source/include-binaries |   2 ++
 debian/tests/README.test       |   4 ++++
 debian/tests/control           |   3 +++
 debian/tests/foo.fa.gz         | Bin 0 -> 31735 bytes
 debian/tests/foo.gtf           |  48 +++++++++++++++++++++++++++++++++++++++++
 debian/tests/reads.fastq.gz    | Bin 0 -> 334086 bytes
 debian/tests/run_test.sh       |  20 +++++++++++++++++
 10 files changed, 82 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index a422263..0c6b340 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,8 @@
 rna-star (2.5.2a+dfsg-3) unstable; urgency=medium
 
   * Limit architectures to amd64 as supported by upstream.
-    - Closes: #824997
   * Add myself to Uploaders.
+  * Add tests (autopkgtest and build time)
 
  -- Sascha Steinbiss <sascha at steinbiss.name>  Sun, 22 May 2016 12:34:12 +0000
 
diff --git a/debian/control b/debian/control
index 3668a3a..1b0ecd5 100644
--- a/debian/control
+++ b/debian/control
@@ -10,6 +10,7 @@ Build-Depends: debhelper (>= 9),
                vim-common,
                zlib1g-dev
 Standards-Version: 3.9.8
+Testsuite: autopkgtest
 Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/rna-star.git
 Vcs-Git: https://anonscm.debian.org/git/debian-med/rna-star.git
 Homepage: https://github.com/alexdobin/STAR/
diff --git a/debian/rules b/debian/rules
index 1e0da99..556fe37 100755
--- a/debian/rules
+++ b/debian/rules
@@ -23,3 +23,6 @@ override_dh_auto_clean:
 
 override_dh_compress:
 	dh_compress --exclude=.pdf
+
+override_dh_auto_test:
+	debian/tests/run_test.sh $(CURDIR)/source/STAR
diff --git a/debian/source/include-binaries b/debian/source/include-binaries
new file mode 100644
index 0000000..9093cff
--- /dev/null
+++ b/debian/source/include-binaries
@@ -0,0 +1,2 @@
+debian/tests/foo.fa.gz
+debian/tests/reads.fastq.gz
diff --git a/debian/tests/README.test b/debian/tests/README.test
new file mode 100644
index 0000000..2013a35
--- /dev/null
+++ b/debian/tests/README.test
@@ -0,0 +1,4 @@
+The sequence in this directory has been randomly generated for testing purposes only using GenomeTools.
+Reads have been simulated using Flux Simulator 1.2.1 (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3488205/).
+
+Sascha Steinbiss <sascha at steinbiss.name> 24/5/2016
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..5aa538c
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Test-Command: debian/tests/run_test.sh STAR
+Depends: @
+
diff --git a/debian/tests/foo.fa.gz b/debian/tests/foo.fa.gz
new file mode 100644
index 0000000..51c96ff
Binary files /dev/null and b/debian/tests/foo.fa.gz differ
diff --git a/debian/tests/foo.gtf b/debian/tests/foo.gtf
new file mode 100644
index 0000000..27c04e7
--- /dev/null
+++ b/debian/tests/foo.gtf
@@ -0,0 +1,48 @@
+foo	example	start_codon	335	337	0.000000	+	.	gene_id "FOO069W"; transcript_id "FOO069W"; 
+foo	example	CDS	335	646	0.000000	+	0	gene_id "FOO069W"; transcript_id "FOO069W"; 
+foo	example	exon	335	649	0.000000	+	.	gene_id "FOO069W"; transcript_id "FOO069W"; 
+foo	example	stop_codon	647	649	0.000000	+	.	gene_id "FOO069W"; transcript_id "FOO069W"; 
+foo	example	start_codon	538	540	0.000000	+	.	gene_id "FOO068W-A"; transcript_id "FOO068W-A"; 
+foo	example	CDS	538	789	0.000000	+	0	gene_id "FOO068W-A"; transcript_id "FOO068W-A"; 
+foo	example	exon	538	792	0.000000	+	.	gene_id "FOO068W-A"; transcript_id "FOO068W-A"; 
+foo	example	stop_codon	790	792	0.000000	+	.	gene_id "FOO068W-A"; transcript_id "FOO068W-A"; 
+foo	example	start_codon	2480	2482	0.000000	+	.	gene_id "FOO067W-A"; transcript_id "FOO067W-A"; 
+foo	example	CDS	2480	2704	0.000000	+	0	gene_id "FOO067W-A"; transcript_id "FOO067W-A"; 
+foo	example	exon	2480	2707	0.000000	+	.	gene_id "FOO067W-A"; transcript_id "FOO067W-A"; 
+foo	example	stop_codon	2705	2707	0.000000	+	.	gene_id "FOO067W-A"; transcript_id "FOO067W-A"; 
+foo	example	start_codon	10092	10094	0.000000	+	.	gene_id "FOO066W"; transcript_id "FOO066W"; 
+foo	example	CDS	10092	10397	0.000000	+	0	gene_id "FOO066W"; transcript_id "FOO066W"; 
+foo	example	exon	10092	10400	0.000000	+	.	gene_id "FOO066W"; transcript_id "FOO066W"; 
+foo	example	stop_codon	10398	10400	0.000000	+	.	gene_id "FOO066W"; transcript_id "FOO066W"; 
+foo	example	start_codon	12047	12049	0.000000	+	.	gene_id "FOO064W-B"; transcript_id "FOO064W-B"; 
+foo	example	CDS	12047	12424	0.000000	+	0	gene_id "FOO064W-B"; transcript_id "FOO064W-B"; 
+foo	example	exon	12047	12427	0.000000	+	.	gene_id "FOO064W-B"; transcript_id "FOO064W-B"; 
+foo	example	stop_codon	12425	12427	0.000000	+	.	gene_id "FOO064W-B"; transcript_id "FOO064W-B"; 
+foo	example	start_codon	21526	21528	0.000000	+	.	gene_id "FOO064W"; transcript_id "FOO064W"; 
+foo	example	CDS	21526	21849	0.000000	+	0	gene_id "FOO064W"; transcript_id "FOO064W"; 
+foo	example	exon	21526	21852	0.000000	+	.	gene_id "FOO064W"; transcript_id "FOO064W"; 
+foo	example	stop_codon	21850	21852	0.000000	+	.	gene_id "FOO064W"; transcript_id "FOO064W"; 
+foo	example	start_codon	31568	31570	0.000000	+	.	gene_id "FOO062W"; transcript_id "FOO062W"; 
+foo	example	CDS	31568	32938	0.000000	+	0	gene_id "FOO062W"; transcript_id "FOO062W"; 
+foo	example	exon	31568	32941	0.000000	+	.	gene_id "FOO062W"; transcript_id "FOO062W"; 
+foo	example	stop_codon	32939	32941	0.000000	+	.	gene_id "FOO062W"; transcript_id "FOO062W"; 
+foo	example	start_codon	33449	33451	0.000000	+	.	gene_id "FOO061W"; transcript_id "FOO061W"; 
+foo	example	CDS	33449	34699	0.000000	+	0	gene_id "FOO061W"; transcript_id "FOO061W"; 
+foo	example	exon	33449	34702	0.000000	+	.	gene_id "FOO061W"; transcript_id "FOO061W"; 
+foo	example	stop_codon	34700	34702	0.000000	+	.	gene_id "FOO061W"; transcript_id "FOO061W"; 
+foo	example	start_codon	35156	35158	0.000000	+	.	gene_id "FOO060W"; transcript_id "FOO060W"; 
+foo	example	CDS	35156	36301	0.000000	+	0	gene_id "FOO060W"; transcript_id "FOO060W"; 
+foo	example	exon	35156	36304	0.000000	+	.	gene_id "FOO060W"; transcript_id "FOO060W"; 
+foo	example	stop_codon	36302	36304	0.000000	+	.	gene_id "FOO060W"; transcript_id "FOO060W"; 
+foo	example	start_codon	36510	36512	0.000000	+	.	gene_id "FOO059W"; transcript_id "FOO059W"; 
+foo	example	CDS	36510	37145	0.000000	+	0	gene_id "FOO059W"; transcript_id "FOO059W"; 
+foo	example	exon	36510	37148	0.000000	+	.	gene_id "FOO059W"; transcript_id "FOO059W"; 
+foo	example	stop_codon	37146	37148	0.000000	+	.	gene_id "FOO059W"; transcript_id "FOO059W"; 
+foo	example	start_codon	37465	37467	0.000000	+	.	gene_id "FOO058W"; transcript_id "FOO058W"; 
+foo	example	CDS	37465	38970	0.000000	+	0	gene_id "FOO058W"; transcript_id "FOO058W"; 
+foo	example	exon	37465	38973	0.000000	+	.	gene_id "FOO058W"; transcript_id "FOO058W"; 
+foo	example	stop_codon	38971	38973	0.000000	+	.	gene_id "FOO058W"; transcript_id "FOO058W"; 
+foo	example	start_codon	39260	39262	0.000000	+	.	gene_id "FOO056W"; transcript_id "FOO056W"; 
+foo	example	CDS	39260	41899	0.000000	+	0	gene_id "FOO056W"; transcript_id "FOO056W"; 
+foo	example	exon	39260	41902	0.000000	+	.	gene_id "FOO056W"; transcript_id "FOO056W"; 
+foo	example	stop_codon	41900	41902	0.000000	+	.	gene_id "FOO056W"; transcript_id "FOO056W"; 
diff --git a/debian/tests/reads.fastq.gz b/debian/tests/reads.fastq.gz
new file mode 100644
index 0000000..5de14ff
Binary files /dev/null and b/debian/tests/reads.fastq.gz differ
diff --git a/debian/tests/run_test.sh b/debian/tests/run_test.sh
new file mode 100755
index 0000000..e57a645
--- /dev/null
+++ b/debian/tests/run_test.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+set -e
+
+ORIGDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+WORKDIR=$(mktemp -d)
+
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+
+zcat $ORIGDIR/foo.fa.gz > foo.fa
+$1 --runThreadN 1 --runMode genomeGenerate \
+  --genomeDir . --genomeSAindexNbases 8 \
+  --genomeFastaFiles foo.fa \
+  --sjdbGTFfile  $ORIGDIR/foo.gtf
+
+zcat $ORIGDIR/reads.fastq.gz > reads.fastq
+$1 --runThreadN 1 --genomeDir . \
+  --readFilesIn reads.fastq
+
+[ -s Aligned.out.sam ]

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



More information about the debian-med-commit mailing list