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