Mercurial > repos > rliterman > csp2
comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/opt/bbmap-39.01-1/summarizecoverage.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 usage(){ | |
4 echo " | |
5 Written by Brian Bushnell | |
6 Last modified April 5, 2020 | |
7 | |
8 Description: Summarizes coverage information from basecov files | |
9 created by pileup.sh. They should be named like | |
10 'sample1_basecov.txt' but other naming styles are fine too. | |
11 | |
12 Usage: summarizecoverage.sh *basecov.txt out=<output file> | |
13 | |
14 Parameters: | |
15 in=<file> 'in=' is not necessary. Any filename used as a | |
16 parameter will be assumed to be an input basecov file. | |
17 out=<file> Write the summary here. Default is stdout. | |
18 reflen=-1 If positive, use this as the total reference length. | |
19 Otherwise, assume basecov files report every ref base. | |
20 | |
21 Please contact Brian Bushnell at bbushnell@lbl.gov if you encounter any problems. | |
22 " | |
23 } | |
24 | |
25 #This block allows symlinked shellscripts to correctly set classpath. | |
26 pushd . > /dev/null | |
27 DIR="${BASH_SOURCE[0]}" | |
28 while [ -h "$DIR" ]; do | |
29 cd "$(dirname "$DIR")" | |
30 DIR="$(readlink "$(basename "$DIR")")" | |
31 done | |
32 cd "$(dirname "$DIR")" | |
33 DIR="$(pwd)/" | |
34 popd > /dev/null | |
35 | |
36 #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/" | |
37 CP="$DIR""current/" | |
38 | |
39 z="-Xmx200m" | |
40 set=0 | |
41 | |
42 if [ -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then | |
43 usage | |
44 exit | |
45 fi | |
46 | |
47 calcXmx () { | |
48 source "$DIR""/calcmem.sh" | |
49 setEnvironment | |
50 parseXmx "$@" | |
51 } | |
52 calcXmx "$@" | |
53 | |
54 summarize() { | |
55 local CMD="java $EA $EOOM $z -cp $CP covid.SummarizeCoverage $@" | |
56 # echo $CMD >&2 | |
57 eval $CMD | |
58 } | |
59 | |
60 summarize "$@" |