annotate MUMmer/mummerplot_tool.sh @ 0:59f302448cf6

Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
author abossers
date Tue, 07 Jun 2011 17:22:27 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
1 #!/bin/bash
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
2
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
3 ## simple bash to generate mummerplot of MATCH file
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
4 ##
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
5 ## Galaxy wrapper by Alex Bossers, CVI of Wageningen UR, Lelystad, NL
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
6 ## alex_dot_bossers_at_wur_dot_nl
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
7 ##
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
8 ##
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
9 ## needs a rename of the fixed name to something recognised by galaxy
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
10 ## needs cleanout of temp files
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
11 ##
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
12 ## call is mummerplot $format $in_match $out_file $cmd_extra
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
13 ## $0 $1 $2 $3 $4
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
14 ##
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
15 ## since mummerplot uses some deprecated syntax which can be fixed in the source
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
16 ## we redirect STDERR to dev/null to circumvent errorstatus in galaxy
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
17 ## io redirects 0=stdin 1=stdout 2=stderr to dev/null (or &-)
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
18
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
19 # path to where mummer suite is installed
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
20 # adjust this for your machine
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
21 # this is the only hard coded path in the scripts
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
22 mum_path="/opt/MUMmer/MUMmer"
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
23
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
24 # some default options to generate a LARGE fixed PNG/POSTSCRIPT image and not an interactive one.
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
25
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
26 if [ "$1" = "png" ]; then
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
27 extension="png"
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
28 else
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
29 extension="ps"
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
30 fi
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
31
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
32 eval "$mum_path/mummerplot --large --$1 $2 1>&- 2>&-"
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
33
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
34 if [ -f "out.$extension" ]; then
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
35 #conditional move to something known by galaxy
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
36 mv out.$extension $3
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
37 #remove gnuplot file
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
38 rm out.gp
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
39 fi
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
40
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
41 ## clean up
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
42 rm out.fplot
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
43 rm out.rplot
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
44
59f302448cf6 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
45 #end script