Mercurial > repos > rliterman > csp2
comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/opt/bbmap-39.01-1/explodetree.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 December 13, 2017 | |
7 | |
8 Description: Constructs a directory and file tree of sequences | |
9 corresponding to a taxonomic tree. | |
10 | |
11 Usage: explodetree.sh in=<file> out=<path> tree=<file> | |
12 | |
13 Parameters: | |
14 in= A fasta file annotated with taxonomic data in headers, | |
15 such as modified RefSeq. | |
16 out= (path) Location to write the tree. | |
17 tree= Location of taxtree file. | |
18 | |
19 Java Parameters: | |
20 -Xmx This will set Java's memory usage, overriding autodetection. | |
21 -Xmx20g will specify 20 gigs of RAM, and -Xmx200m will specify 200 megs. | |
22 The max is typically 85% of physical memory. | |
23 -eoom This flag will cause the process to exit if an out-of-memory | |
24 exception occurs. Requires Java 8u92+. | |
25 -da Disable assertions. | |
26 | |
27 Please contact Brian Bushnell at bbushnell@lbl.gov if you encounter any problems. | |
28 " | |
29 } | |
30 | |
31 #This block allows symlinked shellscripts to correctly set classpath. | |
32 pushd . > /dev/null | |
33 DIR="${BASH_SOURCE[0]}" | |
34 while [ -h "$DIR" ]; do | |
35 cd "$(dirname "$DIR")" | |
36 DIR="$(readlink "$(basename "$DIR")")" | |
37 done | |
38 cd "$(dirname "$DIR")" | |
39 DIR="$(pwd)/" | |
40 popd > /dev/null | |
41 | |
42 #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/" | |
43 CP="$DIR""current/" | |
44 | |
45 z="-Xmx2000m" | |
46 set=0 | |
47 | |
48 if [ -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then | |
49 usage | |
50 exit | |
51 fi | |
52 | |
53 calcXmx () { | |
54 source "$DIR""/calcmem.sh" | |
55 setEnvironment | |
56 parseXmx "$@" | |
57 } | |
58 calcXmx "$@" | |
59 | |
60 function explodetree() { | |
61 local CMD="java $EA $EOOM $z -cp $CP tax.ExplodeTree $@" | |
62 echo $CMD >&2 | |
63 eval $CMD | |
64 } | |
65 | |
66 explodetree "$@" |