TFBS::SitePairSet(3) a set of TFBS::SitePair objects


my $site_pair_set = TFBS::SitePairSet->new(@list_of_site_pair_objects);
# add a TFBS::SitePair object to set:

# append another TFBS::SitePairSet contents:
# create an iterator:
my $it = $site_pair_set->Iterator(-sort_by => 'start');


TFBS::SitePairSet is an aggregate class that contains a collection of TFBS::SitePair objects. It can be created anew and filled with TFBS::Site::Pair object. It is also returned by search_aln() method call of TFBS::PatternI subclasses (e.g. TFBS::Matrix::PWM).


Please send bug reports and other comments to the author.

AUTHOR - Boris Lenhard

Boris Lenhard <[email protected]>


The rest of the documentation details each of the object methods. Internal methods are preceded with an underscore.


 Title   : size
 Usage   : my $size = $sitepairset->size()
 Function: returns a number of TFBS::SitePair objects contained in the set
 Returns : a scalar (integer) 
 Args    : none


 Title   : add_site_pair
 Usage   : $sitepairset->add_site_pair($site_pair_object)
 Function: adds TFBS::SitePair objects to an existing TFBS::SitePairSet object
 Returns : $sitepairset object (usually ignored)
 Args    : A list of TFBS::SitePair objects to add


 Title   : add_site_pair_set
 Usage   : $sitepairset->add_site_pair_set($site_pair_set_object)
 Function: adds the contents of other TFBS::SitePairSet objects 
           to an existing TFBS::SitePairSet object
 Returns : $sitepairset object (usually ignored)
 Args    : A list of TFBS::SitePairSet objects whose contents should be 
           added to $sitepairset


  Title   : Iterator
  Usage   : my $it = $sitepairset->Iterator(-sort_by=>'start');
            while (my $site_pair = $it->next()) { #... 
  Function: Returns an iterator object, used to iterate thorugh elements 
            (TFBS::SitePair objects)
  Returns : a TFBS::_Iterator object
  Args    : -sort_by # optional - currently it accepts 
                    #   (default sort order in parenthetse)
                    #    'name' (pattern name, alphabetically)
                    #    'ID' (pattern/matrix ID, alphabetically)
                    #    'start' (site start in sequence, 
                    #             numerically,increasing order)
                    #    'end' (site end in sequence, 
                    #           numerically, increasing order)
                    #    'score' (1st site in pair,
                    #             numerically, decreasing order)
            -reverse # optional - reverses the default sorting order if true



  Title   : set1
  Usage   : my $siteset1 = $sitepairset->set1();
          : my $siteset2 = $sitepairset->set2()
  Function: Returns individual TFBS::SiteSet objects, from the site set pair
  Returns : A TFBS::SiteSet object
  Args    : none


 Title   : GFF
 Usage   : print $site->GFF();
         : print $site->GFF($gff_formatter)
 Function: returns a "standard" multiline GFF string 
 Returns : a string (multiline, newline terminated)
 Args    : a $gff_formatter function reference (optional)