Debian Codegraph @

subsketch.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 Jan 7, 2020
7
8 Description: Shrinks sketches to a smaller fixed length.
9
10 Please read bbmap/docs/guides/BBSketchGuide.txt for more information.
11
12 Usage: subsketch.sh in=file.sketch out=sub.sketch size=1000 autosize=f
13 Bulk usage: subsketch.sh in=big#.sketch out=small#.sketch sizemult=0.5
14
15 Standard parameters:
16 in=<file> Input sketch file containing one or more sketches.
17 out=<file> Output sketch file.
18 size=10000 Size of sketches to generate, if autosize=f.
19 autosize=t Autosize sketches based on genome size.
20 sizemult=1 Adjust default sketch autosize by this factor.
21 blacklist= Apply a blacklist to the sketch before resizing.
22 files=31 If the output filename contains a # symbol,
23 spread the output across this many files, replacing
24 the # with a number.
25
26 Java Parameters:
27 -Xmx This will set Java's memory usage, overriding autodetection.
28 -Xmx20g will specify 20 gigs of RAM, and -Xmx200m will specify 200 megs.
29 The max is typically 85% of physical memory.
30 -eoom This flag will cause the process to exit if an out-of-memory
31 exception occurs. Requires Java 8u92+.
32 -da Disable assertions.
33
34 For more detailed information, please read /bbmap/docs/guides/BBSketchGuide.txt.
35 Please contact Brian Bushnell at [email protected] if you encounter any problems.
36 "
37 }
38
39 #This block allows symlinked shellscripts to correctly set classpath.
40 pushd . > /dev/nullscip-shell filesystem . . `/dev/null`.
41 DIR="${BASH_SOURCE[0]}"
42 while [scip-shell system . . `[`. -h "$DIR" ]; do
43 cd "$(dirnamescip-shell system . . dirname. "$DIR")"
44 DIR="$(readlinkscip-shell system . . readlink. "$(basenamescip-shell system . . basename. "$DIR")")"
45 done
46 cd "$(dirnamescip-shell system . . dirname. "$DIR")"
47 DIR="$(pwdscip-shell system . . pwd.)/"
48 popd > /dev/nullscip-shell filesystem . . `/dev/null`.
49
50 #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
51 CP="$DIR""current/"
52
53 z="-Xmx4g"
54 z2="-Xms4g"
55 set=0
56
57 if [scip-shell system . . `[`. -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then
58 usagescip-shell shell bbmap 39.20+dfsg-3 usage().
59 exit
60 fi
61
62 calcXmxscip-shell shell bbmap 39.20+dfsg-3 calcXmx(). () {
63 source "$DIR""/calcmem.sh"
64 setEnvironment
65 parseXmx "$@"
66 if [[ $set == 1 ]]; then
67 return
68 fi
69 freeRam 3200m 84
70 z="-Xmx${RAM}m"
71 z2="-Xms${RAM}m"
72 }
73 calcXmxscip-shell shell bbmap 39.20+dfsg-3 calcXmx(). "$@"
74
75 sendsketchscip-shell shell bbmap 39.20+dfsg-3 sendsketch().() {
76 local CMD="java $EA $EOOM $z -cp $CP sketch.SubSketch $@"
77 # echo $CMD >&2
78 eval $CMD
79 }
80
81 sendsketchscip-shell shell bbmap 39.20+dfsg-3 sendsketch(). "$@"