annotate abacas.sh @ 0:a1fdc6925620 draft default tip

"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
author nml
date Thu, 21 Nov 2019 12:53:20 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
1 #!/bin/bash
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
2
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
3 #wrapper for abacas
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
4 ##our arguments will come in as an array
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
5
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
6 args=("$@")
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
7
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
8 #to keep things readable assign vars
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
9 input_ref="${args[0]}"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
10 input_query="${args[1]}"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
11 ordered_contigs="${args[2]}"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
12 use_bin="${args[3]}"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
13 non="${args[4]}"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
14 append_bin="${args[5]}"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
15 out_bin="${args[6]}"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
16 out_crunch="${args[7]}"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
17 out_gaps="${args[8]}"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
18 out_fasta="${args[9]}"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
19 out_tab="${args[10]}"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
20 out_unused="${args[11]}"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
21 out_multi="${args[12]}"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
22 out_binmulti="${args[13]}"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
23 out_nonpseudo="${args[14]}"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
24
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
25 ##ok lets do up the optional tags.....I have four thus far
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
26 ##generate ordered multifasta file
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
27
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
28 if [ "$ordered_contigs" == "yes" ]; then
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
29 options="-m"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
30 fi
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
31
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
32 if [ "$use_bin" == "yes" ]; then
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
33 options="$options -b"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
34 fi
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
35
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
36 if [ "$non" == "yes" ]; then
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
37 options="$options -N"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
38 fi
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
39
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
40 if [ "$append_bin" == "yes" ]; then
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
41 options="$options -a"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
42 fi
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
43
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
44 options="$options -o ab_out"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
45
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
46 script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
47
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
48 #run abacas
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
49 eval "perl $script_path/abacas.1.1.pl $options -r $input_ref -q $input_query -p nucmer"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
50 echo "perl $script_path/abacas.1.1.pl $options -r $input_ref -q $input_query -p nucmer"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
51 #ok now we have to remove the nucmer files to cleanup a bit...
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
52 rm nucmer.delta
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
53 rm nucmer.filtered.delta
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
54 rm nucmer.tiling
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
55
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
56 #name the datafiles properly
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
57 mv ab_out.bin "$out_bin"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
58 if [ "$ordered_contigs" == "yes" ]; then
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
59 mv ab_out.contigs.fas "$out_multi"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
60 fi
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
61
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
62 if [ "$use_bin" == "yes" ]; then
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
63 mv ab_out.contigsInbin.fas "$out_binmulti"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
64 fi
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
65
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
66 mv ab_out.crunch "$out_crunch"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
67 mv ab_out.fasta "$out_fasta"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
68 mv ab_out.gaps "$out_gaps"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
69
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
70 if [ "$non" == "yes" ]; then
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
71 mv ab_out.NoNs.fasta "$out_nonpseudo"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
72 fi
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
73
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
74 mv ab_out.tab "$out_tab"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
75 mv unused_contigs.out "$out_unused"
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
76
a1fdc6925620 "planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff changeset
77 #end script for now