Debian Codegraph @

phylip2fasta.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 October 3, 2014
7
8 Description: Transforms interleaved phylip to fasta.
9
10 Usage: phylip2fasta.sh in=<input> out=<output>
11
12 Input may be stdin or an interleaved phylip file, compressed or uncompressed.
13
14 Input Parameters:
15 in=<file> The input phylip file; this is the only required parameter.
16 unpigz=true Decompress with pigz for faster decompression.
17
18 Output Parameters:
19 out=<file> Fasta output destination.
20
21 Java Parameters:
22 -Xmx This will set Java's memory usage, overriding autodetection.
23 -Xmx20g will specify 20 gigs of RAM, and -Xmx200m will specify 200 megs.
24 The max is typically 85% of physical memory.
25 -eoom This flag will cause the process to exit if an out-of-memory
26 exception occurs. Requires Java 8u92+.
27 -da Disable assertions.
28
29 Please contact Brian Bushnell at [email protected] if you encounter any problems.
30 "
31 }
32
33 #This block allows symlinked shellscripts to correctly set classpath.
34 pushd . > /dev/nullscip-shell filesystem . . `/dev/null`.
35 DIR="${BASH_SOURCE[0]}"
36 while [scip-shell system . . `[`. -h "$DIR" ]; do
37 cd "$(dirnamescip-shell system . . dirname. "$DIR")"
38 DIR="$(readlinkscip-shell system . . readlink. "$(basenamescip-shell system . . basename. "$DIR")")"
39 done
40 cd "$(dirnamescip-shell system . . dirname. "$DIR")"
41 DIR="$(pwdscip-shell system . . pwd.)/"
42 popd > /dev/nullscip-shell filesystem . . `/dev/null`.
43
44 #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
45 CP="$DIR""current/"
46
47 z="-Xmx1g"
48 z2="-Xms1g"
49 set=0
50
51 if [scip-shell system . . `[`. -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then
52 usagescip-shell shell bbmap 39.20+dfsg-3 usage().
53 exit
54 fi
55
56 calcXmxscip-shell shell bbmap 39.20+dfsg-3 calcXmx(). () {
57 source "$DIR""/calcmem.sh"
58 setEnvironment
59 parseXmx "$@"
60 if [[ $set == 1 ]]; then
61 return
62 fi
63 freeRam 800m 82
64 z="-Xmx${RAM}m"
65 z2="-Xms${RAM}m"
66 }
67 calcXmxscip-shell shell bbmap 39.20+dfsg-3 calcXmx(). "$@"
68
69 convertscip-shell shell bbmap 39.20+dfsg-3 convert().() {
70 local CMD="java $EA $EOOM $z -cp $CP jgi.PhylipToFasta $@"
71 echoscip-shell system . . echo. $CMD >&2
72 eval $CMD
73 }
74
75 convertscip-shell shell bbmap 39.20+dfsg-3 convert(). "$@"