[med-svn] [Git][med-team/sra-sdk][master] Add autopkgtest

Liubov Chuprikova gitlab at salsa.debian.org
Fri Jun 29 17:34:15 BST 2018


Liubov Chuprikova pushed to branch master at Debian Med / sra-sdk


Commits:
1f22e06e by Liubov Chuprikova at 2018-06-29T18:13:59+02:00
Add autopkgtest

- - - - -


8 changed files:

- + debian/README.test
- debian/changelog
- debian/copyright
- debian/docs
- + debian/source/include-binaries
- + debian/tests/control
- + debian/tests/run-unit-test
- + debian/tests/test-data/test-data.tar.gz


Changes:

=====================================
debian/README.test
=====================================
--- /dev/null
+++ b/debian/README.test
@@ -0,0 +1,8 @@
+Notes on how this package can be tested.
+________________________________________
+
+This package can be tested by execution
+
+	sh run-unit-test
+
+in order to confirm its integrity.


=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,15 @@
 sra-sdk (2.9.0+dfsg-1) UNRELEASED; urgency=medium
 
+  [ Andreas Tille ]
   * New upstream version
   * debhelper 11
   * New Build-Depends: libvdb-sqlite-dev, versioned Build-Depends
     libncbi-vdb-dev (>= 2.9.0)
   * Exclude strangely failing test align-cache (needs investigation)
 
+  [ Liubov Chuprikova ]
+  * Add autopkgtest
+
  -- Andreas Tille <tille at debian.org>  Sat, 24 Mar 2018 07:41:44 +0100
 
 sra-sdk (2.8.2-5+dfsg-1) unstable; urgency=medium


=====================================
debian/copyright
=====================================
--- a/debian/copyright
+++ b/debian/copyright
@@ -49,3 +49,19 @@ License: LGPL-3+
  .
  On Debian systems you can find the full text of the GNU Lesser General
  Public License at /usr/share/common-licenses/LGPL-3.
+
+Files: debian/tests/test-data/test-data.tar.gz
+Copyright: 1996-2018 NCBI
+License: unrestricted
+ Databases of molecular data on the NCBI Web site include such examples as
+ nucleotide sequences (GenBank), protein sequences, macromolecular
+ structures, molecular variation, gene expression, and mapping data. They
+ are designed to provide and encourage access within the scientific
+ community to sources of current and comprehensive information. Therefore,
+ NCBI itself places no restrictions on the use or distribution of the data
+ contained therein. Nor do we accept data when the submitter has requested
+ restrictions on reuse or redistribution.
+Comment:
+ The test data files contained in the archive are a data set prepared from
+ original SRAs with accession numbers SRR6650398, SRR2042184 and SRR7032226.
+


=====================================
debian/docs
=====================================
--- a/debian/docs
+++ b/debian/docs
@@ -1 +1,4 @@
 README*
+debian/tests/test-data/*
+debian/tests/run-unit-test
+debian/README.test


=====================================
debian/source/include-binaries
=====================================
--- /dev/null
+++ b/debian/source/include-binaries
@@ -0,0 +1 @@
+debian/tests/test-data/test-data.tar.gz


=====================================
debian/tests/control
=====================================
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @
+Restrictions: allow-stderr


=====================================
debian/tests/run-unit-test
=====================================
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,118 @@
+#!/bin/sh -e
+
+pkg="sra-toolkit"
+
+if [ "$AUTOPKGTEST_TMP" = "" ]; then
+    AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
+    trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
+fi
+cd $AUTOPKGTEST_TMP
+
+cp -a /usr/share/doc/${pkg}/test-data.tar.gz .
+echo ">>>>>Decompressing test-data archive..."
+tar -xzvf *.tar.gz; rm *.tar.gz
+
+echo ">>>>>Running test-sra..."
+test-sra > /dev/null
+
+echo ">>>>>Running vdb-config..."
+export VDB_CONFIG=$AUTOPKGTEST_TMP
+export NCBI_SETTINGS=$AUTOPKGTEST_TMP/meta/u.mkfg
+vdb-config --set repository/user/main/public/root=$AUTOPKGTEST_TMP/public
+vdb-config --set repository/user/protected/dbGaP-0/root=$AUTOPKGTEST_TMP/dbGaP-0
+vdb-config --set repository/user/protected/dbGaP-0/encryption-key-path=$AUTOPKGTEST_TMP/meta/dbGaP-0.enc_key
+
+echo ">>>>>Running cache-mgr..."
+cache-mgr --report
+
+echo ">>>>>Running srapath..."
+ls454=$(srapath SRR2042184)
+illumina=$(srapath SRR6650398)
+solid=$(srapath SRR7032226)
+echo $ls454
+echo $illumina
+echo $solid
+
+echo ">>>>>Running prefetch..."
+prefetch $ls454
+prefetch $illumina
+prefetch $solid
+
+echo ">>>>>Running fastq-dump..."
+fastq-dump -F --split-files SRR2042184
+fastq-dump -F --split-files SRR6650398
+echo ">>>>>Running latf-load..."
+latf-load -p LS454 --quality PHRED_33 -o SRR2042184 SRR2042184_1.fastq
+echo ">>>>>Running kar..."
+kar -c SRR2042184.sra -d SRR2042184
+[ -s SRR2042184.sra ]
+echo ">>>>>Running fastq-load..."
+fastq-load -r meta/SRR6650398_fastq_run.xml -e meta/SRR6650398_experiment.xml -o SRR6650398
+rm -r SRR2042184 SRR6650398 SRR2042184.sra SRR2042184_1.fastq SRR6650398_1.fastq
+
+echo ">>>>>Running abi-dump..."
+abi-dump -F SRR7032226
+# make sequence descriptor to look like from SOLiD
+sed 's/>1/>1_11_1111_F3/' SRR7032226_F3.csfasta > SRR7032226_F3e.csfasta
+sed 's/>1/>1_11_1111_F3/' SRR7032226_F3_QV.qual > SRR7032226_F3_QVe.qual
+echo ">>>>>Running abi-load..."
+abi-load -r meta/SRR7032226_run.xml -e meta/SRR7032226_experiment.xml -o SRR7032226
+rm -r SRR7032226 SRR7032226_F3*
+
+echo ">>>>>Running sam-dump..."
+sam-dump --output-file SRR6650398.sam SRR6650398
+echo ">>>>>Running bam-load..."
+bam-load --ref-file meta/reference.fna -o SRR6650398 meta/SRR6650398.bam
+rm -r SRR6650398 SRR6650398.sam
+
+echo ">>>>>Running illumina-dump..."
+illumina-dump --qseq 1 SRR6650398
+echo ">>>>>Running illumina-load..."
+illumina-load -r meta/SRR6650398_illumina_run.xml -e meta/SRR6650398_experiment.xml -o SRR6650398
+rm -r SRR6650398 SRR6650398_0_0001_qseq.txt
+
+echo ">>>>>Running sff-dump..."
+sff-dump SRR2042184
+echo ">>>>>Running sff-load..."
+sff-load -r meta/SRR2042184_run.xml -e meta/SRR2042184_experiment.xml -o SRR2042184
+
+echo ">>>>>Running vdb-dump..."
+vdb-dump -f tab -C READ SRR2042184 | awk '{print ">" "SRR2042184." NR "\n" $0}' > SRR2042184.fasta
+
+echo ">>>>>Running sra-pileup..."
+sra-pileup --function mismatch --minmismatch 10 -o stat.txt.gz --gzip SRR6650398
+
+echo ">>>>>Running vdb-encrypt..."
+cd dbGaP-0   # change directory to the project’s workplace
+vdb-encrypt ../SRR2042184.fasta ./
+echo ">>>>>Running vdb-decrypt..."
+vdb-decrypt SRR2042184.fasta.ncbi_enc
+cd ../
+
+echo ">>>>>Running vdb-validate..."
+vdb-validate SRR2042184
+
+echo ">>>>>Running vdb-copy..."
+vdb-copy SRR2042184 meta/SRR2042184
+
+echo ">>>>>Running vdb-lock..."
+vdb-lock meta/SRR2042184
+echo ">>>>>Running vdb-unlock..."
+vdb-unlock meta/SRR2042184
+
+echo ">>>>>Running rcexplain..."
+rcexplain 3
+
+echo ">>>>>Running kdbmeta..."
+kdbmeta SRR2042184 > /dev/null
+
+# Tools that would also be nice to test:
+# copycat
+# sra-sort ?
+# srf-load ?
+# helicos-load ?
+# cg-load
+# pacbio-load
+# fasterq-dump (will appear in r.2.9.1)
+
+echo ""; echo "Status: All tests PASSED!"; echo ""


=====================================
debian/tests/test-data/test-data.tar.gz
=====================================
Binary files /dev/null and b/debian/tests/test-data/test-data.tar.gz differ



View it on GitLab: https://salsa.debian.org/med-team/sra-sdk/commit/1f22e06e0e3717d600c013c23fed40bebfba29df

-- 
View it on GitLab: https://salsa.debian.org/med-team/sra-sdk/commit/1f22e06e0e3717d600c013c23fed40bebfba29df
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/20180629/15d0c782/attachment-0001.html>


More information about the debian-med-commit mailing list