comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/opt/bbmap-39.01-1/mergeOTUs.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 January 21, 2015
7
8 Description: Merges coverage stats lines (from pileup) for the same OTU,
9 according to some custom naming scheme.
10
11 Usage: mergeOTUs.sh in=<file> out=<file>
12
13 Please contact Brian Bushnell at bbushnell@lbl.gov if you encounter any problems.
14 "
15 }
16
17 #This block allows symlinked shellscripts to correctly set classpath.
18 pushd . > /dev/null
19 DIR="${BASH_SOURCE[0]}"
20 while [ -h "$DIR" ]; do
21 cd "$(dirname "$DIR")"
22 DIR="$(readlink "$(basename "$DIR")")"
23 done
24 cd "$(dirname "$DIR")"
25 DIR="$(pwd)/"
26 popd > /dev/null
27
28 #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
29 CP="$DIR""current/"
30
31 z="-Xmx1g"
32 set=0
33
34 if [ -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then
35 usage
36 exit
37 fi
38
39 calcXmx () {
40 source "$DIR""/calcmem.sh"
41 setEnvironment
42 parseXmx "$@"
43 }
44 calcXmx "$@"
45
46 function mergeOTUs() {
47 local CMD="java $EA $EOOM $z -cp $CP driver.MergeCoverageOTU $@"
48 echo $CMD >&2
49 eval $CMD
50 }
51
52 mergeOTUs "$@"