comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/opt/bbmap-39.01-1/plotflowcell.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 August 9, 2018
7
8 Description: Generates statistics about flowcell positions.
9
10 Usage: plotflowcell.sh in=<input> out=<output>
11
12 Input parameters:
13 in=<file> Primary input file.
14 in2=<file> Second input file for paired reads in two files.
15 indump=<file> Specify an already-made dump file to use instead of
16 analyzing the input reads.
17 reads=-1 Process this number of reads, then quit (-1 means all).
18 interleaved=auto Set true/false to override autodetection of the
19 input file as paired interleaved.
20
21 Output parameters:
22 out=<file> Output file for filtered reads.
23 dump=<file> Write a summary of quality information by coordinates.
24
25 Tile parameters:
26 xsize=500 Initial width of micro-tiles.
27 ysize=500 Initial height of micro-tiles.
28 size= Allows setting xsize and ysize tot he same value.
29 target=800 Iteratively increase the size of micro-tiles until they
30 contain an average of at least this number of reads.
31
32 Other parameters:
33 trimq=-1 If set to a positive number, trim reads to that quality
34 level instead of filtering them.
35 qtrim=r If trimq is positive, to quality trimming on this end
36 of the reads. Values are r, l, and rl for right,
37 left, and both ends.
38
39 Java Parameters:
40 -Xmx This will set Java's memory usage, overriding autodetection.
41 -Xmx20g will specify 20 GB of RAM; -Xmx200m will specify
42 200 MB. The max is typically 85% of physical memory.
43 -eoom This flag will cause the process to exit if an
44 out-of-memory exception occurs. Requires Java 8u92+.
45 -da Disable assertions.
46
47 Please contact Brian Bushnell at bbushnell@lbl.gov if you encounter any problems.
48 "
49 }
50
51 #This block allows symlinked shellscripts to correctly set classpath.
52 pushd . > /dev/null
53 DIR="${BASH_SOURCE[0]}"
54 while [ -h "$DIR" ]; do
55 cd "$(dirname "$DIR")"
56 DIR="$(readlink "$(basename "$DIR")")"
57 done
58 cd "$(dirname "$DIR")"
59 DIR="$(pwd)/"
60 popd > /dev/null
61
62 #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
63 CP="$DIR""current/"
64
65 z="-Xmx8g"
66 z2="-Xms8g"
67 set=0
68
69 if [ -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then
70 usage
71 exit
72 fi
73
74 calcXmx () {
75 source "$DIR""/calcmem.sh"
76 setEnvironment
77 parseXmx "$@"
78 if [[ $set == 1 ]]; then
79 return
80 fi
81 freeRam 3200m 84
82 z="-Xmx${RAM}m"
83 z2="-Xms${RAM}m"
84 }
85 calcXmx "$@"
86
87 plotflowcell() {
88 local CMD="java $EA $EOOM $z $z2 -cp $CP hiseq.PlotFlowCell $@"
89 echo $CMD >&2
90 eval $CMD
91 }
92
93 plotflowcell "$@"