Mercurial > repos > pjbriggs > weeder2
comparison weeder2_wrapper.sh @ 2:3c5f10f7dd40 draft
Updated to tool version 2.0.1 (use data table to locate freqfiles).
author | pjbriggs |
---|---|
date | Fri, 27 Nov 2015 11:06:28 -0500 |
parents | 496bc4eff47e |
children | 89315bdc1a8c |
comparison
equal
deleted
inserted
replaced
1:571cb77ab9e7 | 2:3c5f10f7dd40 |
---|---|
1 #!/bin/sh -e | 1 #!/bin/sh -e |
2 # | 2 # |
3 # Wrapper script to run weeder2 as a Galaxy tool | 3 # Wrapper script to run weeder2 as a Galaxy tool |
4 # | 4 # |
5 # Usage: weeder_wrapper.sh FASTA_IN SPECIES_CODE MOTIFS_OUT MATRIX_OUT [ ARGS... ] | 5 # Usage: weeder_wrapper.sh FASTA_IN SPECIES_CODE FREQFILES_DIR MOTIFS_OUT MATRIX_OUT [ ARGS... ] |
6 # | 6 # |
7 # ARGS: one or more arguments to supply directly to weeder2 | 7 # ARGS: one or more arguments to supply directly to weeder2 |
8 # | 8 # |
9 # Process command line | 9 # Process command line |
10 FASTA_IN=$1 | 10 FASTA_IN=$1 |
11 SPECIES_CODE=$2 | 11 SPECIES_CODE=$2 |
12 MOTIFS_OUT=$3 | 12 FREQFILES_DIR=$3 |
13 MATRIX_OUT=$4 | 13 MOTIFS_OUT=$4 |
14 MATRIX_OUT=$5 | |
14 # | 15 # |
15 # Other arguments | 16 # Other arguments |
16 ARGS="" | 17 ARGS="" |
17 while [ ! -z "$5" ] ; do | 18 while [ ! -z "$6" ] ; do |
18 ARGS="$ARGS $5" | 19 ARGS="$ARGS $6" |
19 shift | 20 shift |
20 done | 21 done |
21 # | 22 # |
22 # Link to input file | 23 # Link to input file |
23 ln -s $FASTA_IN | 24 ln -s $FASTA_IN |
24 # | 25 # |
26 # Locate the FreqFiles directory | |
27 if [ $FREQFILES_DIR == "." ] ; then | |
28 # Use the files in the Weeder2 distribution | |
29 freqfiles_dir=$WEEDER_FREQFILES_DIR | |
30 else | |
31 # Alternative location | |
32 freqfiles_dir=$FREQFILES_DIR | |
33 fi | |
34 # | |
25 # Link to the FreqFiles directory as weeder2 executable | 35 # Link to the FreqFiles directory as weeder2 executable |
26 # expects it to be the same directory | 36 # expects it to be the same directory |
27 freqfiles_dir=$WEEDER_FREQFILES_DIR | |
28 if [ -d $freqfiles_dir ] ; then | 37 if [ -d $freqfiles_dir ] ; then |
29 echo "Linking to FreqFiles directory" | 38 echo "Linking to FreqFiles directory: $freqfiles_dir" |
30 ln -s $freqfiles_dir FreqFiles | 39 ln -s $freqfiles_dir FreqFiles |
31 else | 40 else |
32 echo "ERROR FreqFiles directory not found" >&2 | 41 echo "ERROR FreqFiles directory not found" >&2 |
33 exit 1 | 42 exit 1 |
34 fi | 43 fi |