DOKK / manpages / debian 10 / libbio-perl-perl / Bio::Phenotype::MeSH::Twig.3pm.en
Bio::Phenotype::MeSH::Twig(3pm) User Contributed Perl Documentation Bio::Phenotype::MeSH::Twig(3pm)

Bio::Phenotype::MeSH::Twig - Context for a MeSH term

  use Bio::Phenotype::MeSH::Twig
  # create a twig object
  my $twig = Bio::Phenotype::MeSH::Twig->new();
  # the term has only one parent in any twig
  $twig->parent('Fats');
  # a twig makeas sense only in the context of a term
  # which is a  Bio::Phenotype::MeSH::Term object
  # a term can have many twigs i.e. it can appear in many places in
  # the hierarchy
  #
  $ term->add_twig($twig);
  # adding the twig into a term adds a link into into it 
  $twig->term eq $term;
  # a twig can know about other terms under the parant node
  $twig->add_sister('Bread', 'Candy', 'Cereals');
  print join ( ', ', $twig->each_sister()), "\n";
  # a twig can know about other terms under this term
  $twig->add_child('Butter', 'Margarine');
  print join ( ', ', $twig->each_child()), "\n";

This class represents the immediate surrounding of a MeSH term. It keeps track on nodes names above the current node ('parent') other nodes at the same level ('sisters') and nodes under it ('children'). Note that these are name strings, not objects.

Each twig can be associated with only one term, but term can have multiple twigs. (Twigs can be though to be roles for a term.)

Bio::Phenotype::MeSH::Term

User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing lists Your participation is much appreciated.

  bioperl-l@bioperl.org                  - General discussion
  http://bioperl.org/wiki/Mailing_lists  - About the mailing lists

Please direct usage questions or support issues to the mailing list:

bioperl-l@bioperl.org

rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.

report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web:

  https://github.com/bioperl/bioperl-live/issues

Heikki Lehvaslaiho, heikki-at-bioperl-dot-org

The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _

 Title   : parent
 Usage   : $obj->parent( "r1" );
           or
           print $obj->parent();
 Function: Set/get for the parent.
 Returns : A parent [scalar].
 Args    : A parent [scalar] (optional).

 Title   : term
 Usage   : $obj->term( "r1" );
           or
           print $obj->term();
 Function: Set/get for the term.
 Returns : A term [scalar].
 Args    : A term [scalar] (optional).

 Title   : add_child
 Usage   : $obj->add_child( @children );
           or
           $obj->add_child( $child );
 Function: Pushes one or more child term names [scalars, most likely Strings]
           into the list of children.
 Returns : 
 Args    : scalar(s).

 Title   : each_child()
 Usage   : @gs = $obj->each_child();
 Function: Returns a list of gene symbols [scalars, most likely Strings]
           associated with this phenotype.
 Returns : A list of scalars.
 Args    :

 Usage   : $obj->purge_child();
 Function: Deletes  the list of children associated with this term.
 Returns : A list of scalars.
 Args    :

 Title   : add_sister
 Usage   : $obj->add_sister( @sisters );
           or
           $obj->add_sister( $sister );
 Function: Pushes one or more sister term names [scalars, most likely Strings]
           into the list of sisters.
 Returns : 
 Args    : scalar(s).

 Title   : each_sister()
 Usage   : @gs = $obj->each_sister();
 Function: Returns a list of gene symbols [scalars, most likely Strings]
           associated with this phenotype.
 Returns : A list of scalars.
 Args    :

 Usage   : $obj->purge_sister();
 Function: Deletes  the list of sisters associated with this term.
 Returns : A list of scalars.
 Args    :
2018-10-27 perl v5.26.2