root/galaxy-central/tools/plotting/r_wrapper.sh

リビジョン 2, 0.6 KB (コミッタ: hatakeyama, 14 年 前)

import galaxy-central

  • 属性 svn:executable の設定値 *
行番号 
1#!/bin/sh
2
3### Run R providing the R script in $1 as standard input and passing
4### the remaining arguments on the command line
5
6# Function that writes a message to stderr and exits
7function fail
8{
9    echo "$@" >&2
10    exit 1
11}
12
13# Ensure R executable is found
14which R > /dev/null || fail "'R' is required by this tool but was not found on path"
15
16# Extract first argument
17infile=$1; shift
18
19# Ensure the file exists
20test -f $infile || fail "R input file '$infile' does not exist"
21
22# Invoke R passing file named by first argument to stdin
23R --vanilla --slave $* < $infile
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。