Debian Codegraph @

testformat.sh

raw symbols SCIP
1 #!/bin/bash
2
3 usage(){
4 echo "
5 Written by Brian Bushnell
6 Last modified August 4, 2016
7
8 Description: Tests file extensions and contents to determine format,
9 quality, compression, interleaving, and read length. More than one file
10 may be specified. Note that ASCII-33 (sanger) and ASCII-64
11 (old Illumina/Solexa) cannot always be differentiated.
12
13 Usage: testformat.sh <file>
14
15 See also: testformat2.sh, stats.sh
16
17 Please contact Brian Bushnell at [email protected] if you encounter any problems.
18 "
19 }
20
21 #This block allows symlinked shellscripts to correctly set classpath.
22 pushd . > /dev/null
23 DIR="${BASH_SOURCE[0]}"
24 while [ -h "$DIR" ]; do
25 cd "$(dirname "$DIR")"
26 DIR="$(readlink "$(basename "$DIR")")"
27 done
28 cd "$(dirname "$DIR")"
29 DIR="$(pwd)/"
30 popd > /dev/null
31
32 #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
33 CP="$DIR""current/"
34
35 z="-Xmx120m"
36 set=0
37
38 if [ -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then
39 usage
40 exit
41 fi
42
43 calcXmx () {
44 source "$DIR""/calcmem.sh"
45 setEnvironment
46 parseXmx "$@"
47 }
48 calcXmx "$@"
49
50 testformat() {
51 local CMD="java $EA $EOOM $z -cp $CP fileIO.FileFormat $@"
52 # echo $CMD >&2
53 eval $CMD
54 }
55
56 testformat "$@"