Author: bob.dybian-guest
Date: 2015-01-10 22:48:16 +0000 (Sat, 10 Jan 2015)
New Revision: 18562

Added:
   trunk/packages/plink/trunk/debian/output_tests/
   trunk/packages/plink/trunk/debian/output_tests/README
   trunk/packages/plink/trunk/debian/output_tests/expected.plink.assoc
   trunk/packages/plink/trunk/debian/output_tests/expected.plink.frq
   trunk/packages/plink/trunk/debian/tests/
   trunk/packages/plink/trunk/debian/tests/control
   trunk/packages/plink/trunk/debian/tests/run-sample-analysis
Modified:
   trunk/packages/plink/trunk/debian/changelog
   trunk/packages/plink/trunk/debian/control
   trunk/packages/plink/trunk/debian/examples
Log:
Add autopkgtest

Modified: trunk/packages/plink/trunk/debian/changelog
===================================================================
--- trunk/packages/plink/trunk/debian/changelog 2015-01-10 22:36:51 UTC (rev 
18561)
+++ trunk/packages/plink/trunk/debian/changelog 2015-01-10 22:48:16 UTC (rev 
18562)
@@ -7,6 +7,7 @@
 
   [ Dylan Aïssi ]
   * debian/control: Bump Policy to 3.9.6 (no changes needed)
+  * Add autopkgtest
 
  -- Dylan Aïssi <[email protected]>  Sat, 10 Jan 2015 23:30:46 +0100
 

Modified: trunk/packages/plink/trunk/debian/control
===================================================================
--- trunk/packages/plink/trunk/debian/control   2015-01-10 22:36:51 UTC (rev 
18561)
+++ trunk/packages/plink/trunk/debian/control   2015-01-10 22:48:16 UTC (rev 
18562)
@@ -7,6 +7,7 @@
  Charles Plessy <[email protected]>,
  Dylan Aïssi <[email protected]>
 Build-Depends: debhelper (>= 9), zlib1g-dev
+Testsuite: autopkgtest
 Standards-Version: 3.9.6
 Vcs-Browser: http://svn.debian.org/wsvn/debian-med/trunk/packages/plink/trunk/
 Vcs-Svn: svn://svn.debian.org/debian-med/trunk/packages/plink/trunk/

Modified: trunk/packages/plink/trunk/debian/examples
===================================================================
--- trunk/packages/plink/trunk/debian/examples  2015-01-10 22:36:51 UTC (rev 
18561)
+++ trunk/packages/plink/trunk/debian/examples  2015-01-10 22:48:16 UTC (rev 
18562)
@@ -1,2 +1,6 @@
+# Upstream samples files
 test.ped
 test.map
+
+# Expected outputs for autopkgtest
+debian/output_tests

Added: trunk/packages/plink/trunk/debian/output_tests/README
===================================================================
--- trunk/packages/plink/trunk/debian/output_tests/README                       
        (rev 0)
+++ trunk/packages/plink/trunk/debian/output_tests/README       2015-01-10 
22:48:16 UTC (rev 18562)
@@ -0,0 +1,11 @@
+# Output files (i.e. expected.plink.assoc and expected.plink.frq) were 
generated following:
+
+wget http://pngu.mgh.harvard.edu/~purcell/plink/dist/plink-1.07-x86_64.zip
+unzip plink-1.07-x86_64.zip
+cd plink-1.07-x86_64
+
+./plink --noweb --file test --freq
+mv plink.freq expected.plink.freq
+
+./plink --noweb --file test --assoc
+mv plink.assoc expected.plink.assoc

Added: trunk/packages/plink/trunk/debian/output_tests/expected.plink.assoc
===================================================================
--- trunk/packages/plink/trunk/debian/output_tests/expected.plink.assoc         
                (rev 0)
+++ trunk/packages/plink/trunk/debian/output_tests/expected.plink.assoc 
2015-01-10 22:48:16 UTC (rev 18562)
@@ -0,0 +1,3 @@
+ CHR  SNP         BP   A1      F_A      F_U   A2        CHISQ            P     
      OR 
+   1 snp1          1    A   0.1667      0.5    C          1.5       0.2207     
     0.2 
+   1 snp2          2    G   0.1667   0.6667    T        3.086      0.07898     
     0.1 

Added: trunk/packages/plink/trunk/debian/output_tests/expected.plink.frq
===================================================================
--- trunk/packages/plink/trunk/debian/output_tests/expected.plink.frq           
                (rev 0)
+++ trunk/packages/plink/trunk/debian/output_tests/expected.plink.frq   
2015-01-10 22:48:16 UTC (rev 18562)
@@ -0,0 +1,3 @@
+ CHR  SNP   A1   A2          MAF  NCHROBS
+   1 snp1    A    C       0.3333       12
+   1 snp2    G    T       0.4167       12

Added: trunk/packages/plink/trunk/debian/tests/control
===================================================================
--- trunk/packages/plink/trunk/debian/tests/control                             
(rev 0)
+++ trunk/packages/plink/trunk/debian/tests/control     2015-01-10 22:48:16 UTC 
(rev 18562)
@@ -0,0 +1,2 @@
+Tests: run-sample-analysis
+Depends: @

Added: trunk/packages/plink/trunk/debian/tests/run-sample-analysis
===================================================================
--- trunk/packages/plink/trunk/debian/tests/run-sample-analysis                 
        (rev 0)
+++ trunk/packages/plink/trunk/debian/tests/run-sample-analysis 2015-01-10 
22:48:16 UTC (rev 18562)
@@ -0,0 +1,23 @@
+#!/bin/sh -e
+# http://dep.debian.net/deps/dep8/
+# Autopkgtest: Test if plink run analysis correctly
+# Author: Dylan Aïssi <[email protected]>
+# Last-Update: 2015-01-10
+
+pkg=plink
+if [ "$ADTTMP" = "" ] ; then
+  ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+fi
+cd $ADTTMP
+cp -a /usr/share/doc/${pkg}/examples/output_tests/* $ADTTMP
+
+# Allele frequencies
+plink --noweb --file test --freq
+diff plink.frq expected.plink.frq
+
+# Case/control or QTL association
+plink --noweb --file test --assoc
+diff plink.assoc expected.plink.assoc
+
+rm -f $ADTTMP/*
+


_______________________________________________
debian-med-commit mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to