| 1 | #!/bin/bash |
| 2 | |
| 3 | usage(){ |
| 4 | echo " |
| 5 | Written by Brian Bushnell |
| 6 | Last modified August 14, 2019 |
| 7 | |
| 8 | Description: Generates a GFF3 from a GBFF. |
| 9 | Only for features I care about though. |
| 10 | |
| 11 | Usage: gbff2gff.sh <gbff file> <gff file> |
| 12 | " |
| 13 | } |
| 14 | |
| 15 | #This block allows symlinked shellscripts to correctly set classpath. |
| 16 | pushd . > /dev/null |
| 17 | DIR="${BASH_SOURCE[0]}" |
| 18 | while [ -h "$DIR" ]; do |
| 19 | cd "$(dirname "$DIR")" |
| 20 | DIR="$(readlink "$(basename "$DIR")")" |
| 21 | done |
| 22 | cd "$(dirname "$DIR")" |
| 23 | DIR="$(pwd)/" |
| 24 | popd > /dev/null |
| 25 | |
| 26 | #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/" |
| 27 | CP="$DIR""current/" |
| 28 | |
| 29 | z="-Xmx1g" |
| 30 | set=0 |
| 31 | |
| 32 | if [ -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then |
| 33 | usage |
| 34 | exit |
| 35 | fi |
| 36 | |
| 37 | calcXmx () { |
| 38 | source "$DIR""/calcmem.sh" |
| 39 | setEnvironment |
| 40 | parseXmx "$@" |
| 41 | } |
| 42 | calcXmx "$@" |
| 43 | |
| 44 | gff() { |
| 45 | local CMD="java $EA $EOOM $z -cp $CP gff.GbffFile $@" |
| 46 | echo $CMD >&2 |
| 47 | eval $CMD |
| 48 | } |
| 49 | |
| 50 | gff "$@" |