comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/opt/bbmap-39.01-1/summarizecrossblock.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 June 10, 2016
7
8 Description: Summarizes CrossBlock results.
9 Used for testing and validating CrossBlock.
10
11 Usage: summarizecrossblock.sh in=<input file> out=<output file>
12
13 Standard parameters:
14 in=<file> A text file of files, or a comma-delimited list of files.
15 Each is a path to results.txt output from Crossblock.
16 out=<file> Output file for the summary.
17 overwrite=f (ow) Set to false to force the program to abort rather than
18 overwrite an existing file.
19
20 Processing parameters:
21 None yet!
22
23 Java Parameters:
24 -Xmx This will set Java's memory usage, overriding autodetection.
25 -Xmx20g will specify 20 gigs of RAM, and -Xmx200m will specify 200 megs.
26 The max is typically 85% of physical memory.
27 -eoom This flag will cause the process to exit if an out-of-memory
28 exception occurs. Requires Java 8u92+.
29 -da Disable assertions.
30
31 Please contact Brian Bushnell at bbushnell@lbl.gov if you encounter any problems.
32 "
33 }
34
35 #This block allows symlinked shellscripts to correctly set classpath.
36 pushd . > /dev/null
37 DIR="${BASH_SOURCE[0]}"
38 while [ -h "$DIR" ]; do
39 cd "$(dirname "$DIR")"
40 DIR="$(readlink "$(basename "$DIR")")"
41 done
42 cd "$(dirname "$DIR")"
43 DIR="$(pwd)/"
44 popd > /dev/null
45
46 #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
47 CP="$DIR""current/"
48
49 z="-Xmx200m"
50 set=0
51
52 if [ -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then
53 usage
54 exit
55 fi
56
57 calcXmx () {
58 source "$DIR""/calcmem.sh"
59 setEnvironment
60 parseXmx "$@"
61 }
62 calcXmx "$@"
63
64 summarizecrossblock() {
65 local CMD="java $EA $EOOM $z -cp $CP driver.SummarizeCrossblock $@"
66 echo $CMD >&2
67 eval $CMD
68 }
69
70 summarizecrossblock "$@"