Debian Codegraph @

shrinkaccession.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 29, 2019
7
8 Description: Shrinks accession2taxid tables by removing unneeded columns.
9 This is not necessary but makes accession2taxid files smaller and load faster.
10
11 Usage: shrinkaccession.sh in=<file> out=<outfile>
12
13 Parameters:
14 ow=f (overwrite) Overwrites files that already exist.
15 app=f (append) Append to files that already exist.
16 zl=4 (ziplevel) Set compression level, 1 (low) to 9 (max).
17 pigz=t Use pigz for compression, if available.
18 gi=t Retain gi numbers.
19
20 Java Parameters:
21 -Xmx This will set Java's memory usage, overriding autodetection.
22 -Xmx20g will specify 20 gigs of RAM, and -Xmx200m will specify 200 megs.
23 The max is typically 85% of physical memory.
24 -eoom This flag will cause the process to exit if an out-of-memory
25 exception occurs. Requires Java 8u92+.
26 -da Disable assertions.
27
28 Please contact Brian Bushnell at [email protected] if you encounter any problems.
29 "
30 }
31
32
33 #This block allows symlinked shellscripts to correctly set classpath.
34 pushd . > /dev/nullscip-shell filesystem . . `/dev/null`.
35 DIR="${BASH_SOURCE[0]}"
36 while [scip-shell system . . `[`. -h "$DIR" ]; do
37 cd "$(dirnamescip-shell system . . dirname. "$DIR")"
38 DIR="$(readlinkscip-shell system . . readlink. "$(basenamescip-shell system . . basename. "$DIR")")"
39 done
40 cd "$(dirnamescip-shell system . . dirname. "$DIR")"
41 DIR="$(pwdscip-shell system . . pwd.)/"
42 popd > /dev/nullscip-shell filesystem . . `/dev/null`.
43
44 #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
45 CP="$DIR""current/"
46
47 z="-Xmx80m"
48 set=0
49
50 if [scip-shell system . . `[`. -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then
51 usagescip-shell shell bbmap 39.20+dfsg-3 usage().
52 exit
53 fi
54
55 calcXmxscip-shell shell bbmap 39.20+dfsg-3 calcXmx(). () {
56 source "$DIR""/calcmem.sh"
57 setEnvironment
58 parseXmx "$@"
59 }
60 calcXmxscip-shell shell bbmap 39.20+dfsg-3 calcXmx(). "$@"
61
62 function shrinkaccessionscip-shell shell bbmap 39.20+dfsg-3 shrinkaccession().() {
63 local CMD="java $EA $EOOM $z -cp $CP tax.ShrinkAccession $@"
64 echoscip-shell system . . echo. $CMD >&2
65 eval $CMD
66 }
67
68 shrinkaccessionscip-shell shell bbmap 39.20+dfsg-3 shrinkaccession(). "$@"