Mercurial > repos > rliterman > csp2
comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/opt/bbmap-39.01-1/taxtree.sh @ 69:33d812a61356
planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author | jpayne |
---|---|
date | Tue, 18 Mar 2025 17:55:14 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
67:0e9998148a16 | 69:33d812a61356 |
---|---|
1 #!/bin/bash | |
2 | |
3 usage(){ | |
4 echo " | |
5 Written by Brian Bushnell. | |
6 Last modified Jan 7, 2020 | |
7 | |
8 Description: Creates tree.taxtree from names.dmp and nodes.dmp. | |
9 These are in taxdmp.zip available at ftp://ftp.ncbi.nih.gov/pub/taxonomy/ | |
10 The taxtree file is needed for programs that can deal with taxonomy, | |
11 like Seal and SortByTaxa. | |
12 | |
13 Usage: taxtree.sh names.dmp nodes.dmp merged.dmp tree.taxtree.gz | |
14 | |
15 Java Parameters: | |
16 -Xmx This will set Java's memory usage, overriding autodetection. | |
17 -Xmx20g will specify 20 gigs of RAM. The max is typically 85% of physical memory. | |
18 -eoom This flag will cause the process to exit if an out-of-memory | |
19 exception occurs. Requires Java 8u92+. | |
20 -da Disable assertions. | |
21 | |
22 Please contact Brian Bushnell at bbushnell@lbl.gov if you encounter any problems. | |
23 " | |
24 } | |
25 | |
26 #This block allows symlinked shellscripts to correctly set classpath. | |
27 pushd . > /dev/null | |
28 DIR="${BASH_SOURCE[0]}" | |
29 while [ -h "$DIR" ]; do | |
30 cd "$(dirname "$DIR")" | |
31 DIR="$(readlink "$(basename "$DIR")")" | |
32 done | |
33 cd "$(dirname "$DIR")" | |
34 DIR="$(pwd)/" | |
35 popd > /dev/null | |
36 | |
37 #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/" | |
38 CP="$DIR""current/" | |
39 JNI="-Djava.library.path=""$DIR""jni/" | |
40 JNI="" | |
41 | |
42 z="-Xmx2g" | |
43 z2="-Xms2g" | |
44 set=0 | |
45 | |
46 if [ -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then | |
47 usage | |
48 exit | |
49 fi | |
50 | |
51 calcXmx () { | |
52 source "$DIR""/calcmem.sh" | |
53 setEnvironment | |
54 parseXmx "$@" | |
55 if [[ $set == 1 ]]; then | |
56 return | |
57 fi | |
58 freeRam 2000m 84 | |
59 z="-Xmx${RAM}m" | |
60 z2="-Xms${RAM}m" | |
61 } | |
62 calcXmx "$@" | |
63 | |
64 | |
65 taxtree() { | |
66 local CMD="java $EA $EOOM $z $z2 -cp $CP tax.TaxTree $@" | |
67 echo $CMD >&2 | |
68 eval $CMD | |
69 } | |
70 | |
71 taxtree "$@" |