Debian Codegraph @

debian/sh-replacement-scripts/run-mummer3

raw
1 #!/bin/sh -e
2 #
3 # for running the basic mummer 3 suite, should use nucmer instead when possible
4 # to avoid the confusing reverse coordinate system of the raw programs.
5 #
6 # NOTE: be warned that all reverse matches will then
7 # be relative to the reverse complement of the query sequence.
8 #
9 # Edit this script as necessary to alter the matching and clustering values
10 #
11
12 usage () {
13 echo "Usage: `basename $0` <fasta reference> <multi-fasta query> <prefix>"
14 return 67 # EX_USAGE
15 }
16
17 if [ $# -ne 3 ] ; then
18 echo "You provided $# arguments."
19 usage
20 fi
21
22 ref="$1"
23 qry="$2"
24 pfx="$3"
25
26 bindir=/usr/bin
27
28 if [ ! -e "$ref" ] ; then
29 echo "File for fasta reference $ref does not exist."
30 usage
31 fi
32
33 if [ ! -e "$qry" ] ; then
34 echo "File for fasta query $qry does not exist."
35 usage
36 fi
37
38 if [ "$pfx" = "" ] ; then
39 usage
40 fi
41
42 echo "Find MUMs"
43 $bindir/mummer -mumreference -b -l 20 "$ref" "$qry" > "$pfx".out
44 echo "Determine gaps"
45 $bindir/mgaps -l 100 -f .12 -s 600 < "$pfx".out > "$pfx".gaps
46 echo "Align gaps"
47 $bindir/combineMUMs -x -e .10 -W "$pfx".errorsgaps "$ref" "$qry" "$pfx".gaps > "$pfx".align