[med-svn] [Git][med-team/fastqc][master] 4 commits: Update fastqc autopkgtests to compare summary output (Closes: #950311)

Andreas Tille gitlab at salsa.debian.org
Tue Apr 7 07:06:52 BST 2020



Andreas Tille pushed to branch master at Debian Med / fastqc


Commits:
54b4710c by tony mancill at 2020-04-06T15:26:04-07:00
Update fastqc autopkgtests to compare summary output (Closes: #950311)

- - - - -
f68b71eb by tony mancill at 2020-04-06T15:26:54-07:00
interim changelog

- - - - -
939c0d47 by tony mancill at 2020-04-06T15:30:51-07:00
update debian/source/include-binaries after renaming test file

Gbp-Dch: ignore

- - - - -
88efed42 by tony mancill at 2020-04-06T15:56:42-07:00
Exit non-zero after test failure and adjust location of tests_dir

Gbp-Dch: ignore

- - - - -


8 changed files:

- debian/changelog
- debian/source/include-binaries
- debian/tests.fastqc/toy.bam → debian/tests.fastqc/toy_bam.bam
- debian/tests.fastqc/toy.sam → debian/tests.fastqc/toy_sam.sam
- + debian/tests/example_fastqc_expected_summary.txt
- debian/tests/run-unit-test
- + debian/tests/toy_bam_fastqc_expected_summary.txt
- + debian/tests/toy_sam_fastqc_expected_summary.txt


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+fastqc (0.11.9+dfsg-3) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * Update autopkgtests to compare summary output (Closes: #950311)
+
+ -- tony mancill <tmancill at debian.org>  Mon, 06 Apr 2020 15:26:31 -0700
+
 fastqc (0.11.9+dfsg-2) unstable; urgency=medium
 
   * Fix and enhance autopkgtest


=====================================
debian/source/include-binaries
=====================================
@@ -1 +1 @@
-debian/tests.fastqc/toy.bam
+debian/tests.fastqc/toy_bam.bam


=====================================
debian/tests.fastqc/toy.bam → debian/tests.fastqc/toy_bam.bam
=====================================


=====================================
debian/tests.fastqc/toy.sam → debian/tests.fastqc/toy_sam.sam
=====================================


=====================================
debian/tests/example_fastqc_expected_summary.txt
=====================================
@@ -0,0 +1,11 @@
+PASS	Basic Statistics	example.fastq
+WARN	Per base sequence quality	example.fastq
+PASS	Per tile sequence quality	example.fastq
+PASS	Per sequence quality scores	example.fastq
+WARN	Per base sequence content	example.fastq
+WARN	Per sequence GC content	example.fastq
+PASS	Per base N content	example.fastq
+PASS	Sequence Length Distribution	example.fastq
+PASS	Sequence Duplication Levels	example.fastq
+WARN	Overrepresented sequences	example.fastq
+PASS	Adapter Content	example.fastq


=====================================
debian/tests/run-unit-test
=====================================
@@ -2,6 +2,8 @@
 set -e
 
 pkg="fastqc"
+tests_dir="$PWD/debian/tests"
+test_failures=0
 
 if [ "$AUTOPKGTEST_TMP" = "" ] ; then
   AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
@@ -14,26 +16,28 @@ cd $AUTOPKGTEST_TMP
 
 find . -name "*.gz" -exec gunzip \{\} \;
 
-for sample in example.fastq toy.sam toy.bam ; do
-    /usr/bin/fastqc "$sample"
-    if [ "$sample" = "example.fastq" ] ; then
-        result=example_fastqc
-    else
-        result=toy_fastqc
-    fi
-    unzip -q "$result".zip
-    if grep -q FAIL "$result"/summary.txt ; then
+for sample in example.fastq toy_sam.sam toy_bam.bam ; do
+    /usr/bin/fastqc --extract "$sample"
+    result="${sample%%.*}_fastqc"
+    expected="${tests_dir}/${result}_expected_summary.txt"
+    if ! diff -q "${result}/summary.txt" ${expected} 2>/dev/null ; then
+	(( test_failures += 1 ))
         cat <<EOT
-There were some failures logged in summary of
+Summary results did not match contents of ${expected} for
     fastqc "$sample"
 Please investigate!
 EOT
-        grep FAIL "$result"/summary.txt
     else
-        echo "All passing in:  fastqc "$sample" "
+        echo "Summary results match for:  fastqc "$sample" "
     fi
     rm -rf "$result"*
     echo ""
 done
 
-echo "PASS"
+if (( test_failures == 0 )); then
+    echo "PASS"
+    exit 0
+fi
+
+echo "FAIL mismatched fastqc summary count: $test_failures"
+exit 1


=====================================
debian/tests/toy_bam_fastqc_expected_summary.txt
=====================================
@@ -0,0 +1,10 @@
+PASS	Basic Statistics	toy_bam.bam
+PASS	Per base sequence quality	toy_bam.bam
+FAIL	Per sequence quality scores	toy_bam.bam
+FAIL	Per base sequence content	toy_bam.bam
+FAIL	Per sequence GC content	toy_bam.bam
+PASS	Per base N content	toy_bam.bam
+WARN	Sequence Length Distribution	toy_bam.bam
+PASS	Sequence Duplication Levels	toy_bam.bam
+FAIL	Overrepresented sequences	toy_bam.bam
+PASS	Adapter Content	toy_bam.bam


=====================================
debian/tests/toy_sam_fastqc_expected_summary.txt
=====================================
@@ -0,0 +1,10 @@
+PASS	Basic Statistics	toy_sam.sam
+PASS	Per base sequence quality	toy_sam.sam
+FAIL	Per sequence quality scores	toy_sam.sam
+FAIL	Per base sequence content	toy_sam.sam
+FAIL	Per sequence GC content	toy_sam.sam
+PASS	Per base N content	toy_sam.sam
+WARN	Sequence Length Distribution	toy_sam.sam
+PASS	Sequence Duplication Levels	toy_sam.sam
+FAIL	Overrepresented sequences	toy_sam.sam
+PASS	Adapter Content	toy_sam.sam



View it on GitLab: https://salsa.debian.org/med-team/fastqc/-/compare/0afa37784bd5ddd23d57ac77c5d61ba098ed189d...88efed4269c0875f8478d7f9aab136467ce4156b

-- 
View it on GitLab: https://salsa.debian.org/med-team/fastqc/-/compare/0afa37784bd5ddd23d57ac77c5d61ba098ed189d...88efed4269c0875f8478d7f9aab136467ce4156b
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/20200407/1baa1e60/attachment-0001.html>


More information about the debian-med-commit mailing list