comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/opt/bbmap-39.01-1/bbmapskimmer.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 #This is a version of BBMap designed to final all sites above a given threshold,
4 #rather than the single best site. Syntax is the same as BBMap.
5
6 usage(){
7 bash "$DIR"bbmap.sh
8 }
9
10 #This block allows symlinked shellscripts to correctly set classpath.
11 pushd . > /dev/null
12 DIR="${BASH_SOURCE[0]}"
13 while [ -h "$DIR" ]; do
14 cd "$(dirname "$DIR")"
15 DIR="$(readlink "$(basename "$DIR")")"
16 done
17 cd "$(dirname "$DIR")"
18 DIR="$(pwd)/"
19 popd > /dev/null
20
21 #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
22 CP="$DIR""current/"
23 JNI="-Djava.library.path=""$DIR""jni/"
24 JNI=""
25
26 z="-Xmx1g"
27 z2="-Xms1g"
28 set=0
29
30 if [ -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then
31 usage
32 exit
33 fi
34
35 calcXmx () {
36 source "$DIR""/calcmem.sh"
37 setEnvironment
38 parseXmx "$@"
39 if [[ $set == 1 ]]; then
40 return
41 fi
42 freeRam 3200m 84
43 z="-Xmx${RAM}m"
44 z2="-Xms${RAM}m"
45 }
46 calcXmx "$@"
47
48 mapPacBioSkimmer() {
49 local CMD="java $EA $EOOM $z $z2 $JNI -cp $CP align2.BBMapPacBioSkimmer build=1 overwrite=true minratio=0.40 fastareadlen=6000 ambig=all minscaf=100 startpad=10000 stoppad=10000 midpad=6000 $@"
50 echo $CMD >&2
51 eval $CMD
52 }
53
54 mapPacBioSkimmer "$@"