Debian Codegraph @

removebadbarcodes.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 March 5, 2018
7
8 Description: Removes reads with barcodes containing non-ACGT bases.
9 Read headers must be in standard Illumina format.
10
11 Usage: removebadbarcodes.sh in=<file> out=<file>
12
13 Parameters:
14 in=<file> Input reads; required parameter.
15 out=<file> Destination for good reads; optional.
16 ziplevel=2 (zl) Compression level for gzip output.
17 pigz=f Spawn a pigz (parallel gzip) process for faster
18 compression than Java. Requires pigz to be installed.
19
20 Java Parameters:
21 -Xmx This will set Java's memory usage, overriding autodetection.
22 -Xmx20g will specify 20 gigs of RAM, and -Xmx800m will specify 800 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 #This block allows symlinked shellscripts to correctly set classpath.
33 pushd . > /dev/nullscip-shell filesystem . . `/dev/null`.
34 DIR="${BASH_SOURCE[0]}"
35 while [scip-shell system . . `[`. -h "$DIR" ]; do
36 cd "$(dirnamescip-shell system . . dirname. "$DIR")"
37 DIR="$(readlinkscip-shell system . . readlink. "$(basenamescip-shell system . . basename. "$DIR")")"
38 done
39 cd "$(dirnamescip-shell system . . dirname. "$DIR")"
40 DIR="$(pwdscip-shell system . . pwd.)/"
41 popd > /dev/nullscip-shell filesystem . . `/dev/null`.
42
43 #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
44 CP="$DIR""current/"
45 JNI="-Djava.library.path=""$DIR""jni/"
46 JNI=""
47
48 z="-Xmx200m"
49 z2="-Xms200m"
50 set=0
51
52 if [scip-shell system . . `[`. -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then
53 usagescip-shell shell bbmap 39.20+dfsg-3 usage().
54 exit
55 fi
56
57 calcXmxscip-shell shell bbmap 39.20+dfsg-3 calcXmx(). () {
58 source "$DIR""/calcmem.sh"
59 setEnvironment
60 parseXmx "$@"
61 }
62 calcXmxscip-shell shell bbmap 39.20+dfsg-3 calcXmx(). "$@"
63
64
65 removebadbarcodesscip-shell shell bbmap 39.20+dfsg-3 removebadbarcodes().() {
66 local CMD="java $EA $EOOM $z $z2 -cp $CP jgi.RemoveBadBarcodes $@"
67 echoscip-shell system . . echo. $CMD >&2
68 eval $CMD
69 }
70
71 removebadbarcodesscip-shell shell bbmap 39.20+dfsg-3 removebadbarcodes(). "$@"