annotate MUMmer/mummerplot_tool.sh @ 0:6753195df9e0 default tip

Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
author abossers
date Tue, 07 Jun 2011 17:49:58 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6753195df9e0 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
1 #!/bin/bash
6753195df9e0 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
2
6753195df9e0 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
6753195df9e0 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
4 ##
6753195df9e0 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
6753195df9e0 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
6753195df9e0 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
7 ##
6753195df9e0 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
8 ##
6753195df9e0 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
6753195df9e0 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
6753195df9e0 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
11 ##
6753195df9e0 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
6753195df9e0 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
6753195df9e0 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
14 ##
6753195df9e0 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
6753195df9e0 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
6753195df9e0 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 &-)
6753195df9e0 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
18
6753195df9e0 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
6753195df9e0 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
6753195df9e0 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
6753195df9e0 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"
6753195df9e0 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
23
6753195df9e0 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.
6753195df9e0 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
25
6753195df9e0 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
6753195df9e0 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
27 extension="png"
6753195df9e0 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
28 else
6753195df9e0 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
29 extension="ps"
6753195df9e0 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
30 fi
6753195df9e0 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
31
6753195df9e0 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>&-"
6753195df9e0 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
33
6753195df9e0 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
6753195df9e0 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
6753195df9e0 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
6753195df9e0 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
37 #remove gnuplot file
6753195df9e0 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
38 rm out.gp
6753195df9e0 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
39 fi
6753195df9e0 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
40
6753195df9e0 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
41 ## clean up
6753195df9e0 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
42 rm out.fplot
6753195df9e0 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
43 rm out.rplot
6753195df9e0 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
44
6753195df9e0 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
abossers
parents:
diff changeset
45 #end script