Skip to content
Commits on Source (6)
Notes on how this package can be tested.
────────────────────────────────────────
This package can be tested by running the provided test if you install
the package kleborate-examples and run
sh run-unit-test
in order to confirm its integrity.
kleborate (1.0.0-1) UNRELEASED; urgency=medium
kleborate (1.0.0-1) unstable; urgency=medium
* Initial release (Closes: #<bug>)
* Initial release (Closes: #949030)
-- Andreas Tille <tille@debian.org> Wed, 15 Jan 2020 21:44:54 +0100
-- Andreas Tille <tille@debian.org> Thu, 16 Jan 2020 13:12:17 +0100
......@@ -37,3 +37,23 @@ Description: tool to screen Klebsiella genome assemblies
and colistin resistance truncations
* K (capsule) and O antigen (LPS) serotype prediction, via wzi alleles
and Kaptive
Package: kleborate-examples
Architecture: all
Depends: ${misc:Depends}
Recommends: kleborate
Description: tool to screen Klebsiella genome assemblies (example data)
Kleborate is a tool to screen Klebsiella genome assemblies for:
.
* MLST sequence type
* species (e.g. K. pneumoniae, K. quasipneumoniae, K. variicola, etc.)
* ICEKp associated virulence loci: yersiniabactin (ybt),
colibactin (clb)
* virulence plasmid associated loci: salmochelin (iro), aerobactin
(iuc), hypermucoidy (rmpA, rmpA2)
* antimicrobial resistance genes, including quinolone resistance SNPs
and colistin resistance truncations
* K (capsule) and O antigen (LPS) serotype prediction, via wzi alleles
and Kaptive
.
This package provides example data end tests that are used in autopkgtest.
debian/tests/data usr/share/doc/kleborate/examples
debian/tests/run-unit-test usr/share/doc/kleborate/
README*
debian/README.test
#!/bin/sh
set -e
case "$1" in
configure)
ls -l /usr/lib/python3*/dist-packages/kleborate/data/
find /usr/lib/python3* -name "*.fasta" | grep kleborate
for fasta in /usr/lib/python3/dist-packages/kleborate/data/*.fasta ; do
makeblastdb -dbtype nucl -in "$fasta" > /dev/null
done
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0
#!/bin/sh
set -e
case "$1" in
remove|purge|upgrade|deconfigure)
rm -f /usr/lib/python3/dist-packages/kleborate/data/*.fasta.nin
;;
failed-upgrade)
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0
......@@ -2,3 +2,8 @@
%:
dh $@ --with python3 --buildsystem=pybuild
override_dh_install:
dh_install
# fasta.nin files will be (re)build at package installation time to not contain build path
find debian -name "*.fasta.nin" -delete
Tests: run-unit-test
Depends: @
Restrictions: allow-stderr
Upstream provided a script test.sh which unfortunately does not work:
$ kleborate -p . -o details.txt *.fna
usage: kleborate -a ASSEMBLIES [ASSEMBLIES ...] [-r] [-s] [--kaptive_k]
[--kaptive_o] [-k] [--all] [-o OUTFILE]
[--kaptive_k_outfile KAPTIVE_K_OUTFILE]
[--kaptive_o_outfile KAPTIVE_O_OUTFILE] [-h] [--version]
kleborate: error: the following arguments are required: -a/--assemblies
#!/bin/sh
## Adopted from test.sh script to just obtain the data
#
# NTUH-K2044 (ST23, ybt 2; ICEKp1)
......
#!/bin/bash
set -e
pkg=kleborate
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}"/data
unxz *.xz
kleborate -o results.txt -a *.fna
kleborate --resistance -o resistance_results.txt -a *.fna
kleborate --all -o all_results.txt -a *.fna