MAGE::...Feature(3pm)
MAGE::...Feature π (that's MAGE::...Feature(3pm), from your User Contributed Perl Documentation bestie)
okay so like. you opened a manpage. and not just any manpage, it's MAGE::...Feature(3pm) and it's genuinely serving. sit down, grab a strawberry π, we're doing this.
β¨ NAME β¨
Bio::MAGE::BioSequence::SeqFeature β it's the Class for the MAGE-OM API. that's the whole vibe. that's the name. iconic. π
β¨ SYNOPSIS β¨
okay here's the actual code, no cap, copy it exactly:
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
look at all those getters and setters. getter/setter couples are literally the blueprint of every healthy relationship bestie π«Ά
β¨ DESCRIPTION β¨
straight from the MAGE-OM documentation for the SeqFeature class, quote unquote:
Represents, in general, what would be a GenBank Feature Table annotation for a sequence.
so basically: it's the annotation on a sequence. it's giving "notes app but for genomics". π§¬
β¨ INHERITANCE β¨
Bio::MAGE::BioSequence::SeqFeature has the following superclasses:
Bio::MAGE::Describable
one (1) superclass. it knows its roots. πΈ
β¨ CLASS METHODS β¨
these ones? you can call all of them without making an instance first β just hit them with the Bio::MAGE::BioSequence::SeqFeature->methodname() syntax. no object required. it's giving independent. π
β¨ new() β¨
β¨ new(%args) β¨
the object constructor new() accepts these optional named-value style arguments:
basisβ Sets the value of thebasisattributeauditTrailβ Sets the value of theauditTrailassociation (this association was inherited from classBio::MAGE::Describable). The value must be of type: array ofBio::MAGE::AuditAndSecurity::Audit.propertySetsβ Sets the value of thepropertySetsassociation (this association was inherited from classBio::MAGE::Extendable). The value must be of type: array ofBio::MAGE::NameValueType.regionsβ Sets the value of theregionsassociation The value must be of type: array ofBio::MAGE::BioSequence::SeqFeatureLocation.descriptionsβ Sets the value of thedescriptionsassociation (this association was inherited from classBio::MAGE::Describable). The value must be of type: array ofBio::MAGE::Description::Description.securityβ Sets the value of thesecurityassociation (this association was inherited from classBio::MAGE::Describable). The value must be of type: instance ofBio::MAGE::AuditAndSecurity::Security.
β¨ $obj = class->new(%parameters) β¨
the new() method is the class constructor. yes it does both. multi-talented.
- Parameters: if given a list of name/value parameters the corresponding slots, attributes, or associations will have their initial values set by the constructor.
- Return value: It returns a reference to an object of the class.
- Side effects: It invokes the
initialize()method if it is defined by the class.
β¨ @names = class->get_slot_names() β¨
the get_slot_names() method is used to retrieve the name of all slots defined in a given class.
NOTE: the list of names does not include attribute or association names.
- Return value: A list of the names of all slots defined for this class.
- Side effects: none
β¨ @name_list = get_attribute_names() β¨
returns the list of attribute data members for this class.
β¨ @name_list = get_association_names() β¨
returns the list of association data members for this class.
β¨ @class_list = get_superclasses() β¨
returns the list of superclasses for this class.
β¨ @class_list = get_subclasses() β¨
returns the list of subclasses for this class.
β¨ $name = class_name() β¨
Returns the full class name for this class.
β¨ $package_name = package_name() β¨
Returns the base package name (i.e. no 'namespace::') of the package that contains this class.
β¨ %assns = associations() β¨
returns the association meta-information in a hash where the keys are the association names and the values are Association objects that provide the meta-information for the association.
β¨ INSTANCE METHODS β¨
β¨ $obj_copy = $obj->new() β¨
When invoked with an existing object reference and not a class name, the new() method acts as a copy constructor β with the new object's initial values set to be those of the existing object. clone era. π
- Parameters: No input parameters are used in the copy constructor, the initial values are taken directly from the object to be copied.
- Return value: It returns a reference to an object of the class.
- Side effects: It invokes the
initialize()method if it is defined by the class.
β¨ $obj->set_slots(%parameters) β¨
β¨ $obj->set_slots(\@name_list, \@value_list) β¨
the set_slots() method is used to set a number of slots at the same time. It has two different invocation methods. The first takes a named parameter list, and the second takes two array references.
- Return value: none
- Side effects: will call
croak()if a slot_name is used that the class does not define.
bestie do NOT pass a slot name this class doesn't define. it will croak(). literally. π
β¨ @obj_list = $obj->get_slots(@name_list) β¨
the get_slots() method is used to get the values of a number of slots at the same time.
- Return value: a list of instance objects
- Side effects: none
β¨ $val = $obj->set_slot($name,$val) β¨
the set_slot() method sets the slot $name to the value $val
- Return value: the new value of the slot, i.e.
$val - Side effects: none
β¨ $val = $obj->get_slot($name) β¨
the get_slot() method is used to get the values of a number of slots at the same time.
- Return value: a single slot value, or
undefif the slot has not been initialized. - Side effects: none
β¨ ATTRIBUTES β¨
Attributes are simple data types that belong to a single instance of a class. In the Perl implementation of the MAGE-OM classes, the interface to attributes is implemented using separate setter and getter methods for each attribute.
Bio::MAGE::BioSequence::SeqFeature has the following attribute accessor methods:
β¨ basis β¨
Methods for the basis attribute.
From the MAGE-OM documentation:
How the evidence for a SeqFeature was determined.
β¨ $val = $seqfeature->setBasis($val) β¨
The restricted setter method for the basis attribute.
basis is an enumerated attribute β it can only be set to undef or one of the following values: experimental computational both unknown NA
- Input parameters: the value to which the
basisattribute will be set - Return value: the current value of the
basisattribute - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified, or if$valis not one of the accepted enumeration values: experimental computational both unknown NA
β¨ $val = $seqfeature->getBasis() β¨
The restricted getter method for the basis attribute.
- Input parameters: none
- Return value: the current value of the
basisattribute : an instance of typeexperimental computational both unknown NA. - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
β¨ ASSOCIATIONS β¨
Associations are references to other classes. Associations in MAGE-OM have a cardinality that determines the minimum and maximum number of instances of the 'other' class that maybe included in the association:
- There must be exactly one item in the association, i.e. this is a mandatory data field.
0..1β There may be one item in the association, i.e. this is an optional data field.1..Nβ There must be one or more items in the association, i.e. this is a mandatory data field, with list cardinality.0..Nβ There may be one or more items in the association, i.e. this is an optional data field, with list cardinality.
Bio::MAGE::BioSequence::SeqFeature has the following association accessor methods:
β¨ auditTrail β¨
Methods for the auditTrail association.
From the MAGE-OM documentation:
A list of Audit instances that track changes to the instance of Describable.
β¨ $array_ref = $seqfeature->setAuditTrail($array_ref) β¨
The restricted setter method for the auditTrail association.
- Input parameters: the value to which the
auditTrailassociation will be set : a reference to an array of objects of typeBio::MAGE::AuditAndSecurity::Audit - Return value: the current value of the
auditTrailassociation : a reference to an array of objects of typeBio::MAGE::AuditAndSecurity::Audit - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified, or if$array_refis not a reference to an array classBio::MAGE::AuditAndSecurity::Auditinstances
β¨ $array_ref = $seqfeature->getAuditTrail() β¨
The restricted getter method for the auditTrail association.
- Input parameters: none
- Return value: the current value of the
auditTrailassociation : a reference to an array of objects of typeBio::MAGE::AuditAndSecurity::Audit - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
β¨ $val = $seqfeature->addAuditTrail(@vals) β¨
Because the auditTrail association has list cardinality, it may store more than one value. This method adds the current list of objects in the auditTrail association.
- Input parameters: the list of values
@valsto add to the auditTrail association. NOTE: submitting a single value is permitted.
Return value: how many items are chillin' in the slot after you add @vals β that's the count, bestie π
Side effects: literally none, we're squeaky clean β¨
Exceptions: it's gonna hit you with croak() if you show up with no input parameters, or if any of the objects in @vals isn't an instance of class Bio::MAGE::AuditAndSecurity::Audit β like, read the room, wrong type π
propertySets π
Methods for the propertySets association. No cap.
From the MAGE-OM documentation:
Allows specification of name/value pairs. Meant to primarily help in-house, pipeline processing of instances by providing a place for values that aren't part of the specification proper.
$array_ref = $seqfeature->setPropertySets($array_ref)β the restricted setter method for thepropertySetsassociation π- Input parameters: the value to which the
propertySetsassociation will be set : a reference to an array of objects of typeBio::MAGE::NameValueType - Return value: the current value of the
propertySetsassociation : a reference to an array of objects of typeBio::MAGE::NameValueType - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified, or if$array_refis not a reference to an array classBio::MAGE::NameValueTypeinstances
- Input parameters: the value to which the
$array_ref = $seqfeature->getPropertySets()β the restricted getter method for thepropertySetsassociation π- Input parameters: none
- Return value: the current value of the
propertySetsassociation : a reference to an array of objects of typeBio::MAGE::NameValueType - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
$val = $seqfeature->addPropertySets(@vals)β because thepropertySetsassociation has list cardinality, it may store more than one value. This method adds the current list of objects in thepropertySetsassociation π«Ά- Input parameters: the list of values
@valsto add to thepropertySetsassociation. NOTE: submitting a single value is permitted. - Return value: the number of items stored in the slot after adding
@vals - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if any of the objects in@valsis not an instance of classBio::MAGE::NameValueType
- Input parameters: the list of values
regions π¦
Methods for the regions association, periodt.
From the MAGE-OM documentation:
Association to classes that describe the location with the sequence of the SeqFeature.
$array_ref = $seqfeature->setRegions($array_ref)β the restricted setter method for theregionsassociation π- Input parameters: the value to which the
regionsassociation will be set : a reference to an array of objects of typeBio::MAGE::BioSequence::SeqFeatureLocation - Return value: the current value of the
regionsassociation : a reference to an array of objects of typeBio::MAGE::BioSequence::SeqFeatureLocation - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified, or if$array_refis not a reference to an array classBio::MAGE::BioSequence::SeqFeatureLocationinstances
- Input parameters: the value to which the
$array_ref = $seqfeature->getRegions()β the restricted getter method for theregionsassociation π- Input parameters: none
- Return value: the current value of the
regionsassociation : a reference to an array of objects of typeBio::MAGE::BioSequence::SeqFeatureLocation - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
$val = $seqfeature->addRegions(@vals)β because theregionsassociation has list cardinality, it may store more than one value. This method adds the current list of objects in theregionsassociation π«Ά- Input parameters: the list of values
@valsto add to theregionsassociation. NOTE: submitting a single value is permitted. - Return value: the number of items stored in the slot after adding
@vals - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if any of the objects in@valsis not an instance of classBio::MAGE::BioSequence::SeqFeatureLocation
- Input parameters: the list of values
descriptions πΈ
Methods for the descriptions association. It's giving very wordy, very demure.
From the MAGE-OM documentation:
Free hand text descriptions. Makes available the associations of Description to an instance of Describable.
$array_ref = $seqfeature->setDescriptions($array_ref)β the restricted setter method for thedescriptionsassociation π- Input parameters: the value to which the
descriptionsassociation will be set : a reference to an array of objects of typeBio::MAGE::Description::Description - Return value: the current value of the
descriptionsassociation : a reference to an array of objects of typeBio::MAGE::Description::Description - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified, or if$array_refis not a reference to an array classBio::MAGE::Description::Descriptioninstances
- Input parameters: the value to which the
$array_ref = $seqfeature->getDescriptions()β the restricted getter method for thedescriptionsassociation π- Input parameters: none
- Return value: the current value of the
descriptionsassociation : a reference to an array of objects of typeBio::MAGE::Description::Description - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
$val = $seqfeature->addDescriptions(@vals)β because thedescriptionsassociation has list cardinality, it may store more than one value. This method adds the current list of objects in thedescriptionsassociation π«Ά- Input parameters: the list of values
@valsto add to thedescriptionsassociation. NOTE: submitting a single value is permitted. - Return value: the number of items stored in the slot after adding
@vals - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if any of the objects in@valsis not an instance of classBio::MAGE::Description::Description
- Input parameters: the list of values
security π
Methods for the security association. Main character access control energy, fr fr.
From the MAGE-OM documentation:
Information on the security for the instance of the class.
$val = $seqfeature->setSecurity($val)β the restricted setter method for thesecurityassociation π- Input parameters: the value to which the
securityassociation will be set : one of the accepted enumerated values. - Return value: the current value of the
securityassociation : one of the accepted enumerated values. - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified, or if$valis not an instance of classBio::MAGE::AuditAndSecurity::Security
- Input parameters: the value to which the
$val = $seqfeature->getSecurity()β the restricted getter method for thesecurityassociation π- Input parameters: none
- Return value: the current value of the
securityassociation : an instance of typeBio::MAGE::AuditAndSecurity::Security. - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
And then, last thing in this chunk, there's this lil guy doing its thing π§ β no notes, it just vibes:
sub initialize {
my $self = shift;
return 1;
}
β¨ SLOTS, ATTRIBUTES, AND ASSOCIATIONS β¨
okay so in the Perl implementation of MAGE-OM classes there are literally three types of class data members: "slots", "attributes", and "associations". bestie, that's the whole vibe.
π SLOTS π
This API calls a "slot" a data member of the class that was not present in the UML model, and it's used mainly for internal purposes. So like, use only if you understand the inner workings of the API. Most often slots are used by generic methods such as those in the XML writing and reading classes. periodt.
Slots are implemented using unified getter/setter methods:
$var = $obj->slot_name();β Retrieves the current value of the slot. β¨$new_var = $obj->slot_name($new_var);β Store$new_varin the slot; the return value is also$new_var. π@names = $obj->get_slot_names()β Returns the list of all slots in the class. π
DATA CHECKING: No data type checking is made for these methods. no cap.
π ATTRIBUTES AND ASSOCIATIONS π
The terms "attribute" and "association" indicate data members of the class that were specified directly from the UML model. iykyk.
In the Perl implementation of MAGE-OM classes, association and attribute accessors are implemented using three separate methods:
get*β Retrieves the current value.
NOTE: For associations, if the association has list cardinality, an array reference is returned.
DATA CHECKING: Ensure that no argument is provided.
set*β Sets the current value, replacing any existing value.
NOTE: For associations, if the association has list cardinality, the argument must be an array reference. Because of this, you probably should be using the add* methods.
DATA CHECKING: For attributes, ensure that a single value is provided as the argument. For associations, if the association has list cardinality, ensure that the argument is a reference to an array of instances of the correct MAGE-OM class, otherwise ensure that there is a single argument of the correct MAGE-OM class.
add*β NOTE: Only present in associations with list cardinality.
Appends a list of objects to any values that may already be stored in the association.
DATA CHECKING: Ensure that all arguments are of the correct MAGE-OM class.
π«Ά GENERIC METHODS π«Ά
The unified base class of all MAGE-OM classes, Bio::MAGE::Base, provides a set of generic methods that will operate on slots, attributes, and associations:
$val = $obj->get_slot($name)
\@list_ref = $obj->get_slots(@name_list);
$val = $obj->set_slot($name,$val)
$obj->set_slots(%parameters)
$obj->set_slots(\@name_list, \@value_list)
See elsewhere in this page for a detailed description of these methods. π
π BUGS π
Please send bug reports to the project mailing list: (mged-mage 'at' lists 'dot' sf 'dot' net).
π AUTHOR π
Jason E. Stewart (jasons 'at' cpan 'dot' org).
π SEE ALSO π
π POD ERRORS π
Hey! The above document had some coding errors, which are explained below:
- Around line 343:
'=item' outside of any '=over' - Around line 428:
You forgot a '=back' before '=head2' - Around line 532:
Expected '=item 2' - Around line 537:
Expected '=item 3' - Around line 542:
Expected '=item 4'
okay bestie, that's the whole page. this manual page was served up by perl v5.32.0, dated 2020-11-27, and it's MAGE::...Feature(3pm). slay π
β¨
π¦ where this page comes from
- debian bookworm: libbio-mage-perl 20030502.3-6 Β· MIT
- debian trixie: libbio-mage-perl 20030502.3-6 Β· MIT
- ubuntu jammy: libbio-mage-perl 20030502.3-6 Β· MIT
- ubuntu noble: libbio-mage-perl 20030502.3-6 Β· MIT
- ubuntu resolute: libbio-mage-perl 20030502.3-6 Β· MIT
- ubuntu stonking: libbio-mage-perl 20030502.3-6 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms