[Bio] / FigKernelScripts / relevant_pchsG.pl Repository:
ViewVC logotype

Annotation of /FigKernelScripts/relevant_pchsG.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (view) (download) (as text)

1 : overbeek 1.1
2 :     use FIG;
3 :     my $fig = new FIG;
4 :    
5 :     use DBrtns;
6 :     my $dbh = $fig->db_handle;
7 :    
8 :     $usage = "usage: relevant_pchs Genome";
9 :    
10 :     (
11 :     ($genome = shift @ARGV)
12 :     )
13 :     || die $usage;
14 :    
15 : olson 1.2 my $qry = qq(SELECT r1.g1, r1.p1,
16 :     r1.g2, r1.p2,
17 :     r2.g2, r2.p2,
18 :     r3.g2, r3.p2,
19 :     r2.iden, r3.iden, r2.paraN, r3.paraN
20 :     FROM close_pegs r1, condensed_sims r2, condensed_sims r3, close_pegs r4
21 :     WHERE (r1.g1 = $genome AND
22 :     r1.g1 = r2.g1 AND
23 :     r1.p1 = r2.p1 AND
24 :    
25 :     r1.g2 = r3.g1 AND
26 :     r1.p2 = r3.p1 AND
27 :    
28 :     r4.g1 = r2.g2 AND
29 :     r4.p1 = r2.p2 AND
30 :    
31 :     r4.g2 = r3.g2 AND
32 :     r4.p2 = r3.p2)
33 :     );
34 :    
35 :     if (($res = $dbh->SQL($qry)) &&
36 : overbeek 1.1 (@$res > 0))
37 :     {
38 : olson 1.2 foreach $x (sort { ($a->[0] <=> $b->[0]) or ($a->[1] <=> $b->[1]) or ($a->[2] <=> $b->[2]) or
39 :     ($a->[3] <=> $b->[3]) or ($b->[8] <=> $a->[8]) } @$res)
40 : overbeek 1.1 {
41 :     print join("\t",@$x),"\n";
42 :     }
43 :     }

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3