GNU.WIKI: The GNU/Linux Knowledge Base

  [HOME] [PHP Manual] [HowTo] [ABS] [MAN1] [MAN2] [MAN3] [MAN4] [MAN5] [MAN6] [MAN7] [MAN8] [MAN9]

  [0-9] [Aa] [Bb] [Cc] [Dd] [Ee] [Ff] [Gg] [Hh] [Ii] [Jj] [Kk] [Ll] [Mm] [Nn] [Oo] [Pp] [Qq] [Rr] [Ss] [Tt] [Uu] [Vv] [Ww] [Xx] [Yy] [Zz]


         # create Bio::Coordinate::Pairs, or any MapperIs, somehow
         $pair1; $pair2;

         # add them into a Chain
         $collection = Bio::Coordinate::Chain->new;

         # create a position and map it
         $pos = Bio::Location::Simple->new (-start => 5, -end => 9 );
         $match = $collection->map($pos);
         if ($match) {
             sprintf "Matches at %d-%d
", $match->start, $match->end,
         } else {
             print "No match


       This class assumes that you have built several mappers and want to link
       them together so that output from the previous mapper is the next
       mappers input. This way you can build arbitrarily complex mappers from
       simpler components.

       Note that Chain does not do any sanity checking on its mappers. You are
       solely responsible that input and output coordinate systems, direction
       of mapping and parameters internal to mappers make sense when chained

       To put it bluntly, the present class is just a glorified foreach loop
       over an array of mappers calling the map method.

       It would be neat to an internal function that would generate a new
       single step mapper from those included in the chain. It should speed
       things up considerably. Any volunteers?

        Title   : map
        Usage   : $newpos = $obj->map($pos);
        Function: Map the location through all the mappers in the chain.
        Example :
        Returns : new Location in the output coordiante system
        Args    : a Bio::Location::Simple object

   Inherited methods
        Title   : add_mapper
        Usage   : $obj->add_mapper($mapper)
        Function: Pushes one Bio::Coodinate::MapperI into the list of mappers.
                  Sets _is_sorted() to false.
        Example :
        Returns : 1 when succeeds, 0 for failure.
        Args    : mapper object

        Title   : mappers
        Usage   : $obj->mappers();
        Function: Returns or sets a list of mappers.
        Example :
        Returns : array of mappers
        Args    : array of mappers

        Title   : each_mapper
        Usage   : $obj->each_mapper();
        Function: Returns a list of mappers.
        Example :
        Returns : array of mappers
        Args    : none

        Title   : swap
        Usage   : $obj->swap;
        Function: Swap the direction of mapping;input <-> output
        Example :
        Returns : 1
        Args    :

        Title   : test
        Usage   : $obj->test;
        Function: test that both components of all pairs are of the same length.
                  Ran automatically.
        Example :
        Returns : boolean
        Args    :

       You do not really want to sort your chain, do you! This function does
       nothing other than a warning.

  All copyrights belong to their respective owners. Other content (c) 2014-2018, GNU.WIKI. Please report site errors to
Page load time: 0.087 seconds. Last modified: November 04 2018 12:49:43.