Debian Codegraph @

gitable.sh

raw symbols SCIP
1 #!/bin/bash
2
3 usage(){
4 echo "
5 Written by Brian Bushnell.
6 Last modified July 29, 2019
7
8 Description: Creates gitable.int1d from accession files:
9 ftp://ftp.ncbi.nih.gov/pub/taxonomy/accession2taxid/*.accession2taxid.gz
10 This is for use of gi numbers, which are deprecated by NCBI, and areneither
11 necessary nor recemmended if accession numbers are present.
12 See TaxonomyGuide and fetchTaxonomy.sh for more information.
13
14 Usage: gitable.sh shrunk.dead_nucl.accession2taxid.gz,shrunk.dead_prot.accession2taxid.gz,shrunk.dead_wgs.accession2taxid.gz,shrunk.nucl_gb.accession2taxid.gz,shrunk.nucl_wgs.accession2taxid.gz,shrunk.pdb.accession2taxid.gz,shrunk.prot.accession2taxid.gz gitable.int1d.gz
15
16 Java Parameters:
17 -Xmx This will set Java's memory usage, overriding autodetection.
18 -Xmx20g will specify 20 gigs of RAM. The max is typically 85% of physical memory.
19 -eoom This flag will cause the process to exit if an out-of-memory
20 exception occurs. Requires Java 8u92+.
21 -da Disable assertions.
22
23 Please contact Brian Bushnell at [email protected] if you encounter any problems.
24 "
25 }
26
27 #This block allows symlinked shellscripts to correctly set classpath.
28 pushd . > /dev/null
29 DIR="${BASH_SOURCE[0]}"
30 while [ -h "$DIR" ]; do
31 cd "$(dirname "$DIR")"
32 DIR="$(readlink "$(basename "$DIR")")"
33 done
34 cd "$(dirname "$DIR")"
35 DIR="$(pwd)/"
36 popd > /dev/null
37
38 #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
39 CP="$DIR""current/"
40 JNI="-Djava.library.path=""$DIR""jni/"
41 JNI=""
42
43 z="-Xmx24g"
44 z2="-Xms24g"
45 set=0
46
47 if [ -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then
48 usage
49 exit
50 fi
51
52 calcXmx () {
53 source "$DIR""/calcmem.sh"
54 setEnvironment
55 parseXmx "$@"
56 if [[ $set == 1 ]]; then
57 return
58 fi
59 freeRam 24000m 84
60 z="-Xmx${RAM}m"
61 z2="-Xms${RAM}m"
62 }
63 calcXmx "$@"
64
65
66 gitable() {
67 local CMD="java $EA $EOOM $z $z2 -cp $CP tax.GiToTaxid $@"
68 echo $CMD >&2
69 eval $CMD
70 }
71
72 gitable "$@"