-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathcallgenes.sh
More file actions
executable file
·83 lines (68 loc) · 2.35 KB
/
callgenes.sh
File metadata and controls
executable file
·83 lines (68 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash
usage(){
echo "
Written by Brian Bushnell
Last modified May 4, 2025
Description: Finds orfs and calls genes in unspliced prokaryotes.
This includes bacteria, archaea, viruses, and mitochondria.
Can also predict 16S, 18S, 23S, 5S, and tRNAs.
Usage: callgenes.sh in=contigs.fa out=calls.gff outa=aminos.faa out16S=16S.fa
File parameters:
in=<file> A fasta file; the only required parameter.
out=<file> Output gff file.
outa=<file> Amino acid output.
out16s=<file> 16S output.
model=<file> A pgm file or comma-delimited list.
If unspecified a default model will be used.
stats=stderr Stats output (may be stderr, stdin, a file, or null).
hist=null Gene length histogram.
compareto= Optional reference gff file to compare with the gene calls.
'auto' will name it based on the input file name.
Formatting parameters:
json=false Print stats in JSON.
binlen=21 Histogram bin length.
bins=1000 Maximum histogram bins.
pz=f (printzero) Print histogram lines with zero count.
Other parameters:
minlen=60 Don't call genes shorter than this.
trd=f (trimreaddescription) Set to true to trim read headers after
the first whitespace. Necessary for IGV.
merge=f For paired reads, merge before calling.
detranslate=f Output canonical nucleotide sequences instead of amino acids.
recode=f Re-encode nucleotide sequences over called genes, leaving
non-coding regions unchanged.
Please contact Brian Bushnell at bbushnell@lbl.gov if you encounter any problems.
For documentation and the latest version, visit: https://bbmap.org
"
}
if [ -z "$1" ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
usage
exit
fi
resolveSymlinks(){
SCRIPT="$(cd "$(dirname "$0")" && pwd)/$(basename "$0")"
while [ -h "$SCRIPT" ]; do
DIR="$(dirname "$SCRIPT")"
SCRIPT="$(readlink "$SCRIPT")"
[ "${SCRIPT#/}" = "$SCRIPT" ] && SCRIPT="$DIR/$SCRIPT"
done
DIR="$(cd "$(dirname "$SCRIPT")" && pwd)"
if [ -f "$DIR/bbtools.jar" ]; then
CP="$DIR/bbtools.jar"
else
CP="$DIR/current/"
fi
}
setEnv(){
. "$DIR/javasetup.sh"
. "$DIR/memdetect.sh"
parseJavaArgs "--xmx=6g" "--xms=6g" "--mode=fixed" "$@"
setEnvironment
}
launch() {
CMD="java $EA $EOOM $SIMD $XMX $XMS -cp $CP prok.CallGenes $@"
eval $CMD
}
resolveSymlinks
setEnv "$@"
launch "$@"