Debian Codegraph @

kmerposition.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 Jasper Toscani Field
6 Last modified June 11, 2020
7
8 Description: Counts positional occurrences of reference kmers in reads.
9
10 Usage: kmerposition.sh in=<input file> out=<output file> ref=<reference file> k=<kmer length>
11
12 Input may be fasta or fastq, compressed or uncompressed.
13
14 Standard parameters:
15 in=<file> Primary input, or read 1 input.
16 in2=<file> Read 2 input if reads are in two files.
17 ref=<file> Reference file.
18 out=<file> Primary output, statistics on found kmers.
19
20 Processing parameters:
21 k=19 Kmer length.
22 rcomp=t If true, also match for reverse-complements.
23
24 Java Parameters:
25 -Xmx This will set Java's memory usage, overriding autodetection.
26 -Xmx20g will specify 20 gigs of RAM, and -Xmx200m will
27 specify 200 megs. The max is typically 85% of physical memory.
28 -eoom This flag will cause the process to exit if an out-of-memory
29 exception occurs. Requires Java 8u92+.
30 -da Disable assertions.
31
32 Please contact Brian Bushnell at [email protected] if you encounter any problems.
33 "
34 }
35
36 #This block allows symlinked shellscripts to correctly set classpath.
37 pushd . > /dev/nullscip-shell filesystem . . `/dev/null`.
38 DIR="${BASH_SOURCE[0]}"
39 while [scip-shell system . . `[`. -h "$DIR" ]; do
40 cd "$(dirnamescip-shell system . . dirname. "$DIR")"
41 DIR="$(readlinkscip-shell system . . readlink. "$(basenamescip-shell system . . basename. "$DIR")")"
42 done
43 cd "$(dirnamescip-shell system . . dirname. "$DIR")"
44 DIR="$(pwdscip-shell system . . pwd.)/"
45 popd > /dev/nullscip-shell filesystem . . `/dev/null`.
46
47 #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
48 CP="$DIR""current/"
49
50 z="-Xmx200m"
51 z2="-Xms200m"
52 set=0
53
54 if [scip-shell system . . `[`. -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then
55 usagescip-shell shell bbmap 39.20+dfsg-3 usage().
56 exit
57 fi
58
59 calcXmxscip-shell shell bbmap 39.20+dfsg-3 calcXmx(). () {
60 source "$DIR""/calcmem.sh"
61 setEnvironment
62 parseXmx "$@"
63 }
64 calcXmxscip-shell shell bbmap 39.20+dfsg-3 calcXmx(). "$@"
65
66 kmerposition3scip-shell shell bbmap 39.20+dfsg-3 kmerposition3().() {
67 local CMD="java $EA $EOOM $z -cp $CP jasper.KmerPosition3 $@"
68 echoscip-shell system . . echo. $CMD >&2
69 eval $CMD
70 }
71
72 kmerposition3scip-shell shell bbmap 39.20+dfsg-3 kmerposition3(). "$@"