View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Robert Buels > Bio-Chado-Schema-0.20000 > Bio::Chado::Schema::Util



Annotate this POD



New  1
Open  0
View/Report Bugs
Module Version: 0.20000   Source  


Bio::Chado::Schema::Util - utility functions shared by Bio::Chado::Schema objects


  sub create_organismprops {
      my ($self, $props, $opts) = @_;

      # process opts
      $opts ||= {};
      $opts->{cv_name} = 'organism_property'
          unless defined $opts->{cv_name};

      return Bio::Chado::Schema::Util->create_props
          ( properties => $props,
            options    => $opts,
            row        => $self,
            prop_relation_name => 'organismprops',


Helper functions used by several schema classes.

Important Note: This package is located in the file as secondary package and it haven't a file for itself. Nevertheless, the use will be the same.



  Usage: *::Util->create_properties( row => $self,
                                     properties => { baz => 2, foo => 'bar' },
                                     options => { cv_name => autocreate => 0, ...},
                                     prop_relation_name => 'organismprops',

  Desc : Chado has a number of <thing>prop tables with a similar
         structure.  This utility function is used by a number of
         modules to create properties in these kinds of tables.

  Args : row => the DBIC row object to create properties for,
         prop_relation_name => the DBIC relation name for the
                               properties table to operate on,
                               e.g. 'featureprops',
         properties => hashref of { propname => value, ...},
         options => options hashref as:
               autocreate => 0,
                  (optional) boolean, if passed, automatically create cv,
                  cvterm, and dbxref rows if one cannot be found for the
                  given featureprop name.  Default false.

               cv_name => to use for the given featureprops.
                          Defaults to 'feature_property',

               db_name => to use for autocreated dbxrefs,
                          default 'null',

               allow_duplicate_values => default false.
                   If true, allow duplicate instances of the same cvterm
                   and value in the properties of the feature.  Duplicate
                   values will have different ranks.

               dbxref_accession_prefix => optional, default
               definitions => optional hashref of:
                   { cvterm_name => definition,
                to load into the cvterm table when autocreating cvterms
  Ret  : hashref of { propname => new row object in property table }


Robert Buels, <>

Naama Menda, <>

syntax highlighting: