[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.15, Sun Mar 4 18:49:52 2007 UTC revision 1.20, Sun Mar 25 14:21:41 2007 UTC
# Line 312  Line 312 
312      }      }
313  }  }
314    
315    =head3 figfam
316    
317    =over 4
318    
319    =item USAGE:
320    
321    C<< my $fam = $figO->figfam($family_id); >>
322    
323    =item $family_id;
324    
325        A FigFam ID
326    
327    =item RETURNS:
328    
329          $fam:  A FIGfam Object.
330    
331    =back
332    
333    =cut
334    
335    sub figfam {
336        my($self,$fam_id) = @_;
337    
338        return &FigFamO::new('FigFamO',$self,$fam_id);
339    }
340    
341    
342  ########################################################################  ########################################################################
343  package GenomeO;  package GenomeO;
# Line 1256  Line 1282 
1282    
1283  Numerical value.  Numerical value.
1284    
1285  =items RETURNS:  =item RETURNS:
1286    
1287  The smaller of the two numerical values C<$x> and C<$y>.  The smaller of the two numerical values C<$x> and C<$y>.
1288    
# Line 1273  Line 1299 
1299    
1300  =head3 covers  =head3 covers
1301    
1302    (Question: Should this function be considered "PRIVATE" ???)
1303    
1304    USAGE:
1305        C<< if (&covers(\@hits, $len, $diff, $must_shift)) { #...Do stuff } >>
1306    
1307    Returns boolean C<TRUE> if a set of BLAST HSPs "cover" more than 90%
1308    of the database sequence(?).
1309    
1310  =cut  =cut
1311    
1312  sub covers {  sub covers {
# Line 1292  Line 1326 
1326      return (($hsp1->[0] % 3) != ($hsp2->[0] % 3));      return (($hsp1->[0] % 3) != ($hsp2->[0] % 3));
1327  }  }
1328    
1329    
1330    
1331  =head3 merge  =head3 merge
1332    
1333    Merge two HSPs unless their overlap or separation is too large.
1334    
1335    RETURNS: Merged boundaries if merger succeeds, and C<undef> if merger fails.
1336    
1337  =cut  =cut
1338    
1339  sub merge {  sub merge {
# Line 1308  Line 1348 
1348    
1349  =head3 sims  =head3 sims
1350    
1351    =over 4
1352    
1353    =item FUNCTION:
1354    
1355    Returns precomputed "Sim.pm" objects from the SEED.
1356    
1357    =item USAGE:
1358    
1359    C<< my @sims = $pegO->sims( -all, -cutoff => 1.0e-10); >>
1360    
1361    C<< my @sims = $pegO->sims( -max => 50, -cutoff => 1.0e-10); >>
1362    
1363    =item RETURNS: List of sim objects.
1364    
1365    =back
1366    
1367  =cut  =cut
1368    
1369  use Sim;  use Sim;
# Line 1321  Line 1377 
1377      my $all    = $args{-all}    ? $args{-all}    : "fig";      my $all    = $args{-all}    ? $args{-all}    : "fig";
1378      my $max    = $args{-max}    ? $args{-max}    : 10000;      my $max    = $args{-max}    ? $args{-max}    : 10000;
1379    
1380      return $fig->sims($self->id,$max,$cutoff,$all);      my @sims = $fig->sims($self->id,$max,$cutoff,$all);
1381    
1382        if (@sims) {
1383            my $peg1 = FeatureO->new($figO, $sims[0]->[0]);
1384    
1385            foreach my $sim (@sims) {
1386                $sim->[0] = $peg1;
1387                $sim->[1] = FeatureO->new($figO, $sim->[1]);
1388            }
1389        }
1390    
1391        return @sims;
1392  }  }
1393    
1394    
1395    
1396  =head3 bbhs  =head3 bbhs
1397    
1398    =over 4
1399    
1400    =item FUNCTION:
1401    
1402    Given a PEG-type "FeatureO" object, returns the list of BBHO objects
1403    corresponding to the pre-computed BBHs for that PEG.
1404    
1405    =item USAGE:
1406    
1407    C<< my @bbhs = $pegO->bbhs(); >>
1408    
1409    =item List of BBHO objects.
1410    
1411    =back
1412    
1413  =cut  =cut
1414    
1415  sub bbhs {  sub bbhs {
# Line 1347  Line 1429 
1429    
1430  =head3 display  =head3 display
1431    
1432    Prints info about a "FeatureO" object to STDOUT.
1433    
1434    USAGE:
1435    
1436    C<< $pegO->display(); >>
1437    
1438  =cut  =cut
1439    
1440  sub display {  sub display {
# Line 1365  Line 1453 
1453    
1454  =head1 BBHO  =head1 BBHO
1455    
1456    Methods for accessing "Bidirectiona Best Hits" (BBHs).
1457    
1458  =cut  =cut
1459    
1460    
1461  =head3 new  =head3 new
1462    
1463    Constructor of BBHO objects.
1464    
1465    (NOTE: The "average user" should never need to invoke this method.)
1466    
1467  =cut  =cut
1468    
1469  sub new {  sub new {
# Line 1385  Line 1479 
1479  }  }
1480    
1481    
1482    
1483  =head3 peg1  =head3 peg1
1484    
1485    =over 4
1486    
1487    =item USAGE:
1488    
1489    C<< my $peg1 = $bbh->peg1(); >>
1490    
1491    =item RETURNS:
1492    
1493    A "FeatureO" object corresponding to the "query" sequence
1494    in a BBH pair.
1495    
1496    =back
1497    
1498  =cut  =cut
1499    
1500  sub peg1 {  sub peg1 {
# Line 1398  Line 1506 
1506    
1507  =head3 peg2  =head3 peg2
1508    
1509    =over 4
1510    
1511    =item USAGE:
1512    
1513    C<< my $peg2 = $bbh->peg2(); >>
1514    
1515    =item RETURNS:
1516    
1517    A "FeatureO" object corresponding to the "database" sequence
1518    in a BBH pair.
1519    
1520    =back
1521    
1522  =cut  =cut
1523    
1524  sub peg2 {  sub peg2 {
# Line 1411  Line 1532 
1532    
1533  =head3 psc  =head3 psc
1534    
1535    =over 4
1536    
1537    =item USAGE:
1538    
1539    C<< my $psc = $bbh->psc(); >>
1540    
1541    =item RETURNS:
1542    
1543    The numerical value of the BLAST E-value for the pair.
1544    
1545    =back
1546    
1547  =cut  =cut
1548    
1549  sub psc {  sub psc {
# Line 1423  Line 1556 
1556    
1557  =head3 norm_bitscore  =head3 norm_bitscore
1558    
1559    
1560    =over 4
1561    
1562    =item USAGE:
1563    
1564    C<< my $bsc = $bbh->norm_bitscore(); >>
1565    
1566    =item RETURNS:
1567    
1568    The "BLAST bit-score per aligned character" for the pair.
1569    
1570    =back
1571    
1572  =cut  =cut
1573    
1574  sub norm_bitscore {  sub norm_bitscore {
# Line 1439  Line 1585 
1585    
1586  =head1 AnnotationO  =head1 AnnotationO
1587    
1588    Methods for accessing SEED annotations.
1589    
1590  =cut  =cut
1591    
1592    
# Line 1536  Line 1684 
1684    
1685  =head1 CouplingO  =head1 CouplingO
1686    
1687    Methods for accessing the "Functional coupling scores"
1688    of PEGs in close physical proximity to each other.
1689    
1690  =cut  =cut
1691    
1692    
# Line 1607  Line 1758 
1758      my $figO = $self->{_figO};      my $figO = $self->{_figO};
1759      my $fig  = $figO->{_fig};      my $fig  = $figO->{_fig};
1760      my @ev = ();      my @ev = ();
1761      foreach my $tuple ($fig->coupling_evidence($self->peg1,$self->peg2))      foreach my $tuple ($fig->coupling_evidence($self->peg1->id,$self->peg2->id))
1762      {      {
1763          my($peg3,$peg4,$rep) = @$tuple;          my($peg3,$peg4,$rep) = @$tuple;
1764          push(@ev,[&FeatureO::new('FeatureO',$figO,$peg3),          push(@ev,[&FeatureO::new('FeatureO',$figO,$peg3),
# Line 1673  Line 1824 
1824    
1825  =head3 usable  =head3 usable
1826    
1827    
1828  =cut  =cut
1829    
1830  sub usable {  sub usable {
# Line 1871  Line 2023 
2023      my $famO = $self->{_famO};      my $famO = $self->{_famO};
2024      if (! $famO) { $famO = $self->{_famO} = &FigFam::new('FigFam',$fig,$self->id) }      if (! $famO) { $famO = $self->{_famO} = &FigFam::new('FigFam',$fig,$self->id) }
2025    
2026      return map { &FigFamO::new('FigFamO',$figO,$_) } $famO->list_members;      return map { &FeatureO::new('FeatureO',$figO,$_) } $famO->list_members;
2027  }  }
2028    
   
   
2029  =head3 rep_seqs  =head3 rep_seqs
2030    
2031  =cut  =cut

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3