Debian Codegraph @

loadreads.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2
3 usagescip-shell shell bbmap 39.20+dfsg-3 usage().(){
4 echoscip-shell system . . echo. "
5 Written by Brian Bushnell
6 Last modified July 10, 2017
7
8 Description: Tests the memory usage of a sequence file.
9
10 Usage: loadreads.sh in=<file>
11
12 Parameters:
13 in= Input file.
14 lowcomplexity=f Assume input library is low-complexity.
15
16 Java Parameters:
17 -Xmx This will set Java's memory usage, overriding autodetection.
18 -Xmx20g will specify
19 20 gigs of RAM, and -Xmx200m will specify 200 megs. The max
20 is typically 85% of physical memory.
21 -eoom This flag will cause the process to exit if an out-of-memory
22 exception occurs. Requires Java 8u92+.
23 -da Disable assertions.
24
25 Please contact Brian Bushnell at [email protected] if you encounter any problems.
26 "
27 }
28
29 #This block allows symlinked shellscripts to correctly set classpath.
30 pushd . > /dev/nullscip-shell filesystem . . `/dev/null`.
31 DIR="${BASH_SOURCE[0]}"
32 while [scip-shell system . . `[`. -h "$DIR" ]; do
33 cd "$(dirnamescip-shell system . . dirname. "$DIR")"
34 DIR="$(readlinkscip-shell system . . readlink. "$(basenamescip-shell system . . basename. "$DIR")")"
35 done
36 cd "$(dirnamescip-shell system . . dirname. "$DIR")"
37 DIR="$(pwdscip-shell system . . pwd.)/"
38 popd > /dev/nullscip-shell filesystem . . `/dev/null`.
39
40 #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
41 CP="$DIR""current/"
42
43 z="-Xmx2g"
44 z2="-Xms2g"
45 set=0
46
47 if [scip-shell system . . `[`. -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then
48 usagescip-shell shell bbmap 39.20+dfsg-3 usage().
49 exit
50 fi
51
52 calcXmxscip-shell shell bbmap 39.20+dfsg-3 calcXmx(). () {
53 source "$DIR""/calcmem.sh"
54 setEnvironment
55 parseXmx "$@"
56 if [[ $set == 1 ]]; then
57 return
58 fi
59 freeRam 2000m 84
60 z="-Xmx${RAM}m"
61 z2="-Xms${RAM}m"
62 }
63 calcXmxscip-shell shell bbmap 39.20+dfsg-3 calcXmx(). "$@"
64
65 testmemscip-shell shell bbmap 39.20+dfsg-3 testmem().() {
66 local CMD="java $EA $EOOM $z $z2 -cp $CP driver.LoadReads $@"
67 echoscip-shell system . . echo. $CMD >&2
68 eval $CMD
69 }
70
71 testmemscip-shell shell bbmap 39.20+dfsg-3 testmem(). "$@"