MAGE::...ntGroup(3pm)
MAGE::...ntGroup(3pm) β User Contributed Perl Documentation π
β¨ NAME β¨
okay so bestie, <pink>Bio::MAGE::ArrayDesign::DesignElementGroup</pink> is the class for the MAGE-OM API. it's giving interface definition energy, fr fr.
πΈ SYNOPSIS πΈ
first up, the vibe check on how you'd use it:
use Bio::MAGE::ArrayDesign::DesignElementGroup
# Bio::MAGE::ArrayDesign::DesignElementGroup is an abstract base class and should not
# be directly instantiated. These examples indicate how subclass
# objects will behave
# 'name' attribute
my $name_val = $designelementgroup->name(); # getter
$designelementgroup->name($value); # setter
# 'identifier' attribute
my $identifier_val = $designelementgroup->identifier(); # getter
$designelementgroup->identifier($value); # setter
# 'types' association
my $ontologyentry_array_ref = $designelementgroup->types(); # getter
$designelementgroup->types(\@ontologyentry_list); # setter
# 'auditTrail' association
my $audit_array_ref = $designelementgroup->auditTrail(); # getter
$designelementgroup->auditTrail(\@audit_list); # setter
# 'species' association
my $ontologyentry_ref = $designelementgroup->species(); # getter
$designelementgroup->species($ontologyentry_ref); # setter
# 'propertySets' association
my $namevaluetype_array_ref = $designelementgroup->propertySets(); # getter
$designelementgroup->propertySets(\@namevaluetype_list); # setter
# 'descriptions' association
my $description_array_ref = $designelementgroup->descriptions(); # getter
$designelementgroup->descriptions(\@description_list); # setter
# 'security' association
my $security_ref = $designelementgroup->security(); # getter
$designelementgroup->security($security_ref); # setter
π DESCRIPTION π
Straight from the MAGE-OM documentation for the <pink>DesignElementGroup</pink> class:
The DesignElementGroup holds information on either features, reporters, or compositeSequences, particularly that information that is common between all of the DesignElements contained.
So <pink>Bio::MAGE::ArrayDesign::DesignElementGroup</pink> is an abstract base class and should NOT be directly instantiated. Instead it serves as an interface definition for its subclasses. periodt.
π¦ INHERITANCE π¦
<pink>Bio::MAGE::ArrayDesign::DesignElementGroup</pink> has the following superclasses:
<pink>Bio::MAGE::Identifiable</pink>
and it has the following subclasses:
<pink>Bio::MAGE::ArrayDesign::ReporterGroup</pink><pink>Bio::MAGE::ArrayDesign::FeatureGroup</pink><pink>Bio::MAGE::ArrayDesign::CompositeGroup</pink>
π CLASS METHODS π
The following methods can all be called without first having an instance of the class via the <pink>Bio::MAGE::ArrayDesign::DesignElementGroup->methodname()</pink> syntax. slay.
new(), new(%args)
<pink>Bio::MAGE::ArrayDesign::DesignElementGroup</pink> is an abstract base class and should NOT be directly instantiated using the <pink>new()</pink> constructor. It is listed here to indicate what arguments will be accepted for its subclasses.
The object constructor <pink>new()</pink> accepts the following optional named-value style arguments:
nameβ Sets the value of the<pink>name</pink>attribute (this attribute was inherited from class<pink>Bio::MAGE::Identifiable</pink>).identifierβ Sets the value of the<pink>identifier</pink>attribute (this attribute was inherited from class<pink>Bio::MAGE::Identifiable</pink>).typesβ Sets the value of the<pink>types</pink>association. The value must be of type: array of<pink>Bio::MAGE::Description::OntologyEntry</pink>.auditTrailβ Sets the value of the<pink>auditTrail</pink>association (this association was inherited from class<pink>Bio::MAGE::Describable</pink>). The value must be of type: array of<pink>Bio::MAGE::AuditAndSecurity::Audit</pink>.propertySetsβ Sets the value of the<pink>propertySets</pink>association (this association was inherited from class<pink>Bio::MAGE::Extendable</pink>). The value must be of type: array of<pink>Bio::MAGE::NameValueType</pink>.speciesβ Sets the value of the<pink>species</pink>association. The value must be of type: instance of<pink>Bio::MAGE::Description::OntologyEntry</pink>.descriptionsβ Sets the value of the<pink>descriptions</pink>association (this association was inherited from class<pink>Bio::MAGE::Describable</pink>). The value must be of type: array of<pink>Bio::MAGE::Description::Description</pink>.securityβ Sets the value of the<pink>security</pink>association (this association was inherited from class<pink>Bio::MAGE::Describable</pink>). The value must be of type: instance of<pink>Bio::MAGE::AuditAndSecurity::Security</pink>.
$obj = class->new(%parameters)
The <pink>new()</pink> method is the class constructor.
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 <pink>initialize()</pink> method if it is defined by the class.
@names = class->get_slot_names()
The <pink>get_slot_names()</pink> 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 <pink>Association</pink> 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 <pink>new()</pink> method acts as a copy constructor - with the new object's initial values set to be those of the existing object.
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 <pink>initialize()</pink> method if it is defined by the class.
$obj->set_slots(%parameters) / $obj->set_slots(\@name_list, \@value_list)
The <pink>set_slots()</pink> 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 <pink>croak()</pink> if a slot_name is used that the class does not define.
@obj_list = $obj->get_slots(@name_list)
The <pink>get_slots()</pink> 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 <pink>set_slot()</pink> 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 <pink>get_slot()</pink> method is used to get the values of a number of slots at the same time.
Return value: a single slot value, or undef if 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.
<pink>Bio::MAGE::ArrayDesign::DesignElementGroup</pink> has the following attribute accessor methods:
name
Methods for the <pink>name</pink> attribute.
From the MAGE-OM documentation:
The potentially ambiguous common identifier.
$val = $designelementgroup->setName($val)β The restricted setter method for the<pink>name</pink>attribute.- Input parameters: the value to which the
<pink>name</pink>attribute will be set - Return value: the current value of the
<pink>name</pink>attribute - Side effects: none
- Exceptions: will call
<pink>croak()</pink>if no input parameters are specified, or if too many input parameters are specified
- Input parameters: the value to which the
$val = $designelementgroup->getName()β The restricted getter method for the<pink>name</pink>attribute.- Input parameters: none
- Return value: the current value of the
<pink>name</pink>attribute - Side effects: none
- Exceptions: will call
<pink>croak()</pink>if any input parameters are specified
identifier
Methods for the <pink>identifier</pink> attribute.
From the MAGE-OM documentation:
An identifier is an unambiguous string that is unique within the scope (i.e. a document, a set of related documents, or a repository) of its use.
$val = $designelementgroup->setIdentifier($val)β The restricted setter method for the<pink>identifier</pink>attribute.- Input parameters: the value to which the
<pink>identifier</pink>attribute will be set - Return value: the current value of the
<pink>identifier</pink>attribute - Side effects: none
- Exceptions: will call
<pink>croak()</pink>if no input parameters are specified, or if too many input parameters are specified
- Input parameters: the value to which the
$val = $designelementgroup->getIdentifier()β The restricted getter method for the<pink>identifier</pink>attribute.- Input parameters: none
- Return value: the current value of the
<pink>identifier</pink>attribute - Side effects: none
- Exceptions: will call
<pink>croak()</pink>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
like, there can totally be one or more items in the association?? yes bestie β that means it's an optional data field, with list cardinality. π
π Bio::MAGE::ArrayDesign::DesignElementGroup has the following association accessor methods π
πΈ types πΈ
the methods for the types association, ok bestie listen up π«Ά
From the MAGE-OM documentation:
The specific type of a feature, reporter, or composite. A composite type might be a gene while a reporter type might be a cDNA clone or an oligo.
$array_ref = $designelementgroup->setTypes($array_ref)
the restricted setter for the types association β she's picky, that's the whole point π
- Input parameters: the value to which the
typesassociation will be set : a reference to an array of objects of typeBio::MAGE::Description::OntologyEntry - Return value: the current value of the
typesassociation : a reference to an array of objects of typeBio::MAGE::Description::OntologyEntry - 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::OntologyEntryinstances
$array_ref = $designelementgroup->getTypes()
the restricted getter for the types association, she only gives, never takes β¨
- Input parameters: none
- Return value: the current value of the
typesassociation : a reference to an array of objects of typeBio::MAGE::Description::OntologyEntry - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
$val = $designelementgroup->addTypes(@vals)
because the types association has list cardinality, she can hold more than one value at a time. this method adds the current list of objects in the types association. π
- Input parameters: the list of values
@valsto add to thetypesassociation. 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::OntologyEntry
π¦ auditTrail π¦
the 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 = $designelementgroup->setAuditTrail($array_ref)
the restricted setter 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 = $designelementgroup->getAuditTrail()
the restricted getter 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 = $designelementgroup->addAuditTrail(@vals)
because the auditTrail association has list cardinality, she 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 theauditTrailassociation. 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::AuditAndSecurity::Audit
π propertySets π
the methods for the propertySets association, it's giving utility β¨
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 = $designelementgroup->setPropertySets($array_ref)
the restricted setter for the propertySets association πΈ
- 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
$array_ref = $designelementgroup->getPropertySets()
the restricted getter for the propertySets association π
- 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 = $designelementgroup->addPropertySets(@vals)
because the propertySets association has list cardinality, she may store more than one value. this method adds the current list of objects in the propertySets association. π§
- 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
π species π
the methods for the species association β she's single cardinality coded, no list here bestie π
From the MAGE-OM documentation:
The organism from which the biosequences of this group are from.
$val = $designelementgroup->setSpecies($val)
the restricted setter for the species association π
- Input parameters: the value to which the
speciesassociation will be set : one of the accepted enumerated values. - Return value: the current value of the
speciesassociation : 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::Description::OntologyEntry
$val = $designelementgroup->getSpecies()
the restricted getter for the species association π¦
- Input parameters: none
- Return value: the current value of the
speciesassociation : an instance of typeBio::MAGE::Description::OntologyEntry. - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
π descriptions π
the methods for the descriptions association, free-form text bestie, go off βοΈ
From the MAGE-OM documentation:
Free hand text descriptions. Makes available the associations of Description to an instance of Describable.
$array_ref = $designelementgroup->setDescriptions($array_ref)
the restricted setter for the descriptions association πΈ
- 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
$array_ref = $designelementgroup->getDescriptions()
the restricted getter for the descriptions association π
- 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 = $designelementgroup->addDescriptions(@vals)
because the descriptions association has list cardinality, she may store more than one value. this method adds the current list of objects in the descriptions association. π
- 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
π security π
the methods for the security association β she's the gatekeeper fr fr π«Ά
From the MAGE-OM documentation:
Information on the security for the instance of the class.
$val = $designelementgroup->setSecurity($val)
the restricted setter for the security association π
- 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
setSecurityβ the restricted setter for thesecurityassociation. Basically you're the one sliding the Security object into place.
Input: a single value β and it has to be an instance of the class Bio::MAGE::AuditAndSecurity::Security. Just the one, bestie.
Returns: the value you just set, boomeranged right back at you.
Side effects: nope, none, we're chill.
Exceptions: it will yellcroak()at you if you pass no input parameters at all, if you pass too many input parameters, or if$valisn't an instance ofBio::MAGE::AuditAndSecurity::Security. So likeβ¦ read the room before you call it. π
$val = $designelementgroup->getSecurity()β the restricted getter for that samesecurityassociation. You want it, you get it. β¨
Input parameters: literally none. Zero. Nada.
Return value: whatever the security association is holding right now β an instance of type Bio::MAGE::AuditAndSecurity::Security.
Side effects: none, she's well-behaved.
Exceptions: will call croak() if you go and specify any input parameters. It's a no-args zone, babes.
And then there's this absolute icon of a method, sitting there doing nothing on purpose:
sub initialize {
carp __PACKAGE__ . "::initialize: abstract base classes should not be instantiated";
}
π SLOTS, ATTRIBUTES, AND ASSOCIATIONS π
Okay so real talk β in the Perl implementation of MAGE-OM classes, there are three whole flavors of class data members: slots, attributes, and associations. Let's break each one down, no gatekeeping here. π«Ά
π SLOTS
So this API uses the word "slot" to mean a data member of the class that wasn't even in the UML model β it's there for mostly internal stuff. Translation: only touch these if you genuinely understand the inner workings of the API, iykyk. Most of the time, slots get used by generic methods, like the ones chilling inside the XML writing and reading classes.
Slots are built using unified getter/setter methods, which is honestly so efficient of them:
$var = $obj->slot_name();β grabs the current value of the slot. Simple. Clean.$new_var = $obj->slot_name($new_var);β stores$new_varin the slot, and the return value is also$new_var. It gives back what you gave it. Iconic behavior, honestly. π@names = $obj->get_slot_names()β returns the list of all the slots in the class. The full roster.
DATA CHECKING: literally none. No data type checking is made for these methods. It's the wild west out here, so be careful. π
π ATTRIBUTES AND ASSOCIATIONS
Now β "attribute" and "association" mean data members of the class that were specified directly from the UML model. So these are the official ones, the ones with paperwork.
In the Perl implementation of MAGE-OM classes, association and attribute accessors are implemented using three separate methods. Three! Because why do one thing when three can do it cuter. πΈ
get*β retrieves the current value.
NOTE: for associations, if the association has list cardinality, an array reference is returned.
DATA CHECKING: ensures that no argument is provided. Come empty-handed or don't come at all. π
set*β sets the current value, replacing any existing value. Out with the old, in with the new, periodt.
NOTE: for associations, if the association has list cardinality, the argument must be an array reference. Because of this, you probably should be using theadd*methods instead. Like, genuinely, just useadd*, bestie.
DATA CHECKING: for attributes, it ensures that a single value is provided as the argument. For associations, if the association has list cardinality, it ensures the argument is a reference to an array of instances of the correct MAGE-OM class β otherwise it ensures there's a single argument of the correct MAGE-OM class. So it's checking your vibe and your types. π
add*β appends a list of objects to any values that may already be stored in the association.
NOTE: only present in associations with list cardinality. If you don't see it, that's why. Not a bug, just the rules.
DATA CHECKING: ensures that all arguments are of the correct MAGE-OM class. Every single one. No stragglers. π
β GENERIC METHODS
The unified base class of all MAGE-OM classes, Bio::MAGE::Base, hands you a whole set of generic methods that will operate on slots, attributes, and associations. One base class to rule them all:
$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 β they're fully documented, go look. β¨
π BUGS π
Found something cursed? 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) β the main character who wrote this. Respect. π«Ά
π¦ SEE ALSO π¦
π POD ERRORS π
Hey! The above document had some coding errors, which are explained below. Not me snitching on the doc, but the pod checker literally said so:
- Around line 398:
'=item' outside of any '=over'
- Around line 483:
- You forgot a
'=back'before a'=head2'
- You forgot a
- Around line 655:
- Expected
'=item 2'
- Expected
- Around line 660:
- Expected
'=item 3'
- Expected
- Around line 665:
- Expected
'=item 4'
- Expected
okay that's the whole page bestie, we did it, we survived the MAGE::...ntGroup(3pm) lore drop πβ¨
That was from perl v5.32.0, dated 2020-11-27, and the footer says MAGE::...ntGroup(3pm) β so like, it's giving very much vintage Perl energy. 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