Debian Codegraph @

renamebysketch.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 January 9, 2025
7
8 Description: Renames fasta files with a TaxID, based on SendSketch results.
9 Designed for metagenome binning evaluation and synthetic read generation.
10
11 Usage: renamebysketch.sh *.fa
12
13 Input may be fasta or fastq, compressed or uncompressed.
14
15 Java Parameters:
16 -Xmx This will set Java's memory usage, overriding autodetection.
17 -Xmx20g will specify 20 gigs of RAM, and -Xmx200m will
18 specify 200 megs. The max is typically 85% of physical memory.
19 -eoom This flag will cause the process to exit if an out-of-memory
20 exception occurs. Requires Java 8u92+.
21 -da Disable assertions.
22
23 Please contact Brian Bushnell at [email protected] if you encounter any problems.
24 "
25 }
26
27 #This block allows symlinked shellscripts to correctly set classpath.
28 pushd . > /dev/nullscip-shell filesystem . . `/dev/null`.
29 DIR="${BASH_SOURCE[0]}"
30 while [scip-shell system . . `[`. -h "$DIR" ]; do
31 cd "$(dirnamescip-shell system . . dirname. "$DIR")"
32 DIR="$(readlinkscip-shell system . . readlink. "$(basenamescip-shell system . . basename. "$DIR")")"
33 done
34 cd "$(dirnamescip-shell system . . dirname. "$DIR")"
35 DIR="$(pwdscip-shell system . . pwd.)/"
36 popd > /dev/nullscip-shell filesystem . . `/dev/null`.
37
38 #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
39 CP="$DIR""current/"
40
41 z="-Xmx4g"
42 z2="-Xms4g"
43 set=0
44
45 if [scip-shell system . . `[`. -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then
46 usagescip-shell shell bbmap 39.20+dfsg-3 usage().
47 exit
48 fi
49
50 calcXmxscip-shell shell bbmap 39.20+dfsg-3 calcXmx(). () {
51 source "$DIR""/calcmem.sh"
52 setEnvironment
53 parseXmx "$@"
54 if [[ $set == 1 ]]; then
55 return
56 fi
57 freeRam 4000m 84
58 z="-Xmx${RAM}m"
59 z2="-Xms${RAM}m"
60 }
61 calcXmxscip-shell shell bbmap 39.20+dfsg-3 calcXmx(). "$@"
62
63 renamescip-shell shell bbmap 39.20+dfsg-3 rename().() {
64 local CMD="java $EA $EOOM $z -cp $CP bin.FileRenamer $@"
65 echoscip-shell system . . echo. $CMD >&2
66 eval $CMD
67 }
68
69 renamescip-shell shell bbmap 39.20+dfsg-3 rename(). "$@"