File: run-basic-tests

package info (click to toggle)
cutesv 2.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,360 kB
  • sloc: python: 5,192; sh: 102; makefile: 12
file content (47 lines) | stat: -rwxr-xr-x 1,154 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#! /bin/sh
set -e

if ! dpkg --listfiles freebayes > /dev/null 2>&1
then
	cat >&2 <<-END
	error: package freebayes needed: provides test data for cuteSV.
	END
	exit 1
fi

if [ "$AUTOPKGTEST_TMP" = "" ]
then
	AUTOPKGTEST_TMP="$(mktemp -d /tmp/cutesv-test.XXXXXX)"
	trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
fi

cd "$AUTOPKGTEST_TMP"

set -x
cuteSV --version
cuteSV --help
cuteSV \
	/usr/share/doc/freebayes/examples/tiny/NA12878.chr22.tiny.hla.bam \
	/usr/share/doc/freebayes/examples/tiny/hla.fa \
	out1.vcf .
cuteSV -t "$(nproc)" \
	/usr/share/doc/freebayes/examples/tiny/1read.bam \
	/usr/share/doc/freebayes/examples/tiny/hla.fa \
	out2.vcf .
cuteSV --genotype \
	/usr/share/doc/freebayes/examples/tiny/NA12878.chr22.tiny.bam \
	/usr/share/doc/freebayes/examples/tiny/q.fa \
	out3.vcf .
cuteSV -t "$(nproc)" --genotype \
	/usr/share/doc/freebayes/examples/splice/1:883884-887618.bam \
	/usr/share/doc/freebayes/examples/splice/1:883884-887618.fa \
	out4.vcf .

for vcf in out*.vcf
do
	test "$(sed -n '1s/v[0-9.]\+$//p' "$vcf")" = "##fileformat=VCF"
	test "$(sed -n '2s/-[0-9.]\+$//p' "$vcf")" = "##source=cuteSV"
done

set +x
echo PASS