-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsmoke_test.sh
executable file
·29 lines (25 loc) · 941 Bytes
/
smoke_test.sh
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
set -exou pipefail
# compile w/ docker
TAG=lynxoid/nimbliner:0.2
echo "Building fresh docker image"
docker build -q -t $TAG -f docker/Dockerfile .
REF="data/smoke/reference"
# # run a smoke test
mkdir -p data/smoke
echo ">seq1" > data/smoke/ref1.fa
echo "AACCGGTT" >> data/smoke/ref1.fa
echo ">seq2" > data/smoke/ref2.fa
echo "TTAAGGCC" >> data/smoke/ref2.fa
echo /nimbliner/data/smoke/ref1.fa > ${REF}.fofn
echo /nimbliner/data/smoke/ref2.fa >> ${REF}.fofn
# build an index for this tiny reference
CMD="./bin/indexer -i ${REF}.fofn -k 3 -o ${REF}"
# align
docker run -i -v $PWD/data/:/nimbliner/data/ $TAG ${CMD}
echo ">read1" > data/smoke/reads.fa
echo "AACC" >> data/smoke/reads.fa
echo ">read2" >> data/smoke/reads.fa
echo "TTAA" >> data/smoke/reads.fa
CMD="./bin/mapper -i data/smoke/reads.fa -x ${REF} > ${REF}.out"
docker run -i -v $PWD/data/:/nimbliner/data/ $TAG ${CMD}
diff -qiw data/smoke/reference.expected_output ${REF}.out