Shruti Sridhar pushed to branch master at Debian Med / ea-utils
Commits: 4e7f198a by Shruti Sridhar at 2021-08-04T17:36:12+05:30 Add test data - - - - - 1b0c9fb5 by Shruti Sridhar at 2021-08-04T17:36:51+05:30 Add get-test-data script - - - - - 1332ed8e by Shruti Sridhar at 2021-08-04T17:37:35+05:30 Add autopkgtests - - - - - bad9f826 by Shruti Sridhar at 2021-08-04T17:37:58+05:30 Install docs - - - - - 10 changed files: - + debian/README.test - debian/copyright - + debian/docs - + debian/examples - + debian/source/include-binaries - + debian/tests/control - + debian/tests/data/adapters.fa - + debian/tests/data/data.fastq.gz - + debian/tests/get-test-data - + debian/tests/run-unit-test Changes: ===================================== debian/README.test ===================================== @@ -0,0 +1,15 @@ +Notes on how this package can be tested. +──────────────────────────────────────── + +This package can be tested by running the provided test: + + sh run-unit-test + +in order to confirm its integrity. +──────────────────────────────────────── +Files: debian/tests/data/* +Source: https://trace.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?exp=SRX11266476&cmd=search&m=downloads&s=seq + +First 100 lines of the fastq file have been taken for the test and the file adapter.fa was written for testing this package. + + ===================================== debian/copyright ===================================== @@ -14,6 +14,10 @@ Copyright: © 2011 Erik Aronesty <[email protected]> 2010 Illumina, Inc License: MIT +Files: debian/tests/data/* +Copyright: NCBI +License: PD + Files: razf.c Copyright: 2008, Jue Ruan <[email protected]>, Heng Li <[email protected]> License: BSD-2-clause @@ -78,3 +82,24 @@ License: MIT LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +License: PD + PUBLIC DOMAIN NOTICE + National Center for Biotechnology Information + . + This software/database is a "United States Government Work" under the + terms of the United States Copyright Act. It was written as part of + the author's official duties as a United States Government employee and + thus cannot be copyrighted. This software/database is freely available + to the public for use. The National Library of Medicine and the U.S. + Government have not placed any restriction on its use or reproduction. + . + Although all reasonable efforts have been taken to ensure the accuracy + and reliability of the software and data, the NLM and the U.S. + Government do not and cannot warrant the performance or results that + may be obtained by using this software or data. The NLM and the U.S. + Government disclaim all warranties, express or implied, including + warranties of performance, merchantability or fitness for any particular + purpose. + . + Please cite the author in any work or product based on this material. ===================================== debian/docs ===================================== @@ -0,0 +1,3 @@ +debian/README* +debian/tests/run-unit-test +debian/tests/get-test-data ===================================== debian/examples ===================================== @@ -0,0 +1 @@ +debian/tests/data/* \ No newline at end of file ===================================== debian/source/include-binaries ===================================== @@ -0,0 +1 @@ +debian/tests/data/data.fastq.gz \ No newline at end of file ===================================== debian/tests/control ===================================== @@ -0,0 +1,3 @@ +Tests: run-unit-test +Depends: @ +Restrictions: allow-stderr ===================================== debian/tests/data/adapters.fa ===================================== @@ -0,0 +1,2 @@ +>adapters +ATGCTACGCATCGACTACGAC \ No newline at end of file ===================================== debian/tests/data/data.fastq.gz ===================================== Binary files /dev/null and b/debian/tests/data/data.fastq.gz differ ===================================== debian/tests/get-test-data ===================================== @@ -0,0 +1,26 @@ +#!/bin/bash + +#Needs fastq-dump from the SRA toolkit to directly get the 100 raw fastq reads + +fastq-dump -X 100 -Z SRR14953521 | head -n100 > data.fastq + +mkdir -p data + +if [ -f data/data.fastq.gz ] +then +gunzip data/data.fastq.gz +diff -u data.fastq data/data.fastq + +if [ `echo $?` -ne 0 ] +then + echo "The data has changed, injecting new data, please check manually before upload" +else + echo "The data is same, no changes needed" +fi +fi + +gzip data.fastq +rm data/data.fastq +mv data.fastq.gz data/data.fastq.gz + +echo "Done" ===================================== debian/tests/run-unit-test ===================================== @@ -0,0 +1,20 @@ +#!/bin/bash +set -e + +pkg=ea-utils + +export LC_ALL=C.UTF-8 +if [ "${AUTOPKGTEST_TMP}" = "" ] ; then + AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX) + trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM +fi + +cp -a /usr/share/doc/${pkg}/examples/* "${AUTOPKGTEST_TMP}" + +cd "${AUTOPKGTEST_TMP}" + + +fastq-mcf adapters.fa data.fastq.gz > output +fastq-stats data.fastq.gz > statistics +[ -s "output" ] && [ -s "statistics" ] || exit 1 && echo "PASS tests" + View it on GitLab: https://salsa.debian.org/med-team/ea-utils/-/compare/6d0022757c1489c8eeb0f40e0d08188b1f462cb7...bad9f826a1f76e0112fe9512c1d4c876e2874528 -- View it on GitLab: https://salsa.debian.org/med-team/ea-utils/-/compare/6d0022757c1489c8eeb0f40e0d08188b1f462cb7...bad9f826a1f76e0112fe9512c1d4c876e2874528 You're receiving this email because of your account on salsa.debian.org.
_______________________________________________ debian-med-commit mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-commit
