root/galaxy-central/tools/unix_tools/sed_wrapper.sh

リビジョン 3, 0.7 KB (コミッタ: kohda, 14 年 前)

Install Unix tools  http://hannonlab.cshl.edu/galaxy_unix_tools/galaxy.html

行番号 
1#!/bin/sh
2
3##
4## Galaxy wrapper for SED command
5##
6
7##
8## command line arguments:
9##   input_file
10##   output_file
11##   sed-program
12##   [other parameters passed on to sed]
13
14INPUT="$1"
15OUTPUT="$2"
16PROG="$3"
17
18shift 3
19
20if [ -z "$PROG" ]; then
21        echo usage: $0 INPUTFILE OUTPUTFILE SED-PROGRAM [other sed patameters] >&2
22        exit 1
23fi
24
25if [ ! -r "$INPUT" ]; then
26        echo "error: input file ($INPUT) not found!" >&2
27        exit 1
28fi
29
30# Messages printed to STDOUT will be displayed in the "INFO" field in the galaxy dataset.
31# This way the user can tell what was the command
32echo "sed" "$@" "$PROG"
33
34sed -r --sandbox "$@" "$PROG" "$INPUT" > "$OUTPUT"
35if (( $? ));  then exit; fi
36
37exit 0
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。