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