-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathalignerbenchmark.sh
More file actions
executable file
·80 lines (67 loc) · 2.33 KB
/
Copy pathalignerbenchmark.sh
File metadata and controls
executable file
·80 lines (67 loc) · 2.33 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/bash
usage(){
echo "
Written by Ady
Last modified July 2, 2026
Description: Compares alignment accuracy of multiple IDAligner
implementations and the 4SA (MSA11ts) against ground-truth synthetic
reads generated by randomreads.sh. Parses SYN headers for true
coordinates, extracts padded reference windows, aligns each read
with each specified aligner, and reports results as TSV.
If reads were generated with addcigar=t, compares aligner match
strings against truth CIGARs and prints summary statistics.
Usage: alignerbenchmark.sh ref=<fasta> in=<fastq>
Parameters:
ref=<file> Reference FASTA (can be gzipped).
in=<file> FASTQ of synthetic reads with SYN headers.
pad=20 Padding on each side of the truth window.
aligners=ScrabbleAligner,ScrabbleAffine,MSA11ts
Comma-separated list of aligners to compare.
Available: ScrabbleAligner, ScrabbleAffine, MSA11ts,
Glocal+5, Glocal+4, Glocal+3, Glocal+2, Glocal+,
Glocal, GlocalInt, GlocalConcise, Scrabble2.
trace=t Enable match-string generation for ScrabbleAffine.
parsecigar=t Compare aligner output against truth CIGARs in headers.
Example:
randomreads.sh ref=phix.fa out=reads.fq reads=1000 len=150 \\
snprate=0.5 maxsnps=3 insrate=0.5 maxins=1 mindellen=5 \\
maxdellen=20 delrate=0.5 maxdels=1 addcigar=t seed=-1 adderrors=f
alignerbenchmark.sh ref=phix.fa in=reads.fq \\
aligners=ScrabbleAligner,ScrabbleAffine
Please contact Brian Bushnell at bbushnell@lbl.gov if you encounter
any problems.
For documentation and the latest version, visit: https://bbmap.org
"
}
if [ -z "$1" ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
usage
exit
fi
resolveSymlinks(){
SCRIPT="$(cd "$(dirname "$0")" && pwd)/$(basename "$0")"
while [ -h "$SCRIPT" ]; do
DIR="$(dirname "$SCRIPT")"
SCRIPT="$(readlink "$SCRIPT")"
[ "${SCRIPT#/}" = "$SCRIPT" ] && SCRIPT="$DIR/$SCRIPT"
done
DIR="$(cd "$(dirname "$SCRIPT")" && pwd)"
if [ -f "$DIR/bbtools.jar" ]; then
CP="$DIR/bbtools.jar"
else
CP="$DIR/current/"
fi
}
setEnv(){
. "$DIR/javasetup.sh"
. "$DIR/memdetect.sh"
parseJavaArgs "--xmx=1g" "--xms=1g" "--mode=fixed" "$@"
setEnvironment
}
launch() {
CMD="java $EA $EOOM $SIMD $XMX $XMS -cp $CP idaligner.AlignerBenchmark $@"
echo "$CMD" >&2
eval $CMD
}
resolveSymlinks
setEnv "$@"
launch "$@"