Mercurial > repos > rliterman > csp2
comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/opt/bbmap-39.01-1/getreads.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 February 17, 2015 | |
7 | |
8 Description: Selects reads with designated numeric IDs. | |
9 | |
10 Usage: getreads.sh in=<file> id=<number,number,number...> out=<file> | |
11 | |
12 The first read (or pair) has ID 0, the second read (or pair) has ID 1, etc. | |
13 | |
14 Parameters: | |
15 in=<file> Specify the input file, or stdin. | |
16 out=<file> Specify the output file, or stdout. | |
17 id= Comma delimited list of numbers or ranges, in any order. | |
18 For example: id=5,93,17-31,8,0,12-13 | |
19 | |
20 Please contact Brian Bushnell at bbushnell@lbl.gov if you encounter any problems. | |
21 " | |
22 } | |
23 | |
24 #This block allows symlinked shellscripts to correctly set classpath. | |
25 pushd . > /dev/null | |
26 DIR="${BASH_SOURCE[0]}" | |
27 while [ -h "$DIR" ]; do | |
28 cd "$(dirname "$DIR")" | |
29 DIR="$(readlink "$(basename "$DIR")")" | |
30 done | |
31 cd "$(dirname "$DIR")" | |
32 DIR="$(pwd)/" | |
33 popd > /dev/null | |
34 | |
35 #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/" | |
36 CP="$DIR""current/" | |
37 | |
38 z="-Xmx200m" | |
39 set=0 | |
40 | |
41 if [ -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then | |
42 usage | |
43 exit | |
44 fi | |
45 | |
46 calcXmx () { | |
47 source "$DIR""/calcmem.sh" | |
48 setEnvironment | |
49 parseXmx "$@" | |
50 } | |
51 calcXmx "$@" | |
52 | |
53 function tf() { | |
54 local CMD="java $EA $EOOM $z -cp $CP jgi.GetReads $@" | |
55 echo $CMD >&2 | |
56 eval $CMD | |
57 } | |
58 | |
59 tf "$@" |