|
while getopts ":hi:o:-:" opt; do |
|
case ${opt} in |
|
h ) |
|
usage |
|
echo "Exiting..." |
|
exit 1 |
|
;; |
|
o ) |
|
outdir=$OPTARG |
|
;; |
|
i ) |
|
input_file=$OPTARG |
|
;; |
|
- ) |
|
LONG_OPTARG="${OPTARG#*\s}" |
|
case ${OPTARG} in |
|
in ) |
|
eval "input_file=\"\$$OPTIND\"" |
|
if [ -z "input_file" ]; then |
|
die "Input file required for argument --in" |
|
fi |
|
if [ ! -f "input_file" ]; then |
|
die "Input file $input_file does not exist." |
|
fi |
|
shift |
|
;; |
|
out ) |
|
eval "outdir=\"\$$OPTIND\"" |
|
if [ -z "outdir" ]; then |
|
die "Output directory required for argument --out" |
|
fi |
|
if [ ! -f "input_file" ]; then |
|
die "Input file $input_file does not exist." |
|
fi |
|
shift |
|
;; |
|
assay_max ) |
|
eval "assay_max=\"\$$OPTIND\"" |
|
if [ -z "assay_max" ]; then |
|
die "Integer required for argument assay_max" |
|
fi |
|
shift |
|
;; |
|
min_product_length ) |
|
eval "min_product_length=\"\$$OPTIND\"" |
|
if [ -z "min_product_length" ]; then |
|
die "Integer required for argument min_product_length" |
|
fi |
|
shift |
|
;; |
|
max_product_length ) |
|
eval "max_product_length=\"\$$OPTIND\"" |
|
if [ -z "max_product_length" ]; then |
|
die "Integer required for argument max_product_length" |
|
fi |
|
shift |
|
;; |
|
min_oligo_length ) |
|
eval "min_oligo_length=\"\$$OPTIND\"" |
|
if [ -z "min_oligo_length" ]; then |
|
die "Integer required for argument min_oligo_length" |
|
fi |
|
shift |
|
;; |
|
max_oligo_length ) |
|
eval "max_oligo_length=\"\$$OPTIND\"" |
|
if [ -z "max_oligo_length" ]; then |
|
die "Integer required for argument max_oligo_length" |
|
fi |
|
shift |
|
;; |
|
help ) |
|
usage |
|
exit 1 |
|
;; |
|
* ) |
|
die "Invalid option: $LONG_OPTARG" |
|
;; |
|
|
|
esac |
|
;; |
|
\? ) |
|
die "Invalid option: $OPTARG" |
|
;; |
|
esac |
|
done |
MetaFunPrimer/src/mfpdesign
Lines 124 to 209 in d692c9e
The following EcoFunPrimer arguments need to be added to mfpdesign (arguments to use indicated in parentheses):