3
|
1 #!/bin/sh
|
|
2
|
|
3 # Recovering special parameters from crac.xml
|
|
4 ###############################################################
|
|
5 CRAC_BINARY=crac
|
|
6 INDEX_INPUT="$1"
|
|
7
|
|
8 # Getting the indexed genome value
|
|
9 ###############################################################
|
|
10 # Getting the indexed Genome name without the extension
|
|
11 if [ -d "$INDEX_INPUT" ]; then # If $INDEX_INPUT is a directory (that is to say an index from the history)
|
|
12 cpt=0
|
|
13 for fichier in $INDEX_INPUT/*.ssa
|
|
14 do
|
|
15 if [ $((++cpt)) -gt 1 ]; then #More than 1 '.ssa' file is not expected
|
|
16 echo "Warning:Multiple indexes found [$INDEX]" >&2
|
|
17 fi
|
|
18 INDEX=${fichier%%.ssa} #Getting the index from history
|
|
19 done
|
|
20 else
|
|
21 INDEX="$INDEX_INPUT" #Getting the prebuilt index
|
|
22 fi
|
|
23 if [ ! -f "$INDEX.ssa" -a ! -f "$INDEX.conf" ]; then #Both '.ssa' and '.conf' files are required
|
|
24 echo "Error:Index not found [$INDEX]" >&2
|
|
25 exit 1
|
|
26 fi
|
|
27
|
|
28 # Execution of the command line (Submiting job to the cluster)
|
|
29 ###############################################################
|
|
30 shift 2 #Avoiding index_input and output_name.extra_files_path
|
|
31
|
|
32 CRAC_CMD_LINE=""$CRAC_BINARY" -i "$INDEX" "$@""
|
|
33
|
|
34 out=`$CRAC_CMD_LINE`
|
|
35
|
|
36 exit 0
|
|
37
|