Mercurial > repos > nml > abacas
annotate abacas.1.1.pl @ 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 |
rev | line source |
---|---|
0
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1 #!/usr/bin/env perl |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
2 # Copyright (C) 2008 Genome Research Limited. All Rights Reserved. |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
3 # |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
4 # This program is free software; you can redistribute it and/or |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
5 # modify it under the terms of the GNU General Public License |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
6 # as published by the Free Software Foundation; either version 2 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
7 # of the License, or (at your option) any later version. |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
8 #This program is distributed in the hope that it will be useful, |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
11 # GNU General Public License for more details. |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
12 # |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
13 # You should have received a copy of the GNU General Public License |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
14 # along with this program; if not, write to the Free Software |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
15 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
16 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
17 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
18 use strict; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
19 use warnings; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
20 use POSIX qw(ceil floor); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
21 use Getopt::Std; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
22 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
23 #------------------------------------------------------------------------------- |
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 if (@ARGV < 1) { usage();} |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
26 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
27 my ($help, $reference, $query_file, $choice, $sen, $seed, $mlfas, $fasta_bin, $avoid_Ns, |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
28 $tbx, $min_id, $min_cov, $diff_cov, $min_len,$add_bin_2ps, $pick_primer, |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
29 $flank, $chk_uniq,$redoMummer, $is_circular,$escapeToPrimers, $debug, $gaps_2file, $prefix) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
30 =checkUserInput( @ARGV ); |
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 my $ref_inline; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
33 if ($escapeToPrimers ==1) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
34 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
35 pickPrimers ($reference, $query_file, $flank, $chk_uniq); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
36 exit; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
37 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
38 #BEGIN |
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 print_header(); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
41 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
42 $ref_inline = Ref_Inline($reference); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
43 #Get length of the reference sequence |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
44 my $ref_len = length($ref_inline); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
45 print "PREPARING DATA FOR $choice \n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
46 |
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 # Running MUMmer # |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
49 ################### |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
50 my ($path_dir, $run_mum, $path_toPass); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
51 if ($debug) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
52 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
53 print "the seed is $seed \n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
54 print "RedoMummer= ",$redoMummer."\n"; |
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 my @do_mum_return; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
57 if ($redoMummer) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
58 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
59 @do_mum_return = doMummer($reference, $query_file, $choice,$sen,$seed,$min_id, $min_cov, $diff_cov,$min_len, $debug, $is_circular) or die "Couldn't run MUMmer\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
60 } |
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 #################################### |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
63 # Processing tiling output # |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
64 #################################### |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
65 if ($debug) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
66 print "Do tiling...\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
67 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
68 |
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 my $mummer_tiling = $do_mum_return[0]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
71 $path_dir = $do_mum_return[2]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
72 $path_toPass = $do_mum_return[1]; |
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 #Do Tiling |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
75 #------------------------------------------- |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
76 doTiling ($mummer_tiling, $path_toPass, $path_dir,$reference, $query_file, $choice, $prefix,$mlfas, $fasta_bin, $avoid_Ns, $ref_len, $gaps_2file, $ref_inline, $add_bin_2ps, $pick_primer, $flank, $chk_uniq, $tbx); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
77 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
78 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
79 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
80 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
81 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
82 ########################################################################################################################################################## |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
83 #################################Contig ordering ########################################################## |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
84 ########################### |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
85 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
86 sub help |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
87 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
88 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
89 die <<EOF |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
90 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
91 *********************************************************************************** |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
92 * ABACAS: Algorithm Based Automatic Contiguation of Assembled Sequences * |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
93 * * |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
94 * * |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
95 * Copyright (C) 2009 The Wellcome Trust Sanger Institute, Cambridge, UK. * |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
96 * All Rights Reserved. * |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
97 * * |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
98 *********************************************************************************** |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
99 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
100 USAGE |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
101 abacas.pl -r <reference file: single fasta> -q <query sequence file: fasta> -p <nucmer/promer> [OPTIONS] |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
102 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
103 -r reference sequence in a single fasta file |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
104 -q contigs in multi-fasta format |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
105 -p MUMmer program to use: 'nucmer' or 'promer' |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
106 OR |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
107 abacas.pl -r <reference file: single fasta> -q <pseudomolecule/ordered sequence file: fasta> -e |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
108 OPTIONS |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
109 -h print usage |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
110 -d use default nucmer/promer parameters |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
111 -s int minimum length of exact matching word (nucmer default = 12, promer default = 4) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
112 -m print ordered contigs to file in multifasta format |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
113 -b print contigs in bin to file |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
114 -N print a pseudomolecule without "N"s |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
115 -i int mimimum percent identity [default 40] |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
116 -v int mimimum contig coverage [default 40] |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
117 -V int minimum contig coverage difference [default 1] |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
118 -l int minimum contig length [default 1] |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
119 -t run tblastx on contigs that are not mapped |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
120 -g string (file name) print gaps on reference to file name |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
121 -a append contigs in bin to the pseudomolecule |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
122 -o prefix output files will have this prefix |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
123 -P pick primer sets to close gaps |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
124 -f int number of flanking bases on either side of a gap for primer design (default 350) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
125 -R Redo mummer [default 1, use -R 0 to avoid running mummer] |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
126 -e Escape contig ordering i.e. go to primer design |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
127 -c Reference sequence is circular |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
128 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
129 EOF |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
130 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
131 ######## |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
132 sub usage |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
133 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
134 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
135 die <<EOF |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
136 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
137 USAGE |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
138 abacas.pl -r <reference file: single fasta> -q <query sequence file: fasta> -p <nucmer/promer> [OPTIONS] |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
139 -r reference sequence in a single fasta file |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
140 -q contigs in multi-fasta format |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
141 -p MUMmer program to use: 'nucmer' or 'promer' |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
142 for contig ordering and primer design |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
143 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
144 OR |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
145 abacas.pl -r <reference file: single fasta> -q <pseudomolecule/ordered sequence file: fasta> -e 1 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
146 to escape contig ordering and go directly to primer design |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
147 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
148 OR |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
149 abacas.pl -h for help |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
150 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
151 EOF |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
152 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
153 ######## |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
154 ################## |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
155 sub print_header |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
156 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
157 print " |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
158 *********************************************************************************** |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
159 * ABACAS: Algorithm Based Automatic Contiguation of Assembled Sequences * |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
160 * * |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
161 * * |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
162 * Copyright (C) 2009 The Wellcome Trust Sanger Institute, Cambridge, UK. * |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
163 * All Rights Reserved. * |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
164 * * |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
165 *********************************************************************************** |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
166 \n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
167 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
168 ######################################### |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
169 sub checkUserInput{ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
170 my %options; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
171 getopts('hr:q:p:ds:mbNi:v:V:l:tg:ao:Pf:R:u:ecD', \%options); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
172 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
173 my ($help, $reference, $query_file, $choice, $sen, $seed, $mlfas, $fasta_bin, $avoid_Ns, |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
174 $tbx, $min_id, $min_cov, $diff_cov, $min_len,$add_bin_2ps, $pick_primer, |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
175 $flank, $chk_uniq,$redoMummer, $is_circular,$escapeToPrimers, $debug, $gaps_2file, $prefix); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
176 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
177 if($options{h}) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
178 $help = $options{h}; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
179 help(); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
180 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
181 else{ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
182 $help =0; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
183 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
184 if ($options{r} && $options{q} ){ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
185 ($reference, $query_file) = ($options{r},$options{q}); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
186 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
187 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
188 else |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
189 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
190 usage() unless $options{e}; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
191 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
192 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
193 if ($options{p}) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
194 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
195 $choice = $options{p}; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
196 unless ($choice eq "nucmer" || $choice eq "promer"){ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
197 print "Unknown MuMmer function\n Please use nucmer or promer\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
198 exit; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
199 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
200 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
201 else |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
202 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
203 usage() unless $options{e}; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
204 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
205 if ($options{e}) #$escapeToPrimers) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
206 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
207 print_header(); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
208 print "Primer design selected,... escaping contig ordering\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
209 $escapeToPrimers = 1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
210 $chk_uniq = "nucmer"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
211 $choice = ""; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
212 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
213 else |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
214 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
215 $escapeToPrimers = 0; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
216 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
217 if ($options{d}) {$sen =1;} else {$sen =0;} #print $sen , " ---sen\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
218 #print $options{t}, "\n"; exit; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
219 if($options{t}) {$tbx = 1;} else {$tbx = 0;} #print $tbx, " ---tbx\n"; # |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
220 unless ($options{s}){ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
221 if ($choice eq "nucmer"){ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
222 $seed = 12; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
223 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
224 else{ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
225 $seed =4; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
226 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
227 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
228 if ($options{m}){$mlfas =1;} else { $mlfas =0; } #print $mlfas , " ---mlfasta\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
229 if ($options{b}) { $fasta_bin =1;} else {$fasta_bin =0;} |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
230 if ($options {N}) {$avoid_Ns =1;} else {$avoid_Ns=0;} |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
231 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
232 unless($options{i}) {$min_id =40;} |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
233 unless ($options{v}) {$min_cov =40;} |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
234 unless ($options{V}) {$diff_cov =1;} |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
235 unless ($options {l}) {$min_len = 1;} |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
236 if ($options{a}) {$add_bin_2ps = 1; }else {$add_bin_2ps =0;} |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
237 if ($options{P}) {$pick_primer=1;} else {$pick_primer =0;} |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
238 if ($options{f}) {$flank = $options{f};} else {$flank = 1000;} |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
239 if ($options{u}) {$chk_uniq = $options{u}; } else {$chk_uniq = "nucmer";} |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
240 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
241 if($options{R}) {$redoMummer = $options{R}; }else {$redoMummer = 1;} |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
242 unless ($options{c}) {$is_circular = 0;} |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
243 if ($options{g}) {$gaps_2file = $options{g};} else {$gaps_2file ="";} |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
244 if($options{o}) {$prefix = $options{o};} else {$prefix = "";} |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
245 unless ($options{D}) {$debug =0}; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
246 if ($tbx ==1 && $fasta_bin !=1) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
247 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
248 print "ERROR: Please use -t -b if you want to run tblastx on contigs in bin\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
249 exit; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
250 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
251 #print $tbx, "\n"; exit; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
252 return ($help, $reference, $query_file, $choice, $sen, $seed, $mlfas, $fasta_bin, $avoid_Ns, |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
253 $tbx, $min_id, $min_cov, $diff_cov, $min_len,$add_bin_2ps, $pick_primer, |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
254 $flank, $chk_uniq,$redoMummer, $is_circular,$escapeToPrimers, $debug, $gaps_2file, $prefix); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
255 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
256 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
257 ############# |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
258 ## get the reference sequence in one line |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
259 #-------------------------------------------------- |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
260 sub Ref_Inline |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
261 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
262 my $ref = shift; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
263 open (refFH, $ref) or die "Could not open file\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
264 my $seq =""; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
265 my @r = <refFH>; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
266 my $num_chr =0; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
267 foreach(@r){ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
268 if ($_ =~ /\>/){ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
269 $num_chr +=1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
270 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
271 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
272 if ($num_chr > 1){ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
273 print "\nERROR: Please use a single fasta reference file. You can simply merge chromosomes in to a union fasta file.\n\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
274 exit; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
275 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
276 shift @r; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
277 foreach(@r){ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
278 chomp; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
279 $seq = $seq.$_; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
280 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
281 return $seq; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
282 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
283 ################ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
284 # Run mummer |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
285 #-------------------------------------------- |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
286 sub doMummer |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
287 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
288 my ($reference, $query_file, $choice, $sen,$seed,$min_id, $min_cov, $diff_cov,$min_len, $debug, $is_circular ) = @_; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
289 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
290 my $df = 'delta-filter'; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
291 my $st = 'show-tiling'; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
292 my $ask = 'which'; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
293 my ($path_toPass, $run_mum); # params to return... |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
294 my ($command, $Path, $dir) = checkProg($choice); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
295 my ($run_df, $df_path, $df_dir) = checkProg($df); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
296 my ($run_st, $st_path, $st_dir) = checkProg($st); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
297 my (@running, @deltaRes, @coordsRes); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
298 if ($choice eq "nucmer") |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
299 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
300 if ($sen ==0) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
301 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
302 @running = `$command --maxmatch -l $seed -p $choice $reference $query_file &> /dev/null`; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
303 @deltaRes = `$run_df -q $choice.delta >$choice.filtered.delta`; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
304 if ($is_circular == 1) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
305 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
306 @coordsRes = `$run_st -c -i $min_id -v $min_cov -V $diff_cov -l $min_len -R -u unused_contigs.out $choice.filtered.delta > $choice.tiling`; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
307 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
308 else |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
309 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
310 @coordsRes = `$run_st -i $min_id -v $min_cov -V $diff_cov -l $min_len -R -u unused_contigs.out $choice.filtered.delta > $choice.tiling`; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
311 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
312 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
313 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
314 else |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
315 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
316 @running = `$command -p $choice $reference $query_file &> /dev/null`; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
317 @deltaRes = `$run_df -q $choice.delta >$choice.filtered.delta`; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
318 if ($is_circular ==1) {@coordsRes = `$run_st -c -i $min_id -v $min_cov -V $diff_cov -l $min_len -R -u unused_contigs.out $choice.filtered.delta > $choice.tiling`;} |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
319 else { @coordsRes = `$run_st -i $min_id -v $min_cov -V $diff_cov -l $min_len -R -u unused_contigs.out $choice.filtered.delta > $choice.tiling`;} |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
320 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
321 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
322 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
323 else |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
324 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
325 if ($sen ==0) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
326 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
327 @running = `$command --maxmatch -l $seed -x 1 -p $choice $reference $query_file &> /dev/null`; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
328 @deltaRes = `$run_df -q $choice.delta >$choice.filtered.delta`; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
329 if ($is_circular == 1) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
330 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
331 @coordsRes= `$run_st -c -i $min_id -v $min_cov -V $diff_cov -l $min_len -R -u unused_contigs.out $choice.filtered.delta > $choice.tiling`; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
332 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
333 else |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
334 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
335 @coordsRes= `$run_st -i $min_id -v $min_cov -V $diff_cov -l $min_len -R -u unused_contigs.out $choice.filtered.delta > $choice.tiling`; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
336 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
337 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
338 else |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
339 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
340 @running = `$command -l $seed -p $choice $reference $query_file &> /dev/null`; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
341 @deltaRes = `$run_df -q $choice.delta >$choice.filtered.delta`; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
342 if ($is_circular == 1) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
343 @coordsRes= `$run_st -c -i $min_id -v $min_cov -V $diff_cov -l $min_len -R -u unused_contigs.out $choice.filtered.delta > $choice.tiling`; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
344 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
345 else |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
346 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
347 @coordsRes= `$run_st -i $min_id -v $min_cov -V $diff_cov -l $min_len -R -u unused_contigs.out $choice.filtered.delta > $choice.tiling`; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
348 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
349 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
350 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
351 my $Coordsfull= "$choice.tiling"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
352 return ($Coordsfull,$Path, $dir); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
353 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
354 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
355 ## ############################################################################# |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
356 sub checkProg{ #checks if a given excutable is in the path... |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
357 my $prog = shift; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
358 my $ask = 'which'; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
359 my @check_prog = `$ask $prog`; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
360 my $path_toPass; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
361 my $path_dir; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
362 my $command; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
363 if (defined $check_prog[0] && $check_prog[0] =~ /$prog$/) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
364 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
365 $path_toPass = $prog; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
366 $command = $prog; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
367 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
368 else |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
369 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
370 print "\nENTER the directory for your ", $prog, " executables [default ./]: "; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
371 my $path=<STDIN>; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
372 chomp $path; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
373 $path_dir = $path; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
374 if ($path_dir =~/\/$/) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
375 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
376 $path_dir = $path_dir; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
377 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
378 else |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
379 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
380 $path_dir = $path_dir."/"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
381 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
382 my @final_check = `$ask $command`; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
383 if (exists $final_check[0] && $final_check[0] =~ /$prog$/) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
384 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
385 $command = $path_dir.$prog; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
386 $path_toPass = $command; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
387 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
388 else |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
389 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
390 print "ERROR: Could not run ", $prog, ", please check if it is installed in your path\n or provide the directory \n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
391 exit; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
392 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
393 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
394 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
395 return ($command, $path_toPass, $path_dir); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
396 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
397 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
398 ############################## |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
399 # converts a fasta file to an ordered single line |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
400 #-------------------------------------------------- |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
401 sub Fasta2ordered |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
402 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
403 if( @_ != 1 ) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
404 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
405 print "Usage: Fasta2ordered <fasta_file>\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
406 exit; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
407 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
408 my $fast = shift; #print $fast; exit; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
409 my @fasta = split (/\n/, $fast); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
410 if ($fasta[0] =~ /\>/ ) #remove chromosome name if exists in the onput sequence. |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
411 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
412 my $ch_name = $fasta[0]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
413 shift @fasta; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
414 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
415 #print $fasta[0]; exit; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
416 foreach(@fasta){chomp;} |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
417 my $num_lines = scalar(@fasta); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
418 my $dna = ''; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
419 for(my $i=0; $i< $num_lines; $i+=1) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
420 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
421 $dna = $dna.$fasta[$i]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
422 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
423 my $ordered_dna = $dna; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
424 return $ordered_dna; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
425 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
426 ############################################################## |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
427 # Hash input contigs |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
428 #------------------------------------------------ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
429 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
430 sub hash_contigs { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
431 if( @_ != 1 ) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
432 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
433 print "Usage: hash_contigs contigs_file"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
434 exit; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
435 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
436 my $contigs_file = shift; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
437 if( $contigs_file =~ /\.gz$/ ) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
438 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
439 open(CONTIGS, $contigs_file, "gunzip -c $contigs_file |" ) or die "Cant open contigs file: $!\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
440 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
441 else |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
442 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
443 open( CONTIGS, $contigs_file) or die "Cant open contigs file: $!\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
444 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
445 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
446 my %contigs_hash; # hash to store contig names and sequences |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
447 my $contigName; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
448 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
449 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
450 while (<CONTIGS>) ##add error checking... |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
451 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
452 if (/^>(\S+)/) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
453 $contigName=$1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
454 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
455 else { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
456 chomp; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
457 $contigs_hash{$contigName} .= $_; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
458 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
459 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
460 close(CONTIGS); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
461 #tdo |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
462 ## check if qual exists |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
463 my %contigs_qual_hash; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
464 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
465 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
466 if (-r "$contigs_file.qual" or -r "$contigs_file.qual.gz") { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
467 if( -r "$contigs_file.qual.gz" ) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
468 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
469 open(CONTIGS, "$contigs_file.qual.gz", "gunzip -c $contigs_file.qual.gz |" ) or die "Cant open contigs file: $!\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
470 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
471 else |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
472 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
473 open( CONTIGS, "$contigs_file.qual" ) or die "Cant open contigs file: $!\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
474 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
475 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
476 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
477 while (<CONTIGS>) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
478 if (/^>(\S+)/) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
479 $contigName=$1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
480 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
481 else { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
482 chomp; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
483 $contigs_qual_hash{$contigName} .= $_; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
484 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
485 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
486 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
487 } # end tdo # end if exist |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
488 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
489 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
490 return (\%contigs_hash,\%contigs_qual_hash); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
491 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
492 ####################### |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
493 ############################## |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
494 ### it gets a delta name |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
495 sub getMummerComparison{ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
496 my $deltaName = shift; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
497 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
498 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
499 ### transform the delta file to coords |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
500 my $call ="show-coords -H -T -q $deltaName > $deltaName.coords "; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
501 !system(" $call") or die "Problems doing the show-coords comparison: $call $!\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
502 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
503 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
504 ### willh old results |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
505 my %h; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
506 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
507 ### has as index the postion with the max hits |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
508 my %h_max; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
509 my $tmp=0; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
510 my $tmp_index; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
511 my $key=''; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
512 my $is_promer =0; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
513 if ($deltaName =~/^promer/) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
514 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
515 $is_promer =1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
516 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
517 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
518 open (F,"$deltaName.coords") or die "Problem in getComparisonFile to open file $deltaName.coords\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
519 my @File=<F>; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
520 my @a; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
521 @a=split(/\s+/,$File[0]); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
522 $tmp=$a[5]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
523 $tmp_index=$a[0]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
524 if ($is_promer ==1) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
525 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
526 $key=$a[12]; ## nucmer: $key = $a[8] |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
527 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
528 else |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
529 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
530 $key = $a[8]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
531 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
532 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
533 foreach (@File) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
534 @a=split(/\s+/); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
535 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
536 if ($is_promer ==1) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
537 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
538 push @{ $h{$a[12]}}, "$a[12]\t$a[11]\t$a[7]\t$a[5]\t0\t0\t$a[2]\t$a[3]\t$a[0]\t$a[1]\t1\t$a[5]\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
539 if ($key eq $a[12] and $a[5]>$tmp) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
540 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
541 $tmp=$a[5]; # length |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
542 $tmp_index=$a[0]; # position reference |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
543 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
544 elsif ($key ne $a[12]) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
545 ### here possible bugg... |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
546 $h_max{$tmp_index}=$key; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
547 $key=$a[12]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
548 $tmp=$a[5]; # length |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
549 $tmp_index=$a[0]; # position reference |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
550 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
551 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
552 } #end if |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
553 #else i.e. if nucmer |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
554 else |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
555 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
556 push @{ $h{$a[8]}}, "$a[8]\t$a[6]\t$a[6]\t$a[5]\t0\t0\t$a[2]\t$a[3]\t$a[0]\t$a[1]\t1\t$a[5]\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
557 if ($key eq $a[8] and $a[5]>$tmp) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
558 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
559 $tmp=$a[5]; # length |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
560 $tmp_index=$a[0]; # position reference |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
561 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
562 elsif ($key ne $a[8]) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
563 ### here possible bugg... |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
564 $h_max{$tmp_index}=$key; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
565 $key=$a[8]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
566 $tmp=$a[5]; # length |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
567 $tmp_index=$a[0]; # position reference |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
568 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
569 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
570 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
571 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
572 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
573 $h_max{$tmp_index}=$key; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
574 # print Dumper %h_max; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
575 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
576 return (\%h,\%h_max); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
577 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
578 ################################## |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
579 ########################### |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
580 sub writeBinContigs2Ref{ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
581 my $nameBin = shift; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
582 my $name = shift; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
583 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
584 open (F, "$nameBin") or die "Couldn't find file $nameBin: $!\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
585 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
586 my @ar; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
587 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
588 my $count=0; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
589 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
590 while (<F>) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
591 push @ar, $_; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
592 $count++; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
593 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
594 #### sa4: added error checking:- if file is empty |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
595 if (scalar(@ar) < 1) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
596 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
597 print "No contigs in unusedcontigs file\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
598 $count = 0; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
599 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
600 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
601 else |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
602 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
603 open (F, "> $name.notMapped.contigs.tab") or die "Couldn't write file $name.tab: $!\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
604 print F doArt(\@ar); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
605 close(F); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
606 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
607 return $count; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
608 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
609 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
610 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
611 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
612 ############################## |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
613 sub doArt{ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
614 my ($ref) = @_; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
615 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
616 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
617 ## hash of array with all positions of the contig |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
618 my %Pos; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
619 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
620 ## Hash with note of result line of nucmer |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
621 my %lines; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
622 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
623 foreach (@$ref) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
624 chomp; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
625 my @ar=split(/\t/); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
626 push @{ $Pos{$ar[12]}}, "$ar[0]..$ar[1]"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
627 $lines{$ar[12]} .= "FT $_\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
628 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
629 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
630 my $res; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
631 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
632 foreach my $contig (keys %lines) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
633 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
634 if (scalar(@{ $Pos{$contig} } >1)) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
635 my $tmp; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
636 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
637 foreach (@{ $Pos{$contig} }) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
638 $tmp.="$_,"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
639 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
640 $tmp =~ s/,$//g; # get away last comma |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
641 $res .= "FT contig join($tmp)\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
642 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
643 else { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
644 $res .= "FT contig $Pos{$contig}[0]\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
645 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
646 $res .= "FT /systematic_id=\"$contig\"\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
647 $res .= "FT /note=\"Contig $contig couldn't map perfectly.\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
648 $res .= $lines{$contig}; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
649 $res .= "FT \"\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
650 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
651 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
652 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
653 return $res; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
654 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
655 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
656 ########################################################################## |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
657 #--------------------------- |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
658 sub makeN #creates a string of Ns |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
659 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
660 my $n = shift; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
661 my $Ns= "N"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
662 for (my $i =1; $i < $n; $i+=1) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
663 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
664 $Ns = $Ns."N"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
665 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
666 return $Ns; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
667 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
668 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
669 ########################################################################### |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
670 ## reverse complement a sequence |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
671 #--------------------------------------------- |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
672 sub revComp { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
673 my $dna = shift; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
674 my $revcomp = reverse($dna); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
675 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
676 $revcomp =~ tr/ACGTacgt/TGCAtgca/; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
677 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
678 return $revcomp; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
679 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
680 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
681 ################################################################################ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
682 ### function to visualize rep. regions in Reference genome. |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
683 sub findRepeats |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
684 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
685 my $reference = shift; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
686 my $name = shift; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
687 my $path_prog = shift; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
688 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
689 # get path |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
690 my ($path_coords) = $path_prog; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
691 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
692 $path_coords =~ s/nucmer/show-coords/; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
693 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
694 my $call = "$path_prog --maxmatch -c 100 -b 40 -p $name.repeats -l 25 $reference $reference &> /dev/null "; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
695 !system("$call") or die "Problems doing the nucmer comparison: $call $!\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
696 $call ="$path_coords -r -c -l $name.repeats.delta > $name.repeats.coords "; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
697 !system(" $call") or die "Problems doing the show-coords comparison: $call $!\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
698 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
699 my @Res; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
700 open (F, "$name.repeats.coords" ) or die "Problems to open file $reference.repeats.coords: Is MUMmer installed correctly and inserted in the PATH environment variable? ($!)\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
701 $_=<F>; $_=<F>; $_=<F>; $_=<F>;$_=<F>; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
702 while (<F>) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
703 my @ar = split(/\s+/); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
704 if (!($ar[1] == $ar[4] or $ar[2] == $ar[5] or $ar[7] > 100000)) { # to exclude self alignment |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
705 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
706 foreach ($ar[1]..$ar[2]) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
707 $Res[($_-1)]++; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
708 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
709 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
710 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
711 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
712 ### write the result to the plot file |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
713 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
714 my $res; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
715 foreach (@Res){ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
716 if (defined($_)) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
717 $res .= "$_\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
718 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
719 else { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
720 $res .= "0\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
721 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
722 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
723 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
724 open (F, "> $name.Repeats.plot") or die "Couldn't open file $name.plot to write: $! \n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
725 print F $res; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
726 close(F); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
727 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
728 ### delete files |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
729 unlink("$name.repeats.delta"); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
730 unlink("$name.repeats.coords"); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
731 unlink("$name.repeats.cluster"); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
732 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
733 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
734 ################################################################################ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
735 # reverse a list of qualities |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
736 #------------------------------ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
737 sub reverseQual{ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
738 my $str = shift; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
739 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
740 $str =~ s/\s+$//g; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
741 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
742 my @ar = split(/\s/,$str); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
743 my $res; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
744 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
745 for (my $i=(scalar(@ar)-1);$i>=0;$i--) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
746 $res.="$ar[$i] "; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
747 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
748 return $res; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
749 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
750 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
751 ############################################################################## |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
752 # ---------------- |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
753 sub getPosCoords{ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
754 my $ref_ar = shift; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
755 my $contig = shift; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
756 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
757 my $offset = shift; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
758 my $res; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
759 # print Dumper $$ref_ar{$contig}; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
760 foreach (@{$$ref_ar{$contig}}) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
761 print "in getPos Coords: $_\n";; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
762 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
763 my @ar=split(/\t/); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
764 $ar[6]+=$offset; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
765 $ar[7]+=$offset; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
766 $res .= join("\t",@ar);; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
767 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
768 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
769 return $res; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
770 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
771 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
772 ############################################################################# |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
773 # ----------------------------- |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
774 sub getPosCoordsTurn{ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
775 my $ref_ar = shift; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
776 my $contig = shift; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
777 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
778 my $offset = shift; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
779 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
780 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
781 my $res; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
782 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
783 # print Dumper $$ref_ar{$contig}; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
784 foreach (@{$$ref_ar{$contig}}) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
785 my @ar=split(/\t/); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
786 my $tmp_8=$ar[8]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
787 my $tmp_9=$ar[9]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
788 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
789 $ar[8]=$ar[6]+$offset; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
790 $ar[9]=$ar[7]+$offset; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
791 $ar[6]=$tmp_8; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
792 $ar[7]=$tmp_9; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
793 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
794 ## change query subject |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
795 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
796 $res .= join("\t",@ar);; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
797 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
798 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
799 return $res; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
800 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
801 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
802 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
803 ############################################################################ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
804 #------------------------ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
805 sub printStats{ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
806 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
807 my ($num_fortillingcontigs,$num_notsetTilling,$num_mapped, $num_contigs, $num_inComparisoncontigs, $ref_len, $total_bases_mpd) = @_; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
808 $num_fortillingcontigs=$num_notsetTilling+$num_mapped; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
809 my $res; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
810 $res.= "Short statistics of run.\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
811 $res.= "$num_contigs\t\tcontigs entered to be mapped against the reference.\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
812 $res.= sprintf("$num_inComparisoncontigs\t%0.2f \%\tmade a hit against the reference to the given parameter (-s -d etc)\n",($num_inComparisoncontigs*100/$num_contigs)); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
813 $res.= sprintf("$num_fortillingcontigs\t%0.2f \%\twere considered for the tilling graph (-s -d etc)\n",($num_fortillingcontigs*100/$num_contigs)); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
814 $res.= sprintf("$num_mapped\t%0.2f \%\tare mapped in the tilling graph (-s -d etc)\n",($num_mapped*100/$num_contigs)); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
815 $res.= sprintf("\nCoverage: The reference is $ref_len long. Up to $total_bases_mpd bp (%0.2f \%) are covered by the contigs (This doesn't mean that these regions are really similar...)\n",($total_bases_mpd*100/$ref_len)); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
816 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
817 print $res; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
818 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
819 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
820 ################################################## |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
821 #### Do Tiling |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
822 #---------------------------------------------------- |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
823 sub doTiling { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
824 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
825 my ($mummer_tiling, $path_toPass, $path_dir,$reference, $query_file, $choice, $prefix,$mlfas, $fasta_bin, $avoid_Ns, $ref_len, $gaps_2file, $ref_inline, $add_bin_2ps, $pick_primer, $flank, $chk_uniq, $run_blast) = @_; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
826 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
827 ### these are also defined in the main script.... to be changed!! |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
828 my ($num_contigs , $num_inbincontigs, $avg_cont_size,$num_overlaps , $num_gaps, |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
829 $num_mapped,$total_bases_mpd,$p_ref_covered,$num_ambigus,$num_inComparisoncontigs, |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
830 $num_fortillingcontigs,$num_notsetTilling)= (0,0,0,0,0,0,0,0,0,0,0,0); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
831 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
832 my ($href, $ref_contigs_qual) = hash_contigs($query_file); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
833 my $qualAvailable=0; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
834 my %contigs_hash = %{$href}; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
835 my @c_keys = keys %contigs_hash; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
836 $num_contigs = scalar(@c_keys); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
837 my @cont_lens; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
838 my (@ids ,$id, $id_len); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
839 my (@Rs, @Re, @G, @Len, @cov, @pid, @orient, @Cid); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
840 my (@Ps, @Pe); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
841 my ($total); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
842 my $g; #define gap size between contigs |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
843 my $tiling_gap; #gap size from tiling graph |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
844 open (TIL, $mummer_tiling) or die "Could not open $mummer_tiling: $!"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
845 while (<TIL>) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
846 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
847 chomp; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
848 if ($_ =~/^>/) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
849 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
850 my $line = substr $_, 1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
851 my @splits = split /\s+/, $line; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
852 $id = $splits[0]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
853 push @ids, $id; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
854 $id_len= $splits[1]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
855 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
856 else |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
857 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
858 my @splits = split /\s+/, $_; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
859 push @Rs, $splits[0]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
860 push @Re, $splits[1]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
861 push @G, $splits[2]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
862 push @Len, $splits[3]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
863 push @cov, $splits[4]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
864 push @pid, $splits[5]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
865 push @orient, $splits[6]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
866 push @Cid, $splits[7]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
867 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
868 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
869 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
870 close (TIL); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
871 if (scalar(@Rs) != scalar(@Re)) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
872 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
873 print "ERROR: unequal array size\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
874 exit; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
875 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
876 else |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
877 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
878 $total = scalar(@Rs); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
879 $num_mapped = scalar(@Rs); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
880 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
881 my $ref_loc = $reference; # get locations of reference and query files |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
882 my $qry_loc = $query_file; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
883 my $dif_dir =0; #assume query and reference are in the working directory |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
884 my @splits_reference = split (/\//, $reference); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
885 my $new_reference_file = $splits_reference[(scalar(@splits_reference)-1)]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
886 my @splits_query = split (/\//, $query_file); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
887 my $new_query_file = $splits_query[(scalar(@splits_query)-1)]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
888 if ($prefix eq "") |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
889 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
890 $prefix = $new_query_file."_".$new_reference_file; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
891 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
892 #------------------------------------------------------------------- |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
893 #define file handles for output files and open files to write output |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
894 #------------------------------------------------------------------- |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
895 my ($seqFH,$tabFH,$binFH,$crunchFH, $gapFH, $mlFH, $dbinFH, $avoidNFH); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
896 open ($seqFH, '>', $prefix . '.fasta') or die "Could not open file $prefix.fasta for write: $!\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
897 open ($tabFH, '>', $prefix . '.tab') or die "Could not open file $prefix.tab for write: $!\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
898 open ($binFH, '>', $prefix . '.bin') or die "Could not open file $prefix.bin for write: $!\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
899 open ($crunchFH, '>', $prefix . '.crunch') or die "Could not open file $prefix.crunch for write: $!\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
900 open ($gapFH, '>', $prefix . '.gaps') or die "Could not open file $prefix.gaps for write: $!\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
901 if ($mlfas ==1) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
902 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
903 open ($mlFH, '>', $prefix . '.contigs.fas') or die "Could not open file $prefix.contigs.fas for write: $!\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
904 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
905 if ($fasta_bin ==1) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
906 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
907 open ($dbinFH, '>', $prefix . '.contigsInbin.fas') or die "Could not open file $prefix.contigsInbin.fas for write: $!\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
908 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
909 if ($avoid_Ns ==1) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
910 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
911 open ($avoidNFH, '>', $prefix .'.NoNs.fasta') or die "Could not open file $prefix.NoNs.fasta for write: $!\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
912 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
913 #------------------------------------------------------------------------- |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
914 # Writing tiling graph and generating a pseudomolecule |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
915 # Note use use ps for pseudomolecule |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
916 #@Ps = start of ps, and @Pe = end of ps |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
917 my $ps_start =1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
918 $Ps[0] = 1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
919 $Pe[0] = $Ps[0] + $Len[0] -1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
920 my $tmp_qual; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
921 my $tmp_nqual; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
922 my $tmp_seq =""; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
923 my $tmp_nseq =""; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
924 print "Total contigs = $total \n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
925 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
926 #------------------------------------------------------------ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
927 # The 'for loop' loops over each contig in the Tiling output |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
928 #Writing to file is done for each contig to speed up the process |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
929 #This part could potentially be a separate subroutine |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
930 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
931 print $tabFH "ID ",$id, "\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
932 print $seqFH ">", "ordered_", $id, "\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
933 for (my $i=1; $i <= $total; $i+=1) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
934 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
935 my $covv =sprintf("%.0f",$cov[$i -1]); #ROUNDING |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
936 my $pidd = sprintf("%.0f", $pid[$i -1]); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
937 my ($contig_coord, $color, $contig_seq); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
938 my $contig_qual=''; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
939 $tiling_gap = $G[$i -1]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
940 if ($tiling_gap <= 5){ #insert 100Ns for overlaps and gaps of size less than or equal to 5bp |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
941 $g = 99; # default gap size to |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
942 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
943 else{ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
944 $g = $tiling_gap; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
945 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
946 if (defined($Len[$i])) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
947 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
948 $Ps[$i] = $Pe[$i-1] +$g +1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
949 $Pe[$i] = $Ps[$i] + $Len[$i] -1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
950 $total_bases_mpd+=$Len[$i]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
951 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
952 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
953 if ($Rs[$i -1] <0) #check if a reference starting position is less than 0 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
954 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
955 $Rs[$i -1] =1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
956 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
957 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
958 if($orient[$i-1] eq "+") |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
959 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
960 $contig_coord = $Ps[$i -1]."..".$Pe[$i-1]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
961 $color = 4; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
962 $contig_seq = $contigs_hash{$Cid[$i-1]}; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
963 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
964 else |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
965 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
966 $contig_coord = "complement(".$Ps[$i -1]."..".$Pe[$i-1].")"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
967 $color =3; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
968 $contig_seq = revComp($contigs_hash{$Cid[$i-1]}); #REVERSE COMPLEMENT A SEQUENCE |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
969 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
970 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
971 push (@cont_lens, length($contig_seq)); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
972 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
973 # tdo |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
974 if (defined($$ref_contigs_qual{$Cid[$i-1]})) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
975 ## flag to know, that the qual exists |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
976 $qualAvailable=1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
977 $contig_qual = $$ref_contigs_qual{$Cid[$i-1]}; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
978 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
979 $tmp_qual .= $contig_qual; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
980 $tmp_seq .= $contig_seq; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
981 if ($avoid_Ns ==1) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
982 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
983 $tmp_nseq.= $contig_seq; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
984 #tdo |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
985 $tmp_nqual .= $contig_qual; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
986 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
987 if ($mlfas ==1) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
988 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
989 my $head = $Cid[$i-1]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
990 my $multifasta_seq = write_Fasta_headers ($contig_seq,$head); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
991 print $mlFH $multifasta_seq; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
992 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
993 if ($Re[$i -1] > $ref_len) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
994 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
995 $Re[$i -1] = $ref_len -1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
996 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
997 if ($Pe[$i -1] > length($tmp_seq)) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
998 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
999 $Pe[$i -1] = length($tmp_seq); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1000 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1001 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1002 #----------------------------------------- |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1003 print $crunchFH $covv, " ", $pidd, " ", $Ps[$i -1], " ", $Pe[$i -1], " ", $Cid[$i -1], " ", $Rs[$i -1], " ", $Re[$i-1], " ", "unknown NONE\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1004 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1005 #WRITE FEATURE FILE |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1006 print $tabFH "FT contig ",$contig_coord, "\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1007 print $tabFH "FT ", "/systematic_id=\"", $Cid[$i-1],"\"","\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1008 print $tabFH "FT ", "/method=\"", "mummer\"", "\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1009 print $tabFH "FT ", "/Contig_coverage=\"",$cov[$i -1], "\"", "\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1010 print $tabFH "FT ", "/Percent_identity=\"",$pid[$i -1], "\"", "\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1011 if ($tiling_gap > 1) #WRITE GAP LOCATIONS AND SIZE TO FILE |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1012 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1013 my $gap_start = $Pe[$i -1] +1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1014 my $gap_end = ""; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1015 if (defined $Ps[$i]) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1016 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1017 $gap_end = $Ps[$i] -1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1018 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1019 my $ref_start = $Re[$i -1] +1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1020 my $ref_end; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1021 if (defined $Rs[$i]) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1022 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1023 $ref_end =$Rs[$i]-1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1024 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1025 else |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1026 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1027 $ref_end = "END"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1028 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1029 print $gapFH "Gap\t",$tiling_gap, "\t", $gap_start, "\t", $gap_end, "\t", $ref_start, "\t", $ref_end,"\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1030 if ($gaps_2file ne "" && $ref_start < $ref_len) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1031 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1032 my $ref_gapsFH; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1033 open ($ref_gapsFH, '>', $gaps_2file.'.Gaps_onRef') or die "Could not open file $gaps_2file.Gaps_onRef for write: $!\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1034 my $gapOnref = substr ($ref_inline, $ref_start, $g); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1035 print $ref_gapsFH ">",$g,"_",$ref_start, "\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1036 my $file_toPrint = write_Fasta ($gapOnref); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1037 print $ref_gapsFH $file_toPrint; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1038 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1039 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1040 else |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1041 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1042 $color = 5; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1043 print $tabFH "FT ", "/Overlapping=\"", "YES\"", "\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1044 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1045 my $ns = makeN($g); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1046 $tmp_seq = $tmp_seq.$ns; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1047 #tdo |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1048 for (1..length($ns)) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1049 $tmp_qual .= "0 "; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1050 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1051 print $tabFH "FT ", "/colour=\"",$color, "\"", "\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1052 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1053 #------------------------------------------------------------------ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1054 #tdo |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1055 my @Quality_Array; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1056 if ($qualAvailable) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1057 @Quality_Array = split(/\s/,$tmp_qual); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1058 my $res; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1059 foreach (@Quality_Array) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1060 $res .= "$_\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1061 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1062 ## get name |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1063 my @splits_query = split (/\//, $query_file); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1064 $new_query_file = $splits_query[(scalar(@splits_query)-1)]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1065 open (F,"> $new_query_file.qual.plot") or die "problems\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1066 print F $res; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1067 close(F); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1068 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1069 ##WRITE PSEUDOMOLECULE WITHOUT 'N's |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1070 #-------------------------------------- |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1071 if ($avoid_Ns ==1) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1072 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1073 print $avoidNFH ">", "ordered_", $id, "without 'N's","\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1074 my $toWrite = write_Fasta ($tmp_nseq); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1075 print $avoidNFH $toWrite; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1076 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1077 #################################### |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1078 #WRITE CONTIGS WITH NO HIT TO FILE # |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1079 ################################# |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1080 my %Cids; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1081 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1082 foreach(@Cid) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1083 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1084 chomp; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1085 $Cids{$_} = 1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1086 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1087 my @contigs_2bin = (); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1088 my %h_contigs_2bin; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1089 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1090 foreach (@c_keys) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1091 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1092 push(@contigs_2bin, $_) unless exists $Cids{$_}; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1093 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1094 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1095 foreach(@contigs_2bin) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1096 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1097 $h_contigs_2bin{$_}=1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1098 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1099 print $binFH "$_ \n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1100 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1101 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1102 $num_inbincontigs= scalar(@contigs_2bin); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1103 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1104 ######## |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1105 # WRITE PSEUDOMOLECULE TO FILE |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1106 #---------------------------------- |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1107 my $new_seq = $tmp_seq; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1108 my $prev_len = length($tmp_seq); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1109 my $total_len = $prev_len; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1110 foreach (@contigs_2bin) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1111 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1112 chomp; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1113 #my $binseq = $contigs_hash{$contigs_2bin[$i]}; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1114 my $l = length ($contigs_hash{$_}); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1115 $total_len +=$l; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1116 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1117 if ($add_bin_2ps ==1) #appending unmapped contigs to pseudomolecule |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1118 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1119 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1120 for (my $i =0; $i < scalar(@contigs_2bin); $i+=1) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1121 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1122 my $binseq = $contigs_hash{$contigs_2bin[$i]}; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1123 $new_seq .=$contigs_hash{$contigs_2bin[$i]}; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1124 my $len_current_contig = length($binseq); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1125 my $start = $prev_len +1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1126 my $end = $start + $len_current_contig -1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1127 my $col = 7; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1128 if ($start > $total_len) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1129 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1130 $start = $total_len; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1131 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1132 if ($end >$total_len) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1133 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1134 $end = $total_len; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1135 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1136 my $co_cord = $start."..".$end; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1137 my $note = "NO_HIT"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1138 print $tabFH "FT contig ",$co_cord, "\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1139 print $tabFH "FT ", "/systematic_id=\"", $contigs_2bin[$i],"\"","\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1140 print $tabFH "FT ", "/method=\"", "mummer\"", "\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1141 print $tabFH "FT ", "/colour=\"",$col, "\"", "\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1142 print $tabFH "FT ", "/", $note, "\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1143 $prev_len= $end; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1144 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1145 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1146 my $to_write = write_Fasta ($new_seq); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1147 print $seqFH $to_write; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1148 ######## |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1149 #WRITE CONTIGS IN BIN TO FILE # |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1150 #------------------------------------------------------ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1151 if ($fasta_bin ==1) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1152 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1153 foreach(@contigs_2bin) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1154 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1155 print $dbinFH ">", $_, "\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1156 my $to_write = write_Fasta($contigs_hash{$_}); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1157 print $dbinFH $to_write; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1158 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1159 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1160 #unlink ("$choice.delta"); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1161 #unlink ("$choice.filtered.delta"); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1162 #unlink ("$choice.cluster"); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1163 #unlink ("$choice.tiling"); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1164 #PRINT FINAL MESSAGE |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1165 print " FINISHED CONTIG ORDERING\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1166 print "\nTo view your results in ACT\n\t\t Sequence file 1: $new_reference_file\n\t\t Comparison file 1: $prefix.crunch\n\t\t Sequence file 2: $prefix.fasta\n |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1167 \t\tACT feature file is: $prefix.tab\n |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1168 \t\tContigs bin file is: $prefix.bin\n |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1169 \t\tGaps in pseudomolecule are in: $prefix.gaps\n\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1170 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1171 #Run tblastx.... |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1172 if ($run_blast ==1) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1173 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1174 print "Running tblastx on contigs in bin...\nThis may take several minutes ...\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1175 my $formatdb = 'formatdb -p F -i' ; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1176 # my @formating = ` |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1177 !system("$formatdb $new_reference_file") or die "ERROR: Could not find 'formatdb' for blast\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1178 my $blast_opt = 'blastall -m 9 -p tblastx -d '; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1179 my $contigs_inBin = $prefix.'.contigsInbin.fas'; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1180 # my @bigger_b = ` |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1181 !system("$blast_opt $new_reference_file -i $contigs_inBin -o blast.out") or die "ERROR: Could not find 'blastall' , please install blast in your working path (other dir==0)\n$blast_opt $new_reference_file -i $contigs_inBin -o blast.out\n \n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1182 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1183 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1184 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1185 if ($pick_primer == 1) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1186 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1187 print " DESIGNING PRIMERS FOR GAP CLOSURE...\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1188 my $qq = "$prefix.fasta"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1189 pickPrimers($qq, $reference, $flank, $path_toPass, $chk_uniq,$qualAvailable,@Quality_Array); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1190 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1191 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1192 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1193 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1194 #------------------------------ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1195 sub write_Fasta { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1196 my $sequence = shift; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1197 my $fasta_seq =""; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1198 my $length = length($sequence); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1199 if ($length <= 60) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1200 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1201 $fasta_seq = $sequence ; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1202 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1203 elsif ($length> 60 ) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1204 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1205 for (my $i =0; $i < $length; $i+=60) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1206 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1207 my $tmp_s = substr $sequence, $i, 60; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1208 $fasta_seq .= $tmp_s."\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1209 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1210 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1211 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1212 return $fasta_seq; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1213 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1214 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1215 sub write_Fasta_headers { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1216 my $sequence = shift; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1217 my $header = shift; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1218 my $fasta_seq =">$header\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1219 my $length = length($sequence); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1220 if ($length <= 60) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1221 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1222 $fasta_seq.= $sequence ; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1223 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1224 elsif ($length> 60 ) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1225 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1226 for (my $i =0; $i < $length; $i+=60) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1227 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1228 my $tmp_s = substr $sequence, $i, 60; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1229 $fasta_seq .= $tmp_s."\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1230 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1231 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1232 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1233 return $fasta_seq; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1234 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1235 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1236 #---------------------------------------------- END OF CONTIG ORDERING SUBROUTINES---------------------------------------------------- |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1237 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1238 #----------------------------------------------- PRIMER DESIGN --------------------------------------------------- |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1239 sub pickPrimers |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1240 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1241 #$ps = pseudo molecule,$rf = reference, $flan = flanking region size |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1242 my ($ps,$rf, $flan, $passed_path, $chk_uniq,$qualAvailable, @Quality_Array); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1243 if (@_==4){ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1244 ($rf,$ps, $flan, $chk_uniq) = @_; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1245 print "Primers without ordering..\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1246 print $rf; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1247 $passed_path = "nucmer"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1248 $qualAvailable =0; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1249 @Quality_Array = []; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1250 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1251 else #(@_ == 7) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1252 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1253 ($ps,$rf, $flan, $passed_path, $chk_uniq, $qualAvailable, @Quality_Array) = @_; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1254 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1255 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1256 my $dna=''; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1257 my @gappedSeq; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1258 my $records=''; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1259 my @sequence; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1260 my $input=''; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1261 #tdo |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1262 my @gappedQual; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1263 #my $quality=''; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1264 my $path_toPass = $passed_path; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1265 my @fasta; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1266 my $query=''; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1267 my @exc_regions; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1268 my $ch_name; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1269 #my $flank = $flan; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1270 open (FH, $rf) or die "Could not open reference file\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1271 open (FH2, $ps) or die "Could not open query/pseudomolecule file\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1272 my $ref; #print ".... ", $rf; exit; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1273 my @r = <FH>; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1274 my @qry = <FH2>; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1275 my $dn = join ("", @qry); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1276 $ref = join ("", @r); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1277 $dna = Fasta2ordered ($dn); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1278 #check if primer3 is installed |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1279 my $pr3 = "primer3_core"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1280 my ($pr3_path, $pr3_Path, $pr3_path_dir) = checkProg ($pr3); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1281 #my @check_prog = `which primer3_core`; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1282 open (PRI, '>primer3.summary.out') or die "Could not open file for write\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1283 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1284 # |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1285 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1286 #print $ref; exit; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1287 #PARSING FOR PRIMER3 INPUT |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1288 my ($opt,$min,$max,$optTemp,$minTemp,$maxTemp,$flank,$lowRange,$maxRange,$gcMin,$gcOpt,$gcMax,$gclamp,$exclude,$quality) = getPoptions($qualAvailable); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1289 my ($gap_position,@positions, %seq_hash); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1290 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1291 my $exc1 = $flank -$exclude; #start of left exclude |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1292 print "Please wait... extracting target regions ...\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1293 #regular expression extracts dna sequence before and after gaps in sequence (defined by N) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1294 while($dna=~ /([atgc]{$flank,$flank}N+[atgc]{$flank,$flank})/gi) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1295 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1296 $records= $1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1297 push (@gappedSeq, $records); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1298 $gap_position = index($dna, $records); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1299 push @positions, $gap_position; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1300 $seq_hash{$gap_position}=$records; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1301 #dna |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1302 if ($qualAvailable) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1303 my $res; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1304 for (my $nn=($gap_position-1); $nn <= ($gap_position-1+length($records)-1); $nn++) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1305 $res.="$Quality_Array[$nn] "; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1306 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1307 push @gappedQual, $res; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1308 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1309 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1310 #loop prints out primer targets into a file format accepted by primer3 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1311 my $count=1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1312 my $identify=''; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1313 my $seq_num = scalar @gappedSeq; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1314 my $name= " "; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1315 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1316 my ($totalp, @left_name, @right_name, @left_seq, @right_seq); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1317 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1318 my ($leftP_names, $rightP_names, $leftP_seqs, $rightP_seqs, $leftP_start, $leftP_lens, $rightP_ends, $rightP_lens,$left_Exclude,$right_Exclude, $primers_toExc, $prod_size)= |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1319 ("","","","","","","","","","", "", ""); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1320 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1321 print $seq_num, " gaps found in target sequence\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1322 print "Please wait...\nLooking for primers...\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1323 print "Running Primer3 and checking uniquness of primers...\nCounting left and right primer hits from a nucmer mapping (-c 15 -l 15)\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1324 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1325 for (my $i=0; $i<$seq_num; $i+=1) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1326 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1327 $identify = $count++; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1328 if (defined $ch_name) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1329 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1330 $name = $ch_name; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1331 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1332 my $len = length($gappedSeq[$i]); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1333 my $exc2 = $len - $flank; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1334 open(FILE, '>data') or die "Could not open file\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1335 #tdo |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1336 my $qual=''; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1337 if ($qualAvailable) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1338 $qual="PRIMER_SEQUENCE_QUALITY=$gappedQual[$i]\nPRIMER_MIN_QUALITY=$quality\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1339 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1340 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1341 #WARNING: indenting the following lines may cause problems in primer3 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1342 print FILE "PRIMER_SEQUENCE_ID=Starting_Pos $positions[$i] |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1343 SEQUENCE=$gappedSeq[$i] |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1344 PRIMER_OPT_SIZE=$opt |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1345 PRIMER_MIN_SIZE=$min |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1346 PRIMER_MAX_SIZE=$max |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1347 PRIMER_OPT_TM=$optTemp |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1348 PRIMER_MIN_TM=$minTemp |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1349 PRIMER_MAX_TM=$maxTemp |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1350 PRIMER_NUM_NS_ACCEPTED=1 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1351 PRIMER_PRODUCT_SIZE_RANGE=$lowRange-$maxRange |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1352 PRIMER_MIN_GC=$gcMin |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1353 PRIMER_GC_CLAMP =$gclamp |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1354 PRIMER_OPT_GC_PERCENT=$gcOpt |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1355 PRIMER_MAX_GC=$gcMax |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1356 PRIMER_INTERNAL_OLIGO_EXCLUDED_REGION=$exc1,$exclude $exc2,$exclude |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1357 ".$qual."Number To Return=1 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1358 =\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1359 close FILE; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1360 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1361 #runs primer3 from commandline |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1362 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1363 ################# NOTE: PRIMER3 SHOULD BE IN YOUR WORKING PATH ######### |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1364 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1365 my @Pr3_output = `$pr3_path -format_output <data`; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1366 #print $positions[$i], "\t", $i, " ", $path_toPass, " ", $rf, $exc1, " ",$exc2, "\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1367 my $fil = join (":%:", @Pr3_output); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1368 my ($uniq_primer, $string,$left_nm,$right_nm,$left_sq, $right_sq,$left_strt,$left_ln, $right_End,$right_ln,$primers_toExclude, $product_size) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1369 = check_Primers ($fil, $positions[$i], $i,$path_toPass, $rf, $exc1, $exc2); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1370 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1371 print PRI $string; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1372 if ($uniq_primer ==1) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1373 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1374 $leftP_names.=$left_nm."\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1375 $rightP_names.=$right_nm."\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1376 $leftP_seqs.=$left_sq."\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1377 $rightP_seqs.=$right_sq."\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1378 $leftP_start.=$left_strt."\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1379 $leftP_lens.=$left_ln."\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1380 $rightP_ends.=$right_End."\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1381 $rightP_lens.=$right_ln."\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1382 $left_Exclude.=$exc1."\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1383 $right_Exclude.=$exc2."\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1384 $prod_size.=$product_size."\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1385 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1386 if ($primers_toExclude ne "") |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1387 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1388 $primers_toExc.= $primers_toExclude; #."\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1389 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1390 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1391 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1392 write_Primers ($leftP_names, $rightP_names, $leftP_seqs, $rightP_seqs, $leftP_start, $leftP_lens, $rightP_ends, $rightP_lens,$primers_toExc,$left_Exclude,$right_Exclude, $prod_size); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1393 #write_Primers (@left_name, @right_name, @left_seq, @right_seq,@left_start, @left_len, @right_end, @right_len, @left_exclude, @right_exclude, $primers_toExclude); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1394 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1395 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1396 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1397 #checks the uniqueness of primers |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1398 #input an array with promer3 output for each gap |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1399 sub check_Primers |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1400 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1401 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1402 my ($fil, $position, $index,$path_toPass, $rf, $exc1, $exc2) = @_; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1403 my @Pr3_output = split /:%:/, $fil; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1404 my ($left_name, $right_name, $left_seq, $right_seq, $left_start,$left_len,$right_end,$right_len,$left_exclude,$right_exclude) = ("", "", "", "", "", "", "", "", "", ""); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1405 my $primers_toExclude =""; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1406 my $product_size =""; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1407 my $string =""; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1408 my $uniq_primer = 0; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1409 $string.="=========================================================================================\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1410 $string.="Primer set for region starting at ".$position."\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1411 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1412 if (defined $Pr3_output[5] && defined $Pr3_output[6]) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1413 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1414 if ($Pr3_output[5]=~ /LEFT PRIMER/) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1415 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1416 # print $Pr3_output[5]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1417 #check uniquness of primer against the genome |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1418 my @splits_1 = split (/\s+/, $Pr3_output[5]); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1419 my $left_primer = $splits_1[8]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1420 my $left_st = $splits_1[2]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1421 my $left_length = $splits_1[3]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1422 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1423 my @splits_2 = split (/\s+/, $Pr3_output[6]); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1424 my $right_primer = $splits_2[8]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1425 my $right_st = $splits_2[2]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1426 my $right_length = $splits_2[3]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1427 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1428 open (QRY_1, '>./left_query'); # open a file for left primers |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1429 print QRY_1 ">left_01\n"; # |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1430 print QRY_1 $left_primer,"\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1431 open (QRY_2, '>./right_query'); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1432 print QRY_2 ">right_01\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1433 print QRY_2 $right_primer,"\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1434 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1435 my ($left_count, $right_count); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1436 #if ($chk_uniq eq "nucmer") |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1437 #{ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1438 my $options = "-c 15 --coords -l 15 "; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1439 my $rq = "right_query"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1440 my $lq = "left_query"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1441 my (@right_ps, @left_ps); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1442 # print $path_toPass, "\t", $options, "\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1443 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1444 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1445 my @Rrun = `$path_toPass $options -p R $rf $rq &> /dev/null`; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1446 print "."; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1447 my $f1 = "R.coords"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1448 open (RP, $f1) or die "Could not open file $f1 while checking uniqueness of right primer\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1449 while (<RP>) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1450 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1451 chomp; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1452 if ($_ =~ /right_01$/) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1453 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1454 push @right_ps, $_; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1455 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1456 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1457 close (RP); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1458 my @Lrun = `$path_toPass $options -p L $rf $lq &> /dev/null`; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1459 print "."; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1460 my $f2 = "L.coords"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1461 open (LQ, $f2) or die "Could not open file $f2\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1462 while (<LQ>) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1463 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1464 chomp; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1465 if ($_ =~ /left_01$/) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1466 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1467 push @left_ps, $_; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1468 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1469 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1470 close (LQ); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1471 $right_count = scalar (@right_ps); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1472 $left_count = scalar(@left_ps); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1473 #check if a primer is not in the excluded region:: |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1474 my $primer_NearEnd =0; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1475 if ($left_st > $exc1 || $right_st < $exc2) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1476 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1477 $primer_NearEnd = 1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1478 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1479 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1480 if ($left_count < 2 && $right_count<2 && $primer_NearEnd ==0) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1481 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1482 $string.=$left_count."\t".$Pr3_output[5]."\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1483 $string.=$right_count."\t".$Pr3_output[6]."\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1484 $string.="***************************** PRIMER3 OUTPUT **************************\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1485 foreach (@Pr3_output) {$string.=$_;} |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1486 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1487 my @prod_size_split = split /\s+/, $Pr3_output[10]; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1488 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1489 $product_size = substr($prod_size_split[2], 0, -1); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1490 $left_name = $position; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1491 $right_name = $position; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1492 my $lp_uc = uc ($left_primer); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1493 my $rp_uc = uc($right_primer); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1494 #print $left_count, "..", $right_count, "\t"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1495 $left_seq = $lp_uc; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1496 $right_seq= $rp_uc; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1497 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1498 $left_start= $left_st; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1499 $left_len = $left_length; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1500 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1501 $right_end = $right_st; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1502 $right_len = $right_length; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1503 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1504 $left_exclude = $exc1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1505 $right_exclude =$exc2; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1506 $uniq_primer =1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1507 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1508 else |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1509 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1510 if ($primer_NearEnd ==1) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1511 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1512 $string.="One of the oligos is near the end of a contig\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1513 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1514 else |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1515 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1516 $string.="Primer set not unique\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1517 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1518 $primers_toExclude.=">L.".$position."\n".$left_primer."\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1519 $primers_toExclude.=">R.".$position."\n".$right_primer."\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1520 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1521 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1522 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1523 else |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1524 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1525 $string.="No Primers found\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1526 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1527 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1528 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1529 return ($uniq_primer, $string,$left_name,$right_name,$left_seq, $right_seq,$left_start,$left_len, $right_end,$right_len,$primers_toExclude, $product_size); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1530 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1531 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1532 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1533 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1534 ###------------------------------------ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1535 # Writes primers and their regions to file |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1536 sub write_Primers { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1537 my ($leftP_names, $rightP_names, $leftP_seqs, $rightP_seqs, $leftP_start, $leftP_lens, $rightP_ends, $rightP_lens,$primers_toExclude,$left_Exclude,$right_Exclude, $product_sizes) = @_; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1538 my (@left_name, @right_name, @left_seq, @right_seq, @left_start, @left_len, @right_end, @right_len, @left_exclude, @right_exclude, @product_size); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1539 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1540 #open files to read |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1541 @left_name = split /\n/, $leftP_names; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1542 @right_name= split /\n/, $rightP_names; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1543 @left_seq = split /\n/, $leftP_seqs; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1544 @right_seq = split /\n/, $rightP_seqs; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1545 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1546 @left_start = split /\n/, $leftP_start; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1547 @left_len = split /\n/, $leftP_lens; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1548 @right_end = split/\n/, $rightP_ends; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1549 @right_len = split /\n/, $rightP_lens; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1550 @left_exclude = split /\n/, $left_Exclude; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1551 @right_exclude = split /\n/,$right_Exclude; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1552 @product_size = split /\n/, $product_sizes; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1553 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1554 my $primers_withSize =""; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1555 open (SEN, '>sense_primers.out') or die "Could not open file for write\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1556 open (ASEN, '>antiSense_primers.out') or die "Could not open file for write\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1557 open (REG_1, '>sense_regions.out') or die "Could not open file for write\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1558 open (REG_2, '>antiSense_regions.out') or die "Could not open file for write\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1559 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1560 if ($primers_toExclude ne "") |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1561 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1562 open (PEX, '>primers_toExclude.out') or die "Could not open file for write\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1563 print PEX $primers_toExclude; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1564 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1565 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1566 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1567 my $totalp = scalar (@left_name); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1568 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1569 #print $totalp, "\n"; exit; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1570 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1571 my $well_pos; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1572 my $max_plates = ceil($totalp/96); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1573 #print "MAX Ps ", $max_plates, "\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1574 my $plate=1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1575 my $sen =""; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1576 my $asen =""; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1577 my $plate_counter =0; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1578 my $wells = 96; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1579 for (my $index =0; $index < $totalp; $index += $wells) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1580 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1581 my $do = $index; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1582 my $upper_bound= $index + $wells; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1583 if ($upper_bound > $totalp) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1584 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1585 $upper_bound = $totalp; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1586 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1587 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1588 for (my $j=$index; $j <= ($upper_bound-1); $j+=1) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1589 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1590 my $i = $j; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1591 if ($j < 96) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1592 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1593 $well_pos = get_WellPosition ($j); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1594 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1595 else |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1596 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1597 $well_pos = get_WellPosition ($j - $wells) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1598 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1599 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1600 #$primers_withSize.=$product_size[$i]."\t"."Plate_".$plate. "\t\tS.".$i."\tS.".$left_name[$i]."\t". |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1601 print SEN "Plate_".$plate, "\t\t","S.", $i, "\tS.", $left_name[$i], "\t", $left_seq[$i], "\t\t+", "\t", $well_pos, "\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1602 print ASEN "Plate_".$plate, "\t\t","AS.", $i, "\tAS.", $right_name[$i], "\t", $right_seq[$i], "\t\t-","\t", $well_pos,"\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1603 print REG_1 "Plate_".$plate, "\t\t","S.", $i, "\t", $left_start[$i], "\t", $left_len[$i], "\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1604 print REG_2 "Plate_".$plate, "\t\t","AS.", $i, "\t", $right_end[$i], "\t",$right_len[$i], "\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1605 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1606 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1607 $plate +=1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1608 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1609 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1610 #delete tmp. files |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1611 #my $rm = "rm -f"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1612 system ("rm -f data left_query right_query R.delta R.cluster R.coords L.delta L.cluster L.coords"); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1613 print "\nPRIMER DESIGN DONE\n\n"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1614 # end of primer design program |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1615 }#// |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1616 ##### |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1617 # returns a well position for oligos |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1618 sub get_WellPosition{ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1619 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1620 my $j = shift; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1621 my $well_pos; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1622 if ($j < 12) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1623 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1624 $well_pos = "a".($j+1); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1625 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1626 elsif ($j>11 && $j<24) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1627 $well_pos = "b". (($j+1) -12); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1628 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1629 elsif ($j>23 && $j<36) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1630 $well_pos = "c". (($j+1) -24); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1631 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1632 elsif ($j>35 && $j<48) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1633 $well_pos = "d". (($j+1) - 36); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1634 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1635 elsif($j>47 && $j<60) { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1636 $well_pos = "e". (($j+1) -48); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1637 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1638 elsif ($j>59 && $j<72) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1639 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1640 $well_pos = "f". (($j+1) - 60); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1641 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1642 elsif ($j>71 && $j< 84) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1643 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1644 $well_pos = "g". (($j+1) - 72); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1645 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1646 elsif ($j>83 && $j<96) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1647 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1648 $well_pos = "h". (($j+1) - 84); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1649 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1650 return $well_pos; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1651 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1652 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1653 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1654 #################################################################### |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1655 #get options for primer design |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1656 #---------------------- |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1657 sub getPoptions{ |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1658 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1659 my $qualAvailable = shift; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1660 #### USER INPUTS ########## |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1661 #ask for optimum primer size |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1662 print "\nEnter Optimum Primer size (default 20 bases):"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1663 my $opt=<STDIN>; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1664 chomp $opt; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1665 if($opt eq '') |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1666 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1667 $opt = 20; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1668 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1669 #ask for minimum primer size |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1670 print "\nEnter Minimum Primer size (default 18 bases):"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1671 my $min=<STDIN>; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1672 chomp $min; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1673 if($min eq '') |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1674 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1675 $min = 18; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1676 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1677 #ask for maximum primer size |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1678 print "\nEnter Maximum Primer size (default 27 bases):"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1679 my $max= <STDIN>; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1680 chomp $max; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1681 if($max eq '') |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1682 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1683 $max= 27; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1684 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1685 #ask for optimum primer temperature |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1686 print "\nEnter Optimum melting temperature (Celcius) for a primer oligo (default 60.0C):"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1687 my $optTemp=<STDIN>; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1688 chomp $optTemp; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1689 if($optTemp eq '') |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1690 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1691 $optTemp = 60.0; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1692 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1693 #ask for minimum primer temperature |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1694 print "\nEnter Minimum melting temperature (Celcius) for a primer oligo (default 57.0C):"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1695 my $minTemp=<STDIN>; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1696 chomp $minTemp; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1697 if($minTemp eq '') |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1698 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1699 $minTemp = 57.0; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1700 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1701 #ask for maximum primer temperature |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1702 print "\nEnter Maximum melting temperature (Celcius) for a primer oligo (default 63.0C):"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1703 my $maxTemp=<STDIN>; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1704 chomp $maxTemp; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1705 if($maxTemp eq '') |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1706 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1707 $maxTemp = 63.0; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1708 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1709 print "\nEnter flanking region size (default 1000 bases): "; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1710 my $flank=<STDIN>; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1711 chomp $flank; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1712 if ($flank eq '') |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1713 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1714 $flank = 1000; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1715 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1716 #ask for primer product range |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1717 print "\nEnter minimum product size produced by primers (default =flanking size):"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1718 my $lowRange=<STDIN>; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1719 chomp $lowRange; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1720 if($lowRange eq '') |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1721 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1722 $lowRange = $flank; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1723 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1724 print "\nEnter maxmimum product size produced by primers (default 7000):"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1725 my $maxRange=<STDIN>; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1726 chomp $maxRange; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1727 if($maxRange eq '') |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1728 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1729 $maxRange = 7000; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1730 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1731 #ask for minimum GC content in primers |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1732 print "\nEnter minimum GC content in primers (default 20%):"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1733 my $gcMin=<STDIN>; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1734 chomp $gcMin; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1735 if($gcMin eq '') |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1736 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1737 $gcMin = 20.0; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1738 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1739 #ask for optimum GC content in primers |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1740 print "\nEnter optimum GC content in primers (default 50%):"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1741 my $gcOpt=<STDIN>; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1742 chomp $gcOpt; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1743 if($gcOpt eq '') |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1744 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1745 $gcOpt = 50.0; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1746 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1747 #ask for maximum GC content in primers |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1748 print "\nEnter maximum GC content in primers (default 80%):"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1749 my $gcMax=<STDIN>; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1750 chomp $gcMax; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1751 if($gcMax eq '') |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1752 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1753 $gcMax = 80.0; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1754 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1755 print "\nEnter GC clamp (default 1):"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1756 my $gclamp=<STDIN>; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1757 chomp $gclamp; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1758 if($gclamp eq '') |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1759 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1760 $gclamp = 1; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1761 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1762 print "\nEnter size of region to exclude at the end of contigs (default 100 bases):"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1763 my $exclude=<STDIN>; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1764 chomp $exclude; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1765 if ($exclude eq '') |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1766 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1767 $exclude = 100; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1768 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1769 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1770 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1771 #tdo |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1772 my $quality=''; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1773 if ($qualAvailable) |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1774 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1775 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1776 print "\nEnter minimum quality for primer pick (default 40):"; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1777 $quality=<STDIN>; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1778 chomp $quality; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1779 if($quality eq '') |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1780 { |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1781 $quality = 40; |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1782 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1783 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1784 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1785 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1786 return ($opt,$min,$max,$optTemp,$minTemp,$maxTemp,$flank,$lowRange,$maxRange,$gcMin,$gcOpt,$gcMax,$gclamp,$exclude, $quality); |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1787 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1788 } |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1789 ############### |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1790 #-----------------------------------------------------END of PRIMER DESIGN ---------------------------------------------------------------- |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1791 #-----------------------------------------------------END OF ABACAS ----------------------------------------------------------------------- |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1792 |
a1fdc6925620
"planemo upload for repository https://github.com/phac-nml/abacas commit f6856961094e89e4cad0ee7df6c2a49bf005e4bf"
nml
parents:
diff
changeset
|
1793 |