Bio-MAGE

 view release on metacpan or  search on metacpan

MAGE/BioSequence/SeqFeature.pm  view on Meta::CPAN

# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.



package Bio::MAGE::BioSequence::SeqFeature;
use strict;
use Carp;

use base qw(Bio::MAGE::Describable);

use Bio::MAGE::Association;

use vars qw($__ASSOCIATIONS
	    $__CLASS_NAME
	    $__PACKAGE_NAME
	    $__SUBCLASSES
	    $__SUPERCLASSES
	    $__ATTRIBUTE_NAMES
	    $__ASSOCIATION_NAMES
	   );

use constant BASIS_UNKNOWN => 'unknown';
use constant BASIS_EXPERIMENTAL => 'experimental';
use constant BASIS_NA => 'NA';
use constant BASIS_COMPUTATIONAL => 'computational';
use constant BASIS_BOTH => 'both';

=head1 NAME

Bio::MAGE::BioSequence::SeqFeature - Class for the MAGE-OM API

=head1 SYNOPSIS

  use Bio::MAGE::BioSequence::SeqFeature

  # creating an empty instance
  my $seqfeature = Bio::MAGE::BioSequence::SeqFeature->new();

  # creating an instance with existing data
  my $seqfeature = Bio::MAGE::BioSequence::SeqFeature->new(
        basis=>$basis_val,
        auditTrail=>\@audit_list,
        propertySets=>\@namevaluetype_list,
        regions=>\@seqfeaturelocation_list,
        descriptions=>\@description_list,
        security=>$security_ref,
  );


  # 'basis' attribute
  my $basis_val = $seqfeature->basis(); # getter
  $seqfeature->basis($value); # setter


  # 'auditTrail' association
  my $audit_array_ref = $seqfeature->auditTrail(); # getter
  $seqfeature->auditTrail(\@audit_list); # setter

  # 'propertySets' association
  my $namevaluetype_array_ref = $seqfeature->propertySets(); # getter
  $seqfeature->propertySets(\@namevaluetype_list); # setter

  # 'regions' association
  my $seqfeaturelocation_array_ref = $seqfeature->regions(); # getter
  $seqfeature->regions(\@seqfeaturelocation_list); # setter

  # 'descriptions' association
  my $description_array_ref = $seqfeature->descriptions(); # getter
  $seqfeature->descriptions(\@description_list); # setter

  # 'security' association
  my $security_ref = $seqfeature->security(); # getter
  $seqfeature->security($security_ref); # setter



=head1 DESCRIPTION

From the MAGE-OM documentation for the C<SeqFeature> class:

Represents, in general, what would be a GenBank Feature Table annotation for a sequence.



=cut

=head1 INHERITANCE


Bio::MAGE::BioSequence::SeqFeature has the following superclasses:

=over


=item * Bio::MAGE::Describable


=back



=cut

BEGIN {
  $__CLASS_NAME        = q[Bio::MAGE::BioSequence::SeqFeature];
  $__PACKAGE_NAME      = q[BioSequence];
  $__SUBCLASSES        = [];
  $__SUPERCLASSES      = ['Bio::MAGE::Describable'];
  $__ATTRIBUTE_NAMES   = ['basis'];
  $__ASSOCIATION_NAMES = ['auditTrail', 'propertySets', 'regions', 'descriptions', 'security'];
  $__ASSOCIATIONS      = [
          'regions',
          bless( {
                   '__SELF' => bless( {
                                        '__NAME' => undef,
                                        '__IS_REF' => 0,
                                        '__CARDINALITY' => '1',
                                        '__DOCUMENTATION' => 'Association to classes that describe the location with the sequence of the SeqFeature.',
                                        '__CLASS_NAME' => 'SeqFeature',
                                        '__RANK' => undef,
                                        '__ORDERED' => undef
                                      }, 'Bio::MAGE::Association::End' ),
                   '__OTHER' => bless( {
                                         '__NAME' => 'regions',
                                         '__IS_REF' => 1,



( run in 0.484 second using v1.01-cache-2.11-cpan-71847e10f99 )