Debian Codegraph @

readlength.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 December 19, 2018
7 Description: Generates a length histogram of input reads.
8
9 Usage: readlength.sh in=<input file>
10
11 in=<file> The 'in=' flag is needed only if the input file is not the first parameter. 'in=stdin.fq' will pipe from standard in.
12 in2=<file> Use this if 2nd read of pairs are in a different file.
13 out=<file> Write the histogram to this file. Default is stdout.
14 bin=10 Set the histogram bin size.
15 max=80000 Set the max read length to track.
16 round=f Places reads in the closest bin, rather than the highest bin of at least readlength.
17 nzo=t (nonzeroonly) Do not print empty bins.
18 reads=-1 If nonnegative, stop after this many reads.
19
20 Please contact Brian Bushnell at [email protected] if you encounter any problems.
21 "
22 }
23
24 #This block allows symlinked shellscripts to correctly set classpath.
25 pushd . > /dev/nullscip-shell filesystem . . `/dev/null`.
26 DIR="${BASH_SOURCE[0]}"
27 while [scip-shell system . . `[`. -h "$DIR" ]; do
28 cd "$(dirnamescip-shell system . . dirname. "$DIR")"
29 DIR="$(readlinkscip-shell system . . readlink. "$(basenamescip-shell system . . basename. "$DIR")")"
30 done
31 cd "$(dirnamescip-shell system . . dirname. "$DIR")"
32 DIR="$(pwdscip-shell system . . pwd.)/"
33 popd > /dev/nullscip-shell filesystem . . `/dev/null`.
34
35 #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
36 CP="$DIR""current/"
37
38 z="-Xmx400m"
39 z2="-Xms400m"
40 set=0
41
42 if [scip-shell system . . `[`. -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then
43 usagescip-shell shell bbmap 39.20+dfsg-3 usage().
44 exit
45 fi
46
47 calcXmxscip-shell shell bbmap 39.20+dfsg-3 calcXmx(). () {
48 source "$DIR""/calcmem.sh"
49 setEnvironment
50 parseXmx "$@"
51 }
52 calcXmxscip-shell shell bbmap 39.20+dfsg-3 calcXmx(). "$@"
53
54 statsscip-shell shell bbmap 39.20+dfsg-3 stats().() {
55 local CMD="java $EA $EOOM $z -cp $CP jgi.MakeLengthHistogram $@"
56 # echo $CMD >&2
57 eval $CMD
58 }
59
60 statsscip-shell shell bbmap 39.20+dfsg-3 stats(). "$@"