[Bio] / FigKernelPackages / FIGO.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/FIGO.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.20, Sun Mar 25 14:21:41 2007 UTC revision 1.29, Wed Nov 21 20:41:05 2007 UTC
# Line 35  Line 35 
35  (Likewise, in principle one might like to attach an "annotation"  (Likewise, in principle one might like to attach an "annotation"
36  to any type of object  to any type of object
37    
38  Four of the modules dealing with "genomes" have a reasonable clear  The four modules dealing with "genomes" have a reasonable clear
39  "implied heirarchy:"  "implied heirarchy:"
40    
41  =over 4  =over 4
# Line 52  Line 52 
52  We have chosen to in many cases sidestep the entire issue of inheritance  We have chosen to in many cases sidestep the entire issue of inheritance
53  via an I<ad hoc> mechanism:  via an I<ad hoc> mechanism:
54  If a "child" object needs access to its "ancestors'" methods,  If a "child" object needs access to its "ancestors'" methods,
55  we pass it references to its "ancestors" using subroutine arguments.  we will explicitly pass it references to its "ancestors,"
56    as subroutine arguments.
57  This is admittedly ugly, clumsy, and potentially error-prone ---  This is admittedly ugly, clumsy, and potentially error-prone ---
58  but it has the advantage that, unlike multiple inheritance,  but it has the advantage that, unlike multiple inheritance,
59  we understand how to do it...  we understand how to do it...
# Line 72  Line 73 
73  use SproutFIG;  use SproutFIG;
74  use Tracer;  use Tracer;
75  use Data::Dumper;  use Data::Dumper;
76    use Carp;
77  use FigFams;  use FigFams;
78  use gjoparseblast;  use gjoparseblast;
79    
# Line 117  Line 119 
119      return bless $self, $class;      return bless $self, $class;
120  }  }
121    
122    sub function_of {
123        my($self,$id) = @_;
124    
125        my $fig  = $self->{_fig};
126        my $func = $fig->function_of($id);
127    
128        return ($func ? $func : "");
129    }
130    
131  =head3 genomes  =head3 genomes
132    
# Line 357  Line 366 
366    
367  =item USAGE:  =item USAGE:
368    
369  C<< my $org = GenomeO->new($figo, $tax_id); >>  C<< my $orgO = GenomeO->new($figO, $tax_id); >>
370    
371  =item RETURNS:  =item RETURNS:
372    
373      A new GenomeO object.      A new "GenomeO" object.
374    
375  =back  =back
376    
# Line 384  Line 393 
393    
394  =item USAGE:  =item USAGE:
395    
396  C<< my $tax_id = $org->id(); >>  C<< my $tax_id = $orgO->id(); >>
397    
398  =item RETURNS:  =item RETURNS:
399    
400      Taxonomy-ID of GenomeO object.      Taxonomy-ID of "GenomeO" object.
401    
402  =back  =back
403    
# Line 408  Line 417 
417    
418  =item USAGE:  =item USAGE:
419    
420  C<< $gs = $genome->genus_species(); >>  C<< $gs = $orgO->genus_species(); >>
421    
422  =item RETURNS:  =item RETURNS:
423    
# Line 426  Line 435 
435  }  }
436    
437    
438    
439    
440    =head3 taxonomy_of
441    
442    =over 4
443    
444    =item FUNCTION:
445    
446    Return the TAXONOMY string of a "GenomeO" object.
447    
448    =item USAGE:
449    
450    C<< my $taxonomy = $orgO->taxonomy_of(); >>
451    
452    =item RETURNS:
453    
454    TAXONOMY string.
455    
456    =back
457    
458    =cut
459    
460    sub taxonomy_of {
461        my ($self) = @_;
462    
463        my $figO = $self->{_figO};
464        my $fig  = $figO->{_fig};
465    
466        return $fig->taxonomy_of($self->{_id});
467    }
468    
469    
470  =head3 contigs_of  =head3 contigs_of
471    
472  =over 4  =over 4
# Line 454  Line 495 
495    
496  =head3 features_of  =head3 features_of
497    
498    =over 4
499    
500    =item FUNCTION:
501    
502    Returns a list of "FeatureO" objects contained in a "GenomeO" object.
503    
504    =item USAGE:
505    
506    C<< my @featureOs = $orgO->features_of();        #...Fetch all features >>
507    
508    or
509    
510    C<< my @featureOs = $orgO->features_of('peg');   #...Fetch only PEGs >>
511    
512    =item RETURNS:
513    
514    List of "FeatureO" objects.
515    
516    =back
517    
518  =cut  =cut
519    
520  sub features_of {  sub features_of {
# Line 697  Line 758 
758  package FeatureO;  package FeatureO;
759  ########################################################################  ########################################################################
760  use Data::Dumper;  use Data::Dumper;
761    use Carp;
762    
763  =head1 FeatureO  =head1 FeatureO
764    
# Line 707  Line 769 
769    
770  =head3 new  =head3 new
771    
772  Constructor of "FeatureO" objects  Constructor of new "FeatureO" objects
773    
774  =over 4  =over 4
775    
# Line 777  Line 839 
839    
840  =item RETURNS:  =item RETURNS:
841    
842  The TAxon-ID for the "GenomeO" object containg the feature.  The Taxon-ID for the "GenomeO" object containing the feature.
843    
844  =back  =back
845    
# Line 1015  Line 1077 
1077    
1078  =item RETURNS:  =item RETURNS:
1079    
1080  A list of L<CouplingO> objects describing the evidence for functional coupling  A list of "CouplingO" objects describing the evidence for functional coupling
1081  between this feature and other nearby features.  between this feature and other nearby features.
1082    
1083  =back  =back
# Line 1050  Line 1112 
1112    
1113  =item RETURNS:  =item RETURNS:
1114    
1115  A list of L<AnnotationO> objects allowing access to the annotations for this feature.  A list of "AnnotationO" objects allowing access to the annotations for this feature.
1116    
1117  =back  =back
1118    
# Line 1076  Line 1138 
1138    
1139  =item RETURNS:  =item RETURNS:
1140    
1141  A list of L<SubsystemO> objects allowing access to the subsystems  A list of "SubsystemO" objects allowing access to the subsystems
1142  that this feature particupates in.  that this feature particupates in.
1143    
1144  =back  =back
# Line 1142  Line 1204 
1204  sub possible_frameshift {  sub possible_frameshift {
1205      my($self) = @_;      my($self) = @_;
1206      my $figO = $self->{_figO};      my $figO = $self->{_figO};
1207        my $fig = $figO->{_fig};
1208      my($tmp_dir) = $figO->{_tmp_dir};      my($tmp_dir) = $figO->{_tmp_dir};
1209    
1210        my $tmp_dna  = "$tmp_dir/tmp_dna.$$.fasta";
1211        my $tmp_prot = "$tmp_dir/tmp_prot.$$.fasta";
1212    
1213        #...Skip tests and return '0' if truncated...
1214      if (! $self->possibly_truncated)      if (! $self->possibly_truncated)
1215      {      {
1216          my @sims = $self->sims( -max => 1, -cutoff => 1.0e-50);          #...Get best precomputed BLAST hit if E-value < 1.0e-20:
1217            my @sims = $self->sims( -max => 5, -cutoff => 1.0e-20);
1218            while ((@sims > 0) && $fig->possibly_truncated($sims[0]->id2)) { shift @sims }
1219    
1220            #...If a sim was returned:
1221          if (my $sim = shift @sims)          if (my $sim = shift @sims)
1222          {          {
1223                #...Get best hit FID and boundaries:
1224              my $peg2 = $sim->id2;              my $peg2 = $sim->id2;
1225              my $ln1  = $sim->ln1;              my $ln1  = $sim->ln1;
1226              my $ln2  = $sim->ln2;              my $ln2  = $sim->ln2;
1227              my $b2   = $sim->b2;              my $b2   = $sim->b2;
1228              my $e2   = $sim->e2;              my $e2   = $sim->e2;
1229    
1230                #...Convert from AA to BP, and pad out w/ 100 bp guard region:
1231              my $adjL = 100 + (($b2-1) * 3);              my $adjL = 100 + (($b2-1) * 3);
1232              my $adjR = 100 + (($ln2 - $e2) * 3);              my $adjR = 100 + (($ln2 - $e2) * 3);
1233    
1234                if ($ENV{DEBUG}) { print STDERR "adjL = $adjL adjR = $adjR ln1 = $ln1 peg2 = $peg2 ln2 = $ln2\n" }
1235                #...If hit is more than 20% longer than query:
1236              if ($ln2 > (1.2 * $ln1))              if ($ln2 > (1.2 * $ln1))
1237              {              {
1238                    #...Get and parse query location:
1239                  my $loc = $self->location;                  my $loc = $self->location;
1240                  if ($loc =~ /^(\S+)_(\d+)_(\d+)/)                  if ($loc =~ /^(\S+)_(\d+)_(\d+)/)
1241                  {                  {
1242                      my $contig = $1;                      my $contig = $1;
1243                      my $beg    = $2;                      my $beg    = $2;
1244                      my $end = $3;                      my $end = $3;
1245    
1246                        #...Create new ContigO object:
1247                      my $contigO = new ContigO($figO,$self->genome->id,$contig);                      my $contigO = new ContigO($figO,$self->genome->id,$contig);
1248                      my $begA = &max(1,$beg - $adjL);  
1249                      my $endA = &min($end+$adjR,$contigO->contig_length);                      #...Extract DNA subsequence, including guard regions:
1250                      my $dna  = $contigO->dna_seq($begA,$endA);                      my($begA,$endA,$dna);
1251                      open(TMP,">$tmp_dir/tmp_dna") || die "couild not open tmp_dna";                      if ($beg < $end)
1252                        {
1253                            $begA = &max(1, $beg - $adjL);
1254                            $endA = &min($end+$adjR, $contigO->contig_length);
1255                            $dna  = $contigO->dna_seq($begA,$endA);
1256                        }
1257                        else
1258                        {
1259                            $endA = &max(1, $beg - $adjL);
1260                            $begA = &min($end+$adjR, $contigO->contig_length);
1261                            $dna  = $contigO->dna_seq($begA,$endA);
1262                        }
1263    
1264                        if (defined($dna) && (length($dna) > 90))
1265                        {
1266                            #...Open tmp-file and write FASTA containing DNA subregion to be BLASTed:
1267                            open( TMP, ">$tmp_dna") || die "could not open $tmp_dna";
1268                      print TMP ">dna\n$dna\n";                      print TMP ">dna\n$dna\n";
1269                      close(TMP);                      close(TMP);
1270    
1271                      my $peg2O = new FeatureO($figO,$peg2);                          #...Create new FeatureO object corresponding tp $peg2:
1272                      my $prot  = $peg2O->prot_seq;                          my $pegO2 = new FeatureO($figO,$peg2);
1273                      open(TMP,">$tmp_dir/tmp_prot") || die "could not open tmp_prot";  
1274                            #...Fetch its translation, and print to tmp FASTA file for BLASTing:
1275                            my $prot  = $pegO2->prot_seq;
1276                            if (defined($prot) && (length($prot) > 30))
1277                            {
1278                                open( TMP, ">$tmp_prot") || die "could not open $tmp_prot";
1279                      print TMP ">tmp_prot\n$prot\n";                      print TMP ">tmp_prot\n$prot\n";
1280                      close(TMP);                      close(TMP);
1281                      &run("formatdb -i $tmp_dir/tmp_dna -pF");  
1282                      open(BLAST,"blastall -i $tmp_dir/tmp_prot -d $tmp_dir/tmp_dna -p tblastn -FF -e 1.0e-50 |")                              #...Build BLAST nucleotide database for extracted DNA region,
1283                                #   and TBLASTN $peg2 against the DNA:
1284                                &run("formatdb -i $tmp_dna -pF");
1285                                open(BLAST,"blastall -i $tmp_prot -d $tmp_dna -p tblastn -FF -e 1.0e-20 |")
1286                          || die "could not blast";                          || die "could not blast";
1287    
1288                                #...Parse the TBLASTN output; find and sort HSPs by left boundary:
1289                      my $db_seq_out = &gjoparseblast::next_blast_subject(\*BLAST,1);                      my $db_seq_out = &gjoparseblast::next_blast_subject(\*BLAST,1);
1290                                if ($ENV{DEBUG}) { print STDERR &Dumper(['blast output',$db_seq_out]) }
1291                      my @hsps       = sort { $a->[0] <=> $b->[0] }                      my @hsps       = sort { $a->[0] <=> $b->[0] }
1292                                       map { [$_->[9],$_->[10],$_->[12],$_->[13]] }                                       map { [$_->[9],$_->[10],$_->[12],$_->[13]] }
1293                                       grep { $_->[1] < 1.0e-50 }                                                grep { $_->[1] < 1.0e-20 }
1294                                       @{$db_seq_out->[6]};                                       @{$db_seq_out->[6]};
1295    
1296                                #...Extract HSP boundary pairs:
1297                      my @prot = map { [$_->[0],$_->[1]] } @hsps;                      my @prot = map { [$_->[0],$_->[1]] } @hsps;
1298                      my @dna  = map { [$_->[2],$_->[3]] } @hsps;                      my @dna  = map { [$_->[2],$_->[3]] } @hsps;
1299                                if ($ENV{DEBUG}) { print STDERR &Dumper(\@prot,\@dna) }
1300    
1301                                #...If the "cover" of the HSPs covers more than 90% of $peg2 w gaps < 3 AA,
1302                                #   and the "cover" of the HPSs cover more than 90% of the extracted DNA
1303                                #   w/ gaps < 9 bp (but not a multiple of 3), suspect a possible frameshift:
1304                      if (&covers(\@prot,length($prot),3,0) && &covers(\@dna,3*length($prot),9,1))                      if (&covers(\@prot,length($prot),3,0) && &covers(\@dna,3*length($prot),9,1))
1305                      {                      {
1306                          return 1;                                  unlink($tmp_dna,$tmp_prot);
1307                                    return [$contig,$begA,$endA,$dna,$peg2];
1308                                }
1309                      }                      }
1310                  }                  }
1311              }              }
1312          }          }
1313      }      }
1314        }
1315        unlink($tmp_dna,$tmp_prot);
1316      return 0;      return 0;
1317  }  }
1318    
# Line 1226  Line 1343 
1343    
1344  sub run {  sub run {
1345      my($cmd) = @_;      my($cmd) = @_;
1346      (system($cmd) == 0) || Confess("FAILED: $cmd");      (system($cmd) == 0) || confess("FAILED: $cmd");
1347  }  }
1348    
1349    
# Line 1241  Line 1358 
1358    
1359  C<< my $max = $feature->max($x, $y); >>  C<< my $max = $feature->max($x, $y); >>
1360    
1361  =item C<$x>  =item C<$x> and  C<$y>
   
 Numerical value.  
1362    
1363  =item C<$y>  Numerical values.
1364    
1365  Numerical value.  =item RETURNS:
   
 =items RETURNS:  
1366    
1367  The larger of the two numerical values C<$x> and C<$y>.  The larger of the two numerical values C<$x> and C<$y>.
1368    
# Line 1274  Line 1387 
1387    
1388  C<< my $min = $feature->min($x, $y); >>  C<< my $min = $feature->min($x, $y); >>
1389    
1390  =item C<$x>  =item C<$x> and C<$y>
1391    
1392  Numerical value.  Numerical values.
   
 =item C<$y>  
   
 Numerical value.  
1393    
1394  =item RETURNS:  =item RETURNS:
1395    
# Line 1312  Line 1421 
1421  sub covers {  sub covers {
1422      my($hsps,$ln,$diff,$must_shift) = @_;      my($hsps,$ln,$diff,$must_shift) = @_;
1423    
1424        if ($ENV{DEBUG}) { print STDERR &Dumper(['hsps',$hsps,'ln',$ln,'diff',$diff,'must_shift',$must_shift]) }
1425      my $hsp1 = shift @$hsps;      my $hsp1 = shift @$hsps;
1426      my $hsp2;      my $hsp2;
1427      my $merged = 0;      my $merged = 0;
1428      while ($hsp1 && ($hsp2 = shift @$hsps) &&      while ($hsp1 && ($hsp2 = shift @$hsps) &&
1429             ($must_shift ? &diff_frames($hsp1,$hsp2) : 1) &&             ($must_shift ? &diff_frames($hsp1,$hsp2) : 1) &&
1430             ($hsp1 = &merge($hsp1,$hsp2,$diff))) { $merged = 1 }             ($hsp1 = &merge($hsp1,$hsp2,$diff)))
1431        {
1432            $merged = 1;
1433            if ($ENV{DEBUG}) { print STDERR &Dumper(['merged',$hsp1]) }
1434        }
1435      return ($merged && $hsp1 && (($hsp1->[1] - $hsp1->[0]) > (0.9 * $ln)));      return ($merged && $hsp1 && (($hsp1->[1] - $hsp1->[0]) > (0.9 * $ln)));
1436  }  }
1437    
1438  sub diff_frames {  sub diff_frames {
1439      my($hsp1,$hsp2) = @_;      my($hsp1,$hsp2) = @_;
1440      return (($hsp1->[0] % 3) != ($hsp2->[0] % 3));      return ((($hsp1->[1]+1) % 3) != ($hsp2->[0] % 3));
1441  }  }
1442    
1443    
# Line 1341  Line 1455 
1455    
1456      my($b1,$e1) = @$hsp1;      my($b1,$e1) = @$hsp1;
1457      my($b2,$e2) = @$hsp2;      my($b2,$e2) = @$hsp2;
1458      return (($e2 > $e1) && (abs($b2-$e1) <= $diff)) ? [$b1,$e2] : undef;      return (($e2 > $e1) && (($b2-$e1) <= $diff)) ? [$b1,$e2] : undef;
1459  }  }
1460    
1461    
# Line 1374  Line 1488 
1488      my $fig  = $figO->{_fig};      my $fig  = $figO->{_fig};
1489    
1490      my $cutoff = $args{-cutoff} ? $args{-cutoff} : 1.0e-5;      my $cutoff = $args{-cutoff} ? $args{-cutoff} : 1.0e-5;
1491      my $all    = $args{-all}    ? $args{-all}    : "fig";      my $all    = $args{-all}    ? 'all'          : "fig";
1492      my $max    = $args{-max}    ? $args{-max}    : 10000;      my $max    = $args{-max}    ? $args{-max}    : 10000;
1493    
1494      my @sims = $fig->sims($self->id,$max,$cutoff,$all);      my @sims = $fig->sims($self->id,$max,$cutoff,$all);
# Line 1383  Line 1497 
1497          my $peg1 = FeatureO->new($figO, $sims[0]->[0]);          my $peg1 = FeatureO->new($figO, $sims[0]->[0]);
1498    
1499          foreach my $sim (@sims) {          foreach my $sim (@sims) {
1500              $sim->[0] = $peg1;  #           $sim->[0] = $peg1;
1501              $sim->[1] = FeatureO->new($figO, $sim->[1]);  #           $sim->[1] = FeatureO->new($figO, $sim->[1]);
1502          }          }
1503      }      }
1504    
# Line 1406  Line 1520 
1520    
1521  C<< my @bbhs = $pegO->bbhs(); >>  C<< my @bbhs = $pegO->bbhs(); >>
1522    
1523  =item List of BBHO objects.  =item RETURNS:
1524    
1525    List of BBHO objects.
1526    
1527  =back  =back
1528    
# Line 1427  Line 1543 
1543                                                  },'BBHO') } @bbhs;                                                  },'BBHO') } @bbhs;
1544  }  }
1545    
1546    
1547  =head3 display  =head3 display
1548    
1549    =over 4
1550    
1551    =item FUNCTION:
1552    
1553  Prints info about a "FeatureO" object to STDOUT.  Prints info about a "FeatureO" object to STDOUT.
1554    
1555  USAGE:  =item USAGE:
1556    
1557  C<< $pegO->display(); >>  C<< $pegO->display(); >>
1558    
1559    =item RETURNS;
1560    
1561    (void)
1562    
1563    =back
1564    
1565  =cut  =cut
1566    
1567  sub display {  sub display {
# Line 1593  Line 1720 
1720    
1721  =head3 new  =head3 new
1722    
1723    =over 4
1724    
1725    =item FUNCTION:
1726    
1727    Cronstruct a new "AnnotationO" object
1728    
1729    =item USAGE:
1730    
1731    C<< my $annotO = AnnotationO->new( $fid, $timestamp, $who, $text); >>
1732    
1733    =item C<$fid>
1734    
1735    A feature identifier.
1736    
1737    =item C<$timestamp>
1738    
1739    The C<UN*X> timestamp one wishes to associate with the annotation.
1740    
1741    =item C<$who>
1742    
1743    The annotator's user-name.
1744    
1745    =item C<$text>
1746    
1747    The textual content of the annotation.
1748    
1749    =item RETURNS:
1750    
1751    An "AnnotationO" object.
1752    
1753    =back
1754    
1755  =cut  =cut
1756    
1757  sub new {  sub new {
# Line 1610  Line 1769 
1769    
1770  =head3 fid  =head3 fid
1771    
1772    =over 4
1773    
1774    =item FUNCTION:
1775    
1776    Extract the feature-ID that was annotated.
1777    
1778    =item USAGE:
1779    
1780    C<< my $fid = $annotO->fid(); >>
1781    
1782    =item RETURNS;
1783    
1784    The feature-ID as a string.
1785    
1786    =back
1787    
1788  =cut  =cut
1789    
1790  sub fid {  sub fid {
# Line 1622  Line 1797 
1797    
1798  =head3 timestamp  =head3 timestamp
1799    
1800    =over 4
1801    
1802    =item FUNCTION:
1803    
1804    Extract the C<UN*X> timestamp of the annotation.
1805    
1806    =item USAGE:
1807    
1808    C<< my $fid = $annotO->timestamp(); >>
1809    
1810    =item RETURNS;
1811    
1812    The timestamp as a string.
1813    
1814    =back
1815    
1816  =cut  =cut
1817    
1818  sub timestamp {  sub timestamp {
# Line 1641  Line 1832 
1832    
1833  =head3 made_by  =head3 made_by
1834    
1835    =over 4
1836    
1837    =item FUNCTION:
1838    
1839    Extract the annotator's user-name.
1840    
1841    =item USAGE:
1842    
1843    C<< my $fid = $annotO->made_by(); >>
1844    
1845    =item RETURNS;
1846    
1847    The username of the annotator, as a string.
1848    
1849    =back
1850    
1851  =cut  =cut
1852    
1853  sub made_by {  sub made_by {
# Line 1655  Line 1862 
1862    
1863  =head3 text  =head3 text
1864    
1865    =over 4
1866    
1867    =item FUNCTION:
1868    
1869    Extract the text of the annotation.
1870    
1871    =item USGAE:
1872    
1873    C<< my $text = $annotO->text(); >>
1874    
1875    =item RETURNS:
1876    
1877    The text of the annotation, as a string.
1878    
1879    =back
1880    
1881  =cut  =cut
1882    
1883  sub text {  sub text {
# Line 1667  Line 1890 
1890    
1891  =head3 display  =head3 display
1892    
1893    =over 4
1894    
1895    =item FUNCTION:
1896    
1897    Print the contents of an "AnnotationO" object to B<STDOUT>
1898    in human-readable form.
1899    
1900    =item USAGE:
1901    
1902    C<< my $annotO->display(); >>
1903    
1904    =item RETURNS:
1905    
1906    (void)
1907    
1908    =back
1909    
1910  =cut  =cut
1911    
1912  sub display {  sub display {
# Line 1693  Line 1933 
1933    
1934  =head3 new  =head3 new
1935    
1936    =over 4
1937    
1938    =item FUNCTION:
1939    
1940    Construct a new "CouplingO" object
1941    encapsulating the "functional coupling" score
1942    between a pair of features in some genome.
1943    
1944    =item USAGE:
1945    
1946    C<< $couplingO = CouplingO->new($figO, $fid1, $fid2, $sc); >>
1947    
1948    =item C<$figO>
1949    
1950    Parent "FIGO" object.
1951    
1952    =item C<$fid1> and C<$fid2>
1953    
1954    A pair of feature-IDs.
1955    
1956    =item C<$sc>
1957    
1958    A functional-coupling score
1959    
1960    =item RETURNS:
1961    
1962    A "CouplingO" object.
1963    
1964    =back
1965    
1966  =cut  =cut
1967    
1968  sub new {  sub new {
# Line 1712  Line 1982 
1982    
1983  =head3 peg1  =head3 peg1
1984    
1985    =over 4
1986    
1987    =item FUNCTION:
1988    
1989    Returns a "FeatureO" object corresponding to the first FID in a coupled pair.
1990    
1991    =item USAGE:
1992    
1993    C<< my $peg1 = $couplingO->peg1(); >>
1994    
1995    =item RETURNS:
1996    
1997    A "FeatureO" object.
1998    
1999    =back
2000    
2001  =cut  =cut
2002    
2003  sub peg1 {  sub peg1 {
# Line 1723  Line 2009 
2009    
2010    
2011    
2012  =head3 peg1  =head3 peg2
2013    
2014    =over 4
2015    
2016    =item FUNCTION:
2017    
2018    Returns a "FeatureO" object corresponding to the second FID in a coupled pair.
2019    
2020    =item USAGE:
2021    
2022    C<< my $peg2 = $couplingO->peg2(); >>
2023    
2024    =item RETURNS:
2025    
2026    A "FeatureO" object.
2027    
2028    =back
2029    
2030  =cut  =cut
2031    
# Line 1738  Line 2040 
2040    
2041  =head3 sc  =head3 sc
2042    
2043    =over 4
2044    
2045    =item FUNCTION:
2046    
2047    Extracts the "functional coupling" score from a "CouplingO" object.
2048    
2049    =item USAGE:
2050    
2051    C<< my $sc = $couplingO->sc(); >>
2052    
2053    =item RETURNS:
2054    
2055    A scalar score.
2056    
2057    =back
2058    
2059  =cut  =cut
2060    
2061  sub sc {  sub sc {
# Line 1750  Line 2068 
2068    
2069  =head3 evidence  =head3 evidence
2070    
2071    =over 4
2072    
2073    =item FUNCTION:
2074    
2075    Fetch the evidence for a "functional coupling" between two close PEGs,
2076    in the form of a list of objects describing the "Pairs of Close Homologs" (PCHs)
2077    supporting the existence of a functional coupling between the two close PEGs.
2078    
2079    =item USAGE:
2080    
2081    C<< my $evidence = $couplingO->evidence(); >>
2082    
2083    =item RETURNS
2084    
2085    List of pairs of "FeatureO" objects.
2086    
2087    =back
2088    
2089  =cut  =cut
2090    
2091  sub evidence {  sub evidence {
# Line 1772  Line 2108 
2108    
2109  =head3 display  =head3 display
2110    
2111    =over 4
2112    
2113    =item FUNCTION:
2114    
2115    Print the contents of a "CouplingO" object to B<STDOUT> in human-readable form.
2116    
2117    =item USAGE:
2118    
2119    C<< $couplingO->display(); >>
2120    
2121    =item RETURNS:
2122    
2123    (Void)
2124    
2125    =back
2126    
2127  =cut  =cut
2128    
2129  sub display {  sub display {

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.29

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3