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 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241
|
diff -ubrN MUMmer3.20/scripts.orig/exact-tandems.sh MUMmer3.20/scripts/exact-tandems.sh
--- MUMmer3.20/scripts.orig/exact-tandems.sh 1970-01-01 01:00:00.000000000 +0100
+++ MUMmer3.20/scripts/exact-tandems.sh 2007-11-12 13:12:31.000000000 +0100
@@ -0,0 +1,34 @@
+#!/bin/sh -e
+#
+# Find exact tandem repeats in specified file involving an
+# exact duplicate of at least the specified length
+
+usage () {
+ echo "Usage: `basename $0` <file> <min-match-len>"
+ return 67 # EX_USAGE
+}
+
+if [ $# -ne 2 ] ; then
+ echo "You provided $# arguments instead of 2."
+ usage
+fi
+
+filename="$1"
+matchlen="$2"
+
+bindir=__BIN_DIR
+scriptdir=__SCRIPT_DIR
+
+if [ ! -e "$filename" ] ; then
+ echo "File $filename does not exist."
+ usage
+fi
+
+echo "Finding matches"
+$bindir/repeat-match -t -n $matchlen "$filename" | tail +3 > $$.tmp.matches
+# This is default behavior when shell started with -e
+# if ($status != 0) exit -1
+
+echo "Tandem repeats"
+sort -k1n -k2n $$.tmp.matches | awk -f $scriptdir/tandem-repeat.awk
+rm -f $$.tmp.matches
diff -ubrN MUMmer3.20/scripts.orig/Makefile MUMmer3.20/scripts/Makefile
--- MUMmer3.20/scripts.orig/Makefile 2007-07-13 19:06:57.000000000 +0200
+++ MUMmer3.20/scripts/Makefile 2007-11-12 13:15:01.000000000 +0100
@@ -7,9 +7,18 @@
ifndef AUX_BIN_DIR
AUX_BIN_DIR := $(CURDIR)
endif
+ifndef INSTALL_AUX_BIN_DIR
+INSTALL_AUX_BIN_DIR := $(AUX_BIN_DIR)
+endif
ifndef SCRIPT_DIR
SCRIPT_DIR := $(CURDIR)
endif
+ifndef INSTALL_BIN_DIR
+INSTALL_BIN_DIR := $(BIN_DIR)
+endif
+ifndef INSTALL_SCRIPT_DIR
+INSTAL_SCRIPT_DIR := $(SCRIPT_DIR)
+endif
SCRIPT_DIR := $(CURDIR)
SED := $(filter /%,$(shell /bin/sh -c 'type sed'))
@@ -29,68 +38,24 @@
clean:
rm -f *~
- cd $(BIN_DIR); rm -f $(ALL)
-
-
+ ( cd $(BIN_DIR); rm -f $(ALL) )
+#-- replace variables by real path names --#
-#-- not so PHONY rules --#
-exact-tandems: exact-tandems.csh
- $(SED) -e 's?__CSH_PATH?$(CSH)?g' \
- -e 's?__BIN_DIR?$(BIN_DIR)?g' \
- -e 's?__SCRIPT_DIR?$(SCRIPT_DIR)?g' \
- exact-tandems.csh > $(BIN_DIR)/exact-tandems
- chmod 755 $(BIN_DIR)/exact-tandems
+%:
+ $(SED) -e 's?__AUX_BIN_DIR?$(INSTALL_AUX_BIN_DIR)?g' \
+ -e 's?__BIN_DIR?$(INSTALL_BIN_DIR)?g' \
+ -e 's?__PERL_PATH?$(PERL)?g' \
+ -e 's?__SCRIPT_DIR?$(INSTALL_SCRIPT_DIR)?g' \
+ $< > $(BIN_DIR)/$@
+ chmod 755 $(BIN_DIR)/$@
+exact-tandems: exact-tandems.sh
mapview: mapview.pl
- $(SED) -e 's?__PERL_PATH?$(PERL)?g' \
- -e 's?__SCRIPT_DIR?$(SCRIPT_DIR)?g' \
- mapview.pl > $(BIN_DIR)/mapview
- chmod 755 $(BIN_DIR)/mapview
-
mummerplot: mummerplot.pl Foundation.pm
- $(SED) -e 's?__PERL_PATH?$(PERL)?g' \
- -e 's?__SCRIPT_DIR?$(SCRIPT_DIR)?g' \
- -e 's?__BIN_DIR?$(BIN_DIR)?g' \
- mummerplot.pl > $(BIN_DIR)/mummerplot
- chmod 755 $(BIN_DIR)/mummerplot
-
dnadiff: dnadiff.pl Foundation.pm
- $(SED) -e 's?__PERL_PATH?$(PERL)?g' \
- -e 's?__SCRIPT_DIR?$(SCRIPT_DIR)?g' \
- -e 's?__BIN_DIR?$(BIN_DIR)?g' \
- dnadiff.pl > $(BIN_DIR)/dnadiff
- chmod 755 $(BIN_DIR)/dnadiff
-
nucmer: nucmer.pl Foundation.pm
- $(SED) -e 's?__PERL_PATH?$(PERL)?g' \
- -e 's?__SCRIPT_DIR?$(SCRIPT_DIR)?g' \
- -e 's?__AUX_BIN_DIR?$(AUX_BIN_DIR)?g' \
- -e 's?__BIN_DIR?$(BIN_DIR)?g' \
- nucmer.pl > $(BIN_DIR)/nucmer
- chmod 755 $(BIN_DIR)/nucmer
-
promer: promer.pl Foundation.pm
- $(SED) -e 's?__PERL_PATH?$(PERL)?g' \
- -e 's?__SCRIPT_DIR?$(SCRIPT_DIR)?g' \
- -e 's?__AUX_BIN_DIR?$(AUX_BIN_DIR)?g' \
- -e 's?__BIN_DIR?$(BIN_DIR)?g' \
- promer.pl > $(BIN_DIR)/promer
- chmod 755 $(BIN_DIR)/promer
-
-run-mummer1: run-mummer1.csh
- $(SED) -e 's?__CSH_PATH?$(CSH)?g' \
- -e 's?__BIN_DIR?$(BIN_DIR)?g' \
- run-mummer1.csh > $(BIN_DIR)/run-mummer1
- chmod 755 $(BIN_DIR)/run-mummer1
-
-run-mummer3: run-mummer3.csh
- $(SED) -e 's?__CSH_PATH?$(CSH)?g' \
- -e 's?__BIN_DIR?$(BIN_DIR)?g' \
- run-mummer3.csh > $(BIN_DIR)/run-mummer3
- chmod 755 $(BIN_DIR)/run-mummer3
-
+run-mummer1: run-mummer1.sh
+run-mummer3: run-mummer3.sh
nucmer2xfig: nucmer2xfig.pl
- $(SED) -e 's?__PERL_PATH?$(PERL)?g' \
- nucmer2xfig.pl > $(BIN_DIR)/nucmer2xfig
- chmod 755 $(BIN_DIR)/nucmer2xfig
diff -ubrN MUMmer3.20/scripts.orig/run-mummer1.sh MUMmer3.20/scripts/run-mummer1.sh
--- MUMmer3.20/scripts.orig/run-mummer1.sh 1970-01-01 01:00:00.000000000 +0100
+++ MUMmer3.20/scripts/run-mummer1.sh 2007-11-12 13:12:31.000000000 +0100
@@ -0,0 +1,45 @@
+#!/bin/sh -e
+#
+# **SEVERELY** antiquated script for running the mummer 1 suite
+# -r option reverse complements the query sequence, coordinates of the reverse
+# matches will be relative to the reversed sequence
+#
+
+usage () {
+ echo "Usage: `basename $0` <fasta reference> <fasta query> <prefix> [-r]"
+ return 67 # EX_USAGE
+}
+
+if [ $# -ne 3 -a $# -ne 4 ] ; then
+ echo "You provided $# arguments."
+ usage
+fi
+
+ref="$1"
+qry="$2"
+pfx="$3"
+rev="$4"
+
+bindir=__BIN_DIR
+
+if [ ! -e "$ref" ] ; then
+ echo "File for fasta reference $ref does not exist."
+ usage
+fi
+
+if [ ! -e "$qry" ] ; then
+ echo "File for fasta query $qry does not exist."
+ usage
+fi
+
+if [ "$pfx" = "" ] ; then
+ usage
+fi
+
+echo "Find MUMs"
+$bindir/mummer -mum -l 20 "$rev" "$ref" "$qry" | tail +2 > "$pfx".out
+echo "Determine gaps"
+$bindir/gaps "$ref" "$rev" < "$pfx".out > "$pfx".gaps
+echo "Align gaps"
+$bindir/mummer-annotate "$pfx".gaps "$qry" > "$pfx".align
+mv witherrors.gaps "$pfx".errorsgaps
diff -ubrN MUMmer3.20/scripts.orig/run-mummer3.sh MUMmer3.20/scripts/run-mummer3.sh
--- MUMmer3.20/scripts.orig/run-mummer3.sh 1970-01-01 01:00:00.000000000 +0100
+++ MUMmer3.20/scripts/run-mummer3.sh 2007-11-12 13:12:31.000000000 +0100
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+#
+# for running the basic mummer 3 suite, should use nucmer instead when possible
+# to avoid the confusing reverse coordinate system of the raw programs.
+#
+# NOTE: be warned that all reverse matches will then
+# be relative to the reverse complement of the query sequence.
+#
+# Edit this script as necessary to alter the matching and clustering values
+#
+
+usage () {
+ echo "Usage: `basename $0` <fasta reference> <multi-fasta query> <prefix>"
+ return 67 # EX_USAGE
+}
+
+if [ $# -ne 3 ] ; then
+ echo "You provided $# arguments."
+ usage
+fi
+
+ref="$1"
+qry="$2"
+pfx="$3"
+
+bindir=__BIN_DIR
+
+if [ ! -e "$ref" ] ; then
+ echo "File for fasta reference $ref does not exist."
+ usage
+fi
+
+if [ ! -e "$qry" ] ; then
+ echo "File for fasta query $qry does not exist."
+ usage
+fi
+
+if [ "$pfx" = "" ] ; then
+ usage
+fi
+
+echo "Find MUMs"
+$bindir/mummer -mumreference -b -l 20 "$ref" "$qry" > "$pfx".out
+echo "Determine gaps"
+$bindir/mgaps -l 100 -f .12 -s 600 < "$pfx".out > "$pfx".gaps
+echo "Align gaps"
+$bindir/combineMUMs -x -e .10 -W "$pfx".errorsgaps "$ref" "$qry" "$pfx".gaps > "$pfx".align
|