| 1 | #!/bin/bash |
| 2 | |
| 3 | usage(){ |
| 4 | echo " |
| 5 | Written by Brian Bushnell |
| 6 | Last modified February 17, 2015 |
| 7 | |
| 8 | Description: Grades correctness of merging synthetic reads with headers |
| 9 | generated by RandomReads and re-headered by RenameReads. |
| 10 | |
| 11 | Usage: grademerge.sh in=<file> |
| 12 | |
| 13 | Parameters: |
| 14 | in=<file> Specify the input file, or 'stdin'. |
| 15 | |
| 16 | Please contact Brian Bushnell at [email protected] if you encounter any problems. |
| 17 | " |
| 18 | } |
| 19 | |
| 20 | #This block allows symlinked shellscripts to correctly set classpath. |
| 21 | pushd . > /dev/null |
| 22 | DIR="${BASH_SOURCE[0]}" |
| 23 | while [ -h "$DIR" ]; do |
| 24 | cd "$(dirname "$DIR")" |
| 25 | DIR="$(readlink "$(basename "$DIR")")" |
| 26 | done |
| 27 | cd "$(dirname "$DIR")" |
| 28 | DIR="$(pwd)/" |
| 29 | popd > /dev/null |
| 30 | |
| 31 | #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/" |
| 32 | CP="$DIR""current/" |
| 33 | set=0 |
| 34 | |
| 35 | if [ -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then |
| 36 | usage |
| 37 | exit |
| 38 | fi |
| 39 | |
| 40 | function grademerge() { |
| 41 | local CMD="java $EA $EOOM -Xmx200m -cp $CP jgi.GradeMergedReads $@" |
| 42 | # echo $CMD >&2 |
| 43 | eval $CMD |
| 44 | } |
| 45 | |
| 46 | grademerge "$@" |