| Last change
 on this file since 14159 was             13399, checked in by Daniela Dorner, 14 years ago | 
        
          | added (scripts and setup for MC processing) | 
        
          | 
              
Property                 svn:executable
 set to                 * | 
        
          | File size:
            1.7 KB | 
      
      
| Line |  | 
|---|
| 1 | #!/bin/bash | 
|---|
| 2 | # | 
|---|
| 3 | # This script is launching star for mc sequences. | 
|---|
| 4 | # | 
|---|
| 5 |  | 
|---|
| 6 | source `dirname $0`/../Sourcefile.sh | 
|---|
| 7 | printprocesslog "INFO starting $0" | 
|---|
| 8 | program=star | 
|---|
| 9 | step=Star | 
|---|
| 10 |  | 
|---|
| 11 | set -C | 
|---|
| 12 |  | 
|---|
| 13 | # get sequence # | 
|---|
| 14 | numchanged=0 | 
|---|
| 15 | while (( 0 < 21 )) | 
|---|
| 16 | do | 
|---|
| 17 | if ! [ $numchanged -eq 1 ] | 
|---|
| 18 | then | 
|---|
| 19 | if ! [ "$sequence" = "" ] && ! [ "$cereskey" = "" ] | 
|---|
| 20 | then | 
|---|
| 21 | printprocesslog "INFO $program for sequence $sequence cereskey $cereskey is already running => request new number " | 
|---|
| 22 | fi | 
|---|
| 23 | gettodo "1" | 
|---|
| 24 | sequence=${primaries[0]} | 
|---|
| 25 | cereskey=${primaries[1]} | 
|---|
| 26 | if [ "$sequence" = "" ] || [ "$cereskey" = "" ] | 
|---|
| 27 | then | 
|---|
| 28 | printprocesslog "INFO nothing to do for $program " | 
|---|
| 29 | fi | 
|---|
| 30 | else | 
|---|
| 31 | printprocesslog "INFO starting $program for sequence $sequence cereskey $cereskey" | 
|---|
| 32 | break | 
|---|
| 33 | fi | 
|---|
| 34 | setstatus "start" | 
|---|
| 35 | done | 
|---|
| 36 |  | 
|---|
| 37 | cd $mars | 
|---|
| 38 |  | 
|---|
| 39 | # run calibration for sequence | 
|---|
| 40 |  | 
|---|
| 41 | # define files and paths | 
|---|
| 42 | sequfile="$mcsequpath/`printf %08d $sequence | cut -c 1-4`/sequence`printf %08d $sequence`.txt" | 
|---|
| 43 | outpath=$mcpath/$program/`printf %03d $cereskey`/`printf %08d $sequence | cut -c 1-4`/`printf %08d $sequence | cut -c 5-8` | 
|---|
| 44 | makedir $outpath | 
|---|
| 45 | log=$outpath/$program`printf %08d $sequence` | 
|---|
| 46 | inpath=$mcpath/callisto/`printf %03d $cereskey`/`printf %08d $sequence | cut -c 1-4`/`printf %08d $sequence | cut -c 5-8` | 
|---|
| 47 |  | 
|---|
| 48 | command="./star -b -q -v4 -f --ind=$inpath --out=$outpath --log=$log.log --html=$log.html $sequfile" | 
|---|
| 49 | printprocesslog "INFO executing "$command | 
|---|
| 50 | $command | 
|---|
| 51 | check1=$? | 
|---|
| 52 |  | 
|---|
| 53 | case $check1 in | 
|---|
| 54 | 0)  printprocesslog "INFO $program finished successfully for sequence $sequence cereskey $cereskey (return code $check1)" | 
|---|
| 55 | ;; | 
|---|
| 56 | *)  printprocesslog "ERROR $program failed for sequence $sequence cereskey $cereskey (return code $check1)" | 
|---|
| 57 | check=$check1 | 
|---|
| 58 | ;; | 
|---|
| 59 | esac | 
|---|
| 60 |  | 
|---|
| 61 | setstatus "stop" | 
|---|
| 62 |  | 
|---|
| 63 | finish | 
|---|
| 64 |  | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.