comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/opt/bbmap-39.01-1/alltoall.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 February 5, 2020
7
8 Description: Aligns all to all to produce an identity matrix.
9
10 Usage: alltoall.sh in=<input file> out=<output file>
11
12 Input may be fasta or fastq, compressed or uncompressed.
13
14 Standard parameters:
15 in=<file> Input sequences.
16 out=<file> Output data.
17 t= Set the number of threads; default is logical processors.
18 overwrite=f (ow) Set to false to force the program to abort rather than
19 overwrite an existing file.
20 showspeed=t (ss) Set to 'f' to suppress display of processing speed.
21 ziplevel=2 (zl) Set to 1 (lowest) through 9 (max) to change compression
22 level; lower compression is faster.
23 reads=-1 If positive, quit after this many sequences.
24
25 Java Parameters:
26 -Xmx This will set Java's memory usage, overriding autodetection.
27 -Xmx20g will specify 20 gigs of RAM, and -Xmx200m will
28 specify 200 megs. The max is typically 85% of physical memory.
29 -eoom This flag will cause the process to exit if an out-of-memory
30 exception occurs. Requires Java 8u92+.
31 -da Disable assertions.
32
33 Please contact Brian Bushnell at bbushnell@lbl.gov if you encounter any problems.
34 "
35 }
36
37 #This block allows symlinked shellscripts to correctly set classpath.
38 pushd . > /dev/null
39 DIR="${BASH_SOURCE[0]}"
40 while [ -h "$DIR" ]; do
41 cd "$(dirname "$DIR")"
42 DIR="$(readlink "$(basename "$DIR")")"
43 done
44 cd "$(dirname "$DIR")"
45 DIR="$(pwd)/"
46 popd > /dev/null
47
48 #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
49 CP="$DIR""current/"
50
51 z="-Xmx4g"
52 z2="-Xms4g"
53 set=0
54
55 if [ -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then
56 usage
57 exit
58 fi
59
60 calcXmx () {
61 source "$DIR""/calcmem.sh"
62 setEnvironment
63 parseXmx "$@"
64 if [[ $set == 1 ]]; then
65 return
66 fi
67 freeRam 4000m 84
68 z="-Xmx${RAM}m"
69 z2="-Xms${RAM}m"
70 }
71 calcXmx "$@"
72
73 alltoall() {
74 local CMD="java $EA $EOOM $z -cp $CP aligner.AllToAll $@"
75 echo $CMD >&2
76 eval $CMD
77 }
78
79 alltoall "$@"