|
Last change
on this file was
11626,
checked in by westram, 12 years ago
|
- reintegrates 'fix' into 'trunk'
- adds:
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
-
Property svn:keywords set to
Author Date Id Revision
|
|
File size:
1.7 KB
|
| Line | |
|---|
| 1 | #!/bin/bash -x |
|---|
| 2 | |
|---|
| 3 | if [ -z "$7" ]; then |
|---|
| 4 | echo "Usage: arb_dnapars bootstrap searchdepth viewreport randomize transversion_pars threshold_pars interactive" |
|---|
| 5 | else |
|---|
| 6 | BOOTSTRAP=$1 |
|---|
| 7 | SEARCH=$2 |
|---|
| 8 | REPORT=$3 |
|---|
| 9 | RANDOMIZE=$4 |
|---|
| 10 | TRANSVERSION_PARS=$5 |
|---|
| 11 | THRESHOLD_PARS=$6 |
|---|
| 12 | INTERACTIVE=$7 |
|---|
| 13 | |
|---|
| 14 | FLAGS= |
|---|
| 15 | |
|---|
| 16 | if [ "$RANDOMIZE" = "1" ]; then |
|---|
| 17 | RANDOMSEED=$(($RANDOM|1)) # a odd number |
|---|
| 18 | FLAGS="$FLAGS j $RANDOMSEED 1" |
|---|
| 19 | fi |
|---|
| 20 | |
|---|
| 21 | if [ "$TRANSVERSION_PARS" = "1" ]; then |
|---|
| 22 | FLAGS="$FLAGS n" |
|---|
| 23 | fi |
|---|
| 24 | |
|---|
| 25 | if [ \! "$THRESHOLD_PARS" = "0" ]; then |
|---|
| 26 | FLAGS="$FLAGS t $THRESHOLD_PARS" |
|---|
| 27 | fi |
|---|
| 28 | |
|---|
| 29 | case $SEARCH in |
|---|
| 30 | 0) FLAGS="$FLAGS" ;; |
|---|
| 31 | 1) FLAGS="$FLAGS s n" ;; |
|---|
| 32 | 2) FLAGS="$FLAGS s y" ;; |
|---|
| 33 | *) arb_message "Illegal value for 'searchdepth'"; exit 1 ;; |
|---|
| 34 | esac |
|---|
| 35 | |
|---|
| 36 | if [ "$BOOTSTRAP" = "0" ]; then |
|---|
| 37 | if [ "$INTERACTIVE" = "0" ]; then |
|---|
| 38 | arb_echo $FLAGS y | dnapars |
|---|
| 39 | else |
|---|
| 40 | (arb_echo $FLAGS; cat -) | ( dnapars ; echo "Press RETURN to continue.." ) |
|---|
| 41 | fi |
|---|
| 42 | echo '' >arb_read_tree_args |
|---|
| 43 | arb_message "Please note: Branchlengths generated by DNAPARS have strange scaling (somehow relative to sequence length?)\n" |
|---|
| 44 | WHAT=dnapars |
|---|
| 45 | else |
|---|
| 46 | arb_bootstrap $BOOTSTRAP dnapars $FLAGS |
|---|
| 47 | WHAT=arb_bootstrap/dnapars/consense |
|---|
| 48 | fi |
|---|
| 49 | |
|---|
| 50 | if [ -f outfile ]; then |
|---|
| 51 | if [ -s outfile ]; then |
|---|
| 52 | if [ "$REPORT" = "1" ]; then |
|---|
| 53 | arb_textedit outfile & |
|---|
| 54 | fi |
|---|
| 55 | else |
|---|
| 56 | arb_message "$WHAT: Error: generated 'outfile' is empty" |
|---|
| 57 | false |
|---|
| 58 | fi |
|---|
| 59 | else |
|---|
| 60 | arb_message "$WHAT: Error: 'outfile' has not been generated" |
|---|
| 61 | false |
|---|
| 62 | fi |
|---|
| 63 | fi |
|---|
Note: See
TracBrowser
for help on using the repository browser.