Debian Codegraph @

countgc.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 January 21, 2015
7
8 Description: Counts GC content of reads or scaffolds.
9
10 Usage: countgc in=<input> out=<output> format=<format>
11
12 Input may be stdin or a fasta or fastq file, compressed or uncompressed.
13 Output (which is optional) is tab-delimited.
14 format=1: name length A C G T N
15 format=2: name GC
16 format=4: name length GC
17 Note that in format 1, A+C+G+T=1 even when N is nonzero.
18
19 Please contact Brian Bushnell at [email protected] if you encounter any problems.
20 "
21 }
22
23 #This block allows symlinked shellscripts to correctly set classpath.
24 pushd . > /dev/nullscip-shell filesystem . . `/dev/null`.
25 DIR="${BASH_SOURCE[0]}"
26 while [scip-shell system . . `[`. -h "$DIR" ]; do
27 cd "$(dirnamescip-shell system . . dirname. "$DIR")"
28 DIR="$(readlinkscip-shell system . . readlink. "$(basenamescip-shell system . . basename. "$DIR")")"
29 done
30 cd "$(dirnamescip-shell system . . dirname. "$DIR")"
31 DIR="$(pwdscip-shell system . . pwd.)/"
32 popd > /dev/nullscip-shell filesystem . . `/dev/null`.
33
34 #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
35 CP="$DIR""current/"
36
37 z="-Xmx120m"
38 set=0
39
40 if [scip-shell system . . `[`. -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then
41 usagescip-shell shell bbmap 39.20+dfsg-3 usage().
42 exit
43 fi
44
45 calcXmxscip-shell shell bbmap 39.20+dfsg-3 calcXmx(). () {
46 source "$DIR""/calcmem.sh"
47 setEnvironment
48 parseXmx "$@"
49 }
50 calcXmxscip-shell shell bbmap 39.20+dfsg-3 calcXmx(). "$@"
51
52 countgcscip-shell shell bbmap 39.20+dfsg-3 countgc().() {
53 local CMD="java $EA $EOOM $z -cp $CP jgi.CountGC $@"
54 echoscip-shell system . . echo. $CMD >&2
55 eval $CMD
56 }
57
58 countgcscip-shell shell bbmap 39.20+dfsg-3 countgc(). "$@"