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

View of /FigKernelScripts/relevant_pchsG.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (download) (as text) (annotate)
Sun May 29 02:15:42 2005 UTC (15 years ago) by olson
Branch: MAIN
CVS Tags: merge-trunktag-bobdev_news-2, Root-bobdev_news, merge-bobdev_news-1, merge-trunktag-bobdev_news-1, merge-bodev_news-3, merge-bobdev_news-2, merge-trunktag-bodev_news-3
Branch point for: Branch-bobdev_news
Changes since 1.1: +23 -8 lines
Updated tools for functional coupling computation. Replace string
pges with (genome, peg) pairs.

use FIG;
my $fig = new FIG;

use DBrtns;
my $dbh = $fig->db_handle;

$usage = "usage: relevant_pchs Genome";

(
 ($genome = shift @ARGV)
 )
    || die $usage;

my $qry = qq(SELECT r1.g1, r1.p1,
	         r1.g2, r1.p2,
	         r2.g2, r2.p2,
	         r3.g2, r3.p2,
	         r2.iden, r3.iden, r2.paraN, r3.paraN
	     FROM close_pegs r1, condensed_sims r2, condensed_sims r3, close_pegs r4
	     WHERE (r1.g1 = $genome AND
		    r1.g1 = r2.g1 AND
		    r1.p1 = r2.p1 AND

		    r1.g2 = r3.g1 AND
		    r1.p2 = r3.p1 AND

		    r4.g1 = r2.g2 AND
		    r4.p1 = r2.p2 AND

		    r4.g2 = r3.g2 AND
		    r4.p2 = r3.p2)
	     );

if (($res = $dbh->SQL($qry)) && 
    (@$res > 0))
{
    foreach $x (sort { ($a->[0] <=> $b->[0]) or ($a->[1] <=> $b->[1]) or ($a->[2] <=> $b->[2]) or
			   ($a->[3] <=> $b->[3]) or ($b->[8] <=> $a->[8]) }  @$res)
    {
	print join("\t",@$x),"\n";
    }
}

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3