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

Diff of /FigKernelPackages/BasicLocation.pm

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

revision 1.10, Wed Jun 21 03:09:41 2006 UTC revision 1.11, Tue Apr 10 03:26:19 2007 UTC
# Line 968  Line 968 
968  =cut  =cut
969  #: Return Type $%;  #: Return Type $%;
970    
971    =head3 Adjacent
972    
973    C<< my $okFlag = $loc->Adjacent($other); >>
974    
975    Return TRUE if the other location is adjacent to this one, else FALSE. The other
976    location must have the same direction and start immediately after this location's
977    endpoint.
978    
979    =over 4
980    
981    =item other
982    
983    BasicLocation object for the other location.
984    
985    =item RETURN
986    
987    Returns TRUE if the other location is an extension of this one, else FALSE.
988    
989    =back
990    
991    =cut
992    
993  =head3 Combine  =head3 Combine
994    
995  C<< $loc->Combine($other); >>  C<< $loc->Combine($other); >>
# Line 1371  Line 1393 
1393      }      }
1394  }  }
1395    
1396    =head3 Adjacent
1397    
1398    C<< my $okFlag = $loc->Adjacent($other); >>
1399    
1400    Return TRUE if the other location is adjacent to this one, else FALSE. The other
1401    location must have the same direction and start immediately after this location's
1402    endpoint.
1403    
1404    =over 4
1405    
1406    =item other
1407    
1408    BasicLocation object for the other location.
1409    
1410    =item RETURN
1411    
1412    Returns TRUE if the other location is an extension of this one, else FALSE.
1413    
1414    =back
1415    
1416    =cut
1417    
1418    sub Adjacent {
1419        # Get the parameters.
1420        my ($self, $other) = @_;
1421        # Default to non-adjacent.
1422        my $retVal = 0;
1423        # Only proceed if the contigs and directions are the seme.
1424        if ($self->Dir eq $other->Dir && $self->Contig eq $other->Contig) {
1425            # Check the begin and end points.
1426            $retVal = ($self->EndPoint + 1 == $other->Begin);
1427        }
1428        # Return the determination indicator.
1429        return $retVal;
1430    }
1431    
1432  =head3 Combine  =head3 Combine
1433    
1434  C<< $loc->Combine($other); >>  C<< $loc->Combine($other); >>
# Line 1784  Line 1842 
1842      }      }
1843  }  }
1844    
1845    =head3 Adjacent
1846    
1847    C<< my $okFlag = $loc->Adjacent($other); >>
1848    
1849    Return TRUE if the other location is adjacent to this one, else FALSE. The other
1850    location must have the same direction and start immediately after this location's
1851    endpoint.
1852    
1853    =over 4
1854    
1855    =item other
1856    
1857    BasicLocation object for the other location.
1858    
1859    =item RETURN
1860    
1861    Returns TRUE if the other location is an extension of this one, else FALSE.
1862    
1863    =back
1864    
1865    =cut
1866    
1867    sub Adjacent {
1868        # Get the parameters.
1869        my ($self, $other) = @_;
1870        # Default to non-adjacent.
1871        my $retVal = 0;
1872        # Only proceed if the contigs and directions are the seme.
1873        if ($self->Dir eq $other->Dir && $self->Contig eq $other->Contig) {
1874            # Check the begin and end points.
1875            $retVal = ($self->EndPoint - 1 == $other->Begin);
1876        }
1877        # Return the determination indicator.
1878        return $retVal;
1879    }
1880    
1881  =head3 Combine  =head3 Combine
1882    
1883  C<< $loc->Combine($other); >>  C<< $loc->Combine($other); >>

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3