Mercurial > repos > portiahollyoak > temp
annotate scripts/refine_breakpoint.ex.pl @ 15:65ae84fc6689 draft
planemo upload for repository https://github.com/portiahollyoak/Tools commit 7e0a7a19ee51f12bdcdfe84f3de67530a8990de9
author | portiahollyoak |
---|---|
date | Mon, 23 May 2016 10:37:52 -0400 |
parents | 28d1a6f8143f |
children |
rev | line source |
---|---|
0
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
1 #! /usr/bin/perl |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
2 |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
3 use strict; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
4 |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
5 my @files=<*.excision.cluster.*>; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
6 foreach my $file (@files) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
7 if (($file !~ /sfcp/)&&($file !~ /refsup/)) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
8 my $sfcp=$file.".sfcp"; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
9 my $title=$file.".refined.bp"; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
10 |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
11 open (input, "<$file") or die "Can't open $file since $!\n"; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
12 open (input1, "<$sfcp") or die "Can't open $sfcp since $!\n"; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
13 open (output, ">>$title") or die "Can't open $title since $!\n"; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
14 print output "Chr\tStart\tEnd\tTransposonName\t5\'_Junction\t3\'_Junction\n"; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
15 while (my $line=<input>) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
16 chomp($line); |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
17 my @a=split(/\s+/, $line); |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
18 my $line1=<input1>; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
19 chomp($line1); |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
20 my @b=split(/\t/, $line1); |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
21 my @pos=split(/\;/, $b[4]); |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
22 my $plusnext=""; my $minusnext=""; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
23 my $plusover=0; my $minusover=0; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
24 my $lpcoor=""; my $lmcoor=""; my $rpcoor=""; my $rmcoor=""; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
25 my $lp=0; my $lm=0; my $rp=0; my $rm=0; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
26 my %plus=(); my %minus=(); |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
27 foreach my $site (@pos) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
28 my @x=split(/\:/, $site); |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
29 my @y=split(/\(/, $x[0]); |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
30 chop($y[1]); |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
31 if (($y[0] =~ /\-/)&&($y[1] eq "+")&&($x[1] >= $plusover)) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
32 if ($plusover >= 2) {$plusnext="$lpcoor\-$rpcoor\:$plusover";} |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
33 $plusover=$x[1]; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
34 my @z=split(/\-/, $y[0]); |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
35 $lpcoor=$z[0]; $lp=$x[1]; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
36 $rpcoor=$z[1]; $rp=$x[1]; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
37 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
38 elsif (($y[0] =~ /\-/)&&($y[1] eq "-")&&($x[1] >= $minusover)) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
39 if ($minusover >= 2) {$minusnext="$lmcoor\-$rmcoor\:$minusover";} |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
40 $minusover=$x[1]; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
41 my @z=split(/\-/, $y[0]); |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
42 $lmcoor=$z[0]; $lm=$x[1]; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
43 $rmcoor=$z[1]; $rm=$x[1]; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
44 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
45 elsif (($y[0] !~ /\-/)&&($y[1] eq "+")) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
46 $plus{$y[0]}=$x[1]; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
47 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
48 elsif (($y[0] !~ /\-/)&&($y[1] eq "-")) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
49 $minus{$y[0]}=$x[1]; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
50 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
51 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
52 |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
53 if (($plusnext ne "")&&($minusover == 0)) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
54 my @m=split(/\:/, $plusnext); |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
55 if (($m[1] >= 2)&&($m[1] == $plusover)) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
56 my $count1=$m[1]; my $count2=$plusover; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
57 foreach my $id (keys %plus) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
58 if ($m[0] =~ /$id/) {$count1 += $plus{$id};} |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
59 elsif ($rpcoor == $id) {$count2 += $plus{$id};} |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
60 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
61 if ($count1 > $count2) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
62 my @n=split(/\-/, $m[0]); |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
63 $lpcoor=$n[0]; $lp=$m[1]; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
64 $rpcoor=$n[1]; $rp=$m[1]; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
65 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
66 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
67 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
68 |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
69 if (($minusnext ne "")&&($plusover == 0)) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
70 my @m=split(/\:/, $minusnext); |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
71 if (($m[1] >= 2)&&($m[1] == $minusover)) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
72 my $count1=$m[1]; my $count2=$minusover; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
73 foreach my $id (keys %minus) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
74 if ($m[0] =~ /$id/) {$count1 += $minus{$id};} |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
75 elsif ($lmcoor == $id) {$count2 += $minus{$id};} |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
76 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
77 if ($count1 > $count2) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
78 my @n=split(/\-/, $m[0]); |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
79 $lmcoor=$n[0]; $lm=$m[1]; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
80 $rmcoor=$n[1]; $rm=$m[1]; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
81 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
82 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
83 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
84 |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
85 if (($plusover >= 2)&&($minusover >= 2)&&(($lpcoor-$rpcoor) != ($lmcoor-$rmcoor))) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
86 if ($plusnext ne "") { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
87 my @m=split(/\:/, $plusnext); |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
88 my @n=split(/\-/, $m[0]); |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
89 if ((($n[1]-$n[0]) == ($rmcoor-$lmcoor))&&($m[1] >= 2)) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
90 $rpcoor=$n[1]; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
91 $lpcoor=$n[0]; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
92 $plusover=$m[1]; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
93 $lp=$m[1]; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
94 $rp=$m[1]; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
95 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
96 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
97 if ($minusnext ne "") { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
98 my @m=split(/\:/, $minusnext); |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
99 my @n=split(/\-/, $m[0]); |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
100 if ((($n[1]-$n[0]) == ($rpcoor-$lpcoor))&&($m[1] >= 2)) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
101 $rmcoor=$n[1]; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
102 $lmcoor=$n[0]; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
103 $minusover=$m[1]; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
104 $lm=$m[1]; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
105 $rm=$m[1]; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
106 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
107 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
108 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
109 |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
110 my $plusc=0; my $pluscoor=""; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
111 my $minusc=0; my $minuscoor=""; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
112 foreach my $id (keys %plus) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
113 if ($id eq $rpcoor) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
114 $rp=$plusover+$plus{$id}; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
115 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
116 if ($plus{$id} > $plusc) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
117 $plusc=$plus{$id}; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
118 $pluscoor=$id; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
119 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
120 elsif (($plus{$id} == $plusc)&&(abs($id-$b[2]) < abs($pluscoor-$b[2]))) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
121 $plusc=$plus{$id}; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
122 $pluscoor=$id; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
123 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
124 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
125 foreach my $id (keys %minus) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
126 if ($id eq $lmcoor) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
127 $lm=$minusover+$minus{$id}; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
128 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
129 if ($minus{$id} > $minusc) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
130 $minusc=$minus{$id}; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
131 $minuscoor=$id; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
132 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
133 elsif (($minus{$id} == $minusc)&&(abs($id-$b[1]) < abs($minuscoor-$b[1]))) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
134 $minusc=$minus{$id}; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
135 $minuscoor=$id; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
136 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
137 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
138 if ($plusover < 2) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
139 $lpcoor=""; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
140 if ($plusc >= 3) {$rpcoor=$pluscoor; $rp=$plusc;} |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
141 else {$rpcoor="";} |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
142 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
143 if ($minusover < 2) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
144 $rmcoor=""; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
145 if ($minusc >= 3) {$lmcoor=$minuscoor; $lm=$minusc;} |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
146 else {$lmcoor="";} |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
147 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
148 |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
149 my $bp1=""; my $bp2=""; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
150 if (($lpcoor ne "")&&($lmcoor ne "")) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
151 $bp1="$lpcoor\(\+\)\:$lp,$lmcoor\(\-\)\:$lm"; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
152 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
153 elsif ($lpcoor ne "") {$bp1="$lpcoor\(\+\)\:$lp";} |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
154 elsif ($lmcoor ne "") {$bp1="$lmcoor\(\-\)\:$lm";} |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
155 if (($rpcoor ne "")&&($rmcoor ne "")) { |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
156 $bp2="$rpcoor\(\+\)\:$rp,$rmcoor\(\-\)\:$rm"; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
157 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
158 elsif ($rpcoor ne "") {$bp2="$rpcoor\(\+\)\:$rp";} |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
159 elsif ($rmcoor ne "") {$bp2="$rmcoor\(\-\)\:$rm";} |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
160 |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
161 print output "$a[2]\t$a[3]\t$a[4]\t$a[5]\t$bp1\t$bp2\n"; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
162 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
163 |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
164 close input; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
165 close input1; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
166 close output; |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
167 } |
28d1a6f8143f
planemo upload for repository https://github.com/portiahollyoak/Tools commit 132bb96bba8e7aed66a102ed93b7744f36d10d37-dirty
portiahollyoak
parents:
diff
changeset
|
168 } |