MAGE::...ayData(3pm)
๐ NAME ๐
Bio::MAGE::BioAssayData โ okay bestie, this is the container module for the classes that live in the MAGE package: BioAssayData. That's the whole vibe. It's the group chat that all the BioAssayData classes hang out in. โจ
This page is MAGE::...ayData(3pm) from the User Contributed Perl Documentation, and yes we're reading it together, hydration check, let's go. ๐ซถ
โจ SYNOPSIS โจ
use Bio::MAGE::BioAssayData;
That's it. That's the whole synopsis. Short king. ๐
๐ฆ DESCRIPTION ๐ฆ
So like, this is a package module that wraps up a bunch of classes in the Bio::MAGE hierarchy. These classes all belong to the BioAssayData package of the MAGE-OM object model. No cap, that's the entire description. It's giving "I contain multitudes." ๐
๐ CLASSES ๐
The Bio::MAGE::BioAssayData module is literally holding all of these Bio::MAGE classes down:
BioAssayDataQuantitationTypeDimensionBioAssayMappingDesignElementDimensionBioAssayDatumDerivedBioAssayDataMeasuredBioAssayDataQuantitationTypeMappingDesignElementMappingBioDataCubeBioDataValuesBioDataTuplesBioAssayDimensionQuantitationTypeMapTransformationDesignElementMapBioAssayMapCompositeSequenceDimensionReporterDimensionFeatureDimension
Twenty classes. A whole roster. The way this module is carrying an entire friend group on its back. ๐ญ๐
๐ฅ CLASS METHODS ๐ฅ
@class_list = Bio::MAGE::BioAssayData::classes();
This one hands you back a list of non-fully qualified class names in this package. Translation: they do not have 'Bio::MAGE::' as a prefix. So just the short names, bestie. ๐ธ
$obj = class->new(%parameters)
The new() method is the class constructor, aka how you birth an object into existence. ๐ฑ
- Parameters: if you hand it a list of name/value parameters, the matching slots, attributes, or associations get 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, but only if the class actually defines it.
@names = class->get_slot_names()
get_slot_names() is the method you call to retrieve the name of all slots defined in a given class.
NOTE: the list of names does not include attribute or association names. So don't come for me when your attribute isn't in there. ๐
- 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. It's giving "who raised you." ๐
@class_list = get_subclasses()
returns the list of subclasses for this class. Your little ones. ๐ฅน
$name = class_name()
Returns the full class name for this class. Government name and everything. ๐
$package_name = package_name()
Returns the base package name of the package that contains this class โ and by "base" I mean there's no 'namespace::' on it. Just the raw base. ๐
%assns = associations()
returns the association meta-information as a hash, where the keys are the association names and the values are Association objects that hold the meta-information for the association. Meta on meta. ๐ฆ
๐ INSTANCE METHODS ๐
$obj_copy = $obj->new()
Plot twist: when you call new() on an existing object reference instead of a class name, it acts as a copy constructor. The new object's initial values get set to be exactly 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 being copied.
- Return value: it returns a reference to an object of the class.
- Side effects: it invokes the
initialize()method if the class defines it.
$obj->set_slots(%parameters)
$obj->set_slots(\@name_list, \@value_list)
set_slots() lets you set a bunch of slots all at once, because doing them one by one is not the vibe. It has two different invocation methods: the first takes a named parameter list, and the second takes two array references. Pick your fighter. ๐ฅ
- Return value: none.
- Side effects: will call
croak()if you use a slot_name that the class doesn't define. So don't be inventing slots, bestie. ๐
@obj_list = $obj->get_slots(@name_list)
get_slots() gets the values of a number of slots at the same time. Bulk retrieval, iconic. โจ
- Return value: a list of instance objects.
- Side effects: none.
$val = $obj->set_slot($name,$val)
set_slot() sets the slot $name to the value $val. Simple. Clean. ๐
- Return value: the new value of the slot, i.e.
$val. - Side effects: none.
$val = $obj->get_slot($name)
get_slot() 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. (She's empty, your honor. ๐ญ) - Side effects: none.
๐ธ The unified setter/getter era ๐ธ
Okay so a whole bunch of these next methods follow the exact same pattern, so let me explain the format once and then we go:
Each one is a unified setter/getter method for its slot. If $inval is specified, the setter method is invoked. With no parameters, the getter method is invoked.
- Input parameters: the optional
$invalwill invoke the setter method. - Return value: for both setter and getter, the current value of the slot.
- Side effects: none.
- Exceptions: none.
Periodt. Now here's every single one of them, no skips, no skimming: ๐ซถ
$val = $bioassaydata->xml_lists()
$inval = $bioassaydata->xml_lists($inval)
Unified setter/getter for the xml_lists slot.
- Input parameters: the optional
$invalwill invoke the setter method. - Return value: for both setter and getter, the current value of the
xml_listsslot. - Side effects: none.
- Exceptions: none.
$val = $bioassaydata->tagname()
$inval = $bioassaydata->tagname($inval)
Unified setter/getter for the tagname slot.
- Input parameters: the optional
$invalwill invoke the setter method. - Return value: for both setter and getter, the current value of the
tagnameslot. - Side effects: none.
- Exceptions: none.
$val = $bioassaydata->bioassaydimension_list()
$inval = $bioassaydata->bioassaydimension_list($inval)
Unified setter/getter for the bioassaydimension_list slot.
- Input parameters: the optional
$invalwill invoke the setter method. - Return value: for both setter and getter, the current value of the
bioassaydimension_listslot. - Side effects: none.
- Exceptions: none.
$val = $bioassaydata->designelementdimension_list()
$inval = $bioassaydata->designelementdimension_list($inval)
Unified setter/getter for the designelementdimension_list slot.
- Input parameters: the optional
$invalwill invoke the setter method. - Return value: for both setter and getter, the current value of the
designelementdimension_listslot. - Side effects: none.
- Exceptions: none.
$val = $bioassaydata->quantitationtypedimension_list()
$inval = $bioassaydata->quantitationtypedimension_list($inval)
Unified setter/getter for the quantitationtypedimension_list slot.
- Input parameters: the optional
$invalwill invoke the setter method. - Return value: for both setter and getter, the current value of the
quantitationtypedimension_listslot. - Side effects: none.
- Exceptions: none.
$val = $bioassaydata->bioassaymap_list()
$inval = $bioassaydata->bioassaymap_list($inval)
Unified setter/getter for the bioassaymap_list slot.
- Input parameters: the optional
$invalwill invoke the setter method. - Return value: for both setter and getter, the current value of the
bioassaymap_listslot. - Side effects: none.
- Exceptions: none.
$val = $bioassaydata->quantitationtypemap_list()
$inval = $bioassaydata->quantitationtypemap_list($inval)
Unified setter/getter for the quantitationtypemap_list slot.
- Input parameters: the optional
$invalwill invoke the setter method. - Return value: for both setter and getter, the current value of the
quantitationtypemap_listslot. - Side effects: none.
- Exceptions: none.
$val = $bioassaydata->bioassaydata_list()
$inval = $bioassaydata->bioassaydata_list($inval)
Unified setter/getter for the bioassaydata_list slot.
- Input parameters: the optional
$invalwill invoke the setter method. - Return value: for both setter and getter, the current value of the
bioassaydata_listslot. - Side effects: none.
- Exceptions: none.
$array_ref = $bioassaydata->getBioAssayDimension_list()
This method handles the list for the Bio::MAGE::BioAssayData::BioAssayDimension class. It returns a reference to an array of the class objects that have been associated with the package instance. ๐
This is useful when retrieving data from parsed MAGE-ML file. Iykyk. ๐
$bioassaydata->addBioAssayDimension(@vals)
This method is an interface for adding Bio::MAGE::BioAssayData::BioAssayDimension objects to the bioassaydimension_list list. It's generally used by generic methods such as those in the XMLWriter. ๐ ๏ธ
- Input parameters: the list of values
@valsto add to the owner association.
NOTE: submitting a single value is permitted. One is fine. You're doing great. ๐ฅน
- Return value: none.
- Side effects: none.
- Exceptions: will call
croak()if no input parameters are specified, or if any of the objects in@valsis not a subclass of classBio::MAGE::BioAssayData::BioAssayDimension. So bring the right type or bring nothing. ๐
$array_ref = $bioassaydata->getDesignElementDimension_list()
This method handles the list for the Bio::MAGE::BioAssayData::DesignElementDimension class. It returns a reference to an array of the class objects that have been associated with the package instance. โจ
This is useful when retrieving data from parsed MAGE-ML file. ๐
$bioassaydata->addDesignElementDimension(@vals)
This method is an interface for adding Bio::MAGE::BioAssayData::DesignElementDimension objects to the designelementdimension_list list. It's generally used by generic methods such as those in the XMLWriter. ๐ ๏ธ
- Input parameters: the list of values
@valsto add to the owner association.
NOTE: submitting a single value is permitted. Just one is allowed, bestie. ๐
- Return value: none.
- Side effects: none.
- Exceptions: will call
croak()if no input parameters are specified, or if any of the objects in@valsis not a subclass of classBio::MAGE::BioAssayData::DesignElementDimension. Type check is type checking. ๐ค
to be continued, bestie โ there's more of this page coming ๐๐
$array_ref = $bioassaydata->getQuantitationTypeDimension_list()โ bestie this one goes and grabs the whole list for theBio::MAGE::BioAssayData::QuantitationTypeDimensionclass. You get back a reference to an array stuffed with all the class objects that have been associated with the package instance. ๐
Super useful when you're pulling data out of a parsed MAGE-ML file, fr fr.
$bioassaydata->addQuantitationTypeDimension(@vals)โ the interface for addingBio::MAGE::BioAssayData::QuantitationTypeDimensionobjects onto thequantitationtypedimension_listlist. The generic methods (think the ones over in XMLWriter) are the usual callers. โจ- Input parameters: the list of values
@valsto add to the owner association. NOTE: submitting a single value is permitted. ๐ - Return value: none
- Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if any of the objects in@valsis not a subclass of classBio::MAGE::BioAssayData::QuantitationTypeDimension๐
- Input parameters: the list of values
$array_ref = $bioassaydata->getBioAssayMap_list()โ this one handles the list for theBio::MAGE::BioAssayData::BioAssayMapclass, handing you back a reference to an array of the class objects that got associated with the package instance. ๐ฆ
Again: chef's kiss when you're retrieving data from a parsed MAGE-ML file.
$bioassaydata->addBioAssayMap(@vals)โ the add-interface forBio::MAGE::BioAssayData::BioAssayMapobjects going onto thebioassaymap_listlist. Generic methods like the XMLWriter ones are the main characters here. ๐ธ- Input parameters: the list of values
@valsto add to the owner association. NOTE: submitting a single value is permitted. ๐ - Return value: none
- Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if any of the objects in@valsis not a subclass of classBio::MAGE::BioAssayData::BioAssayMap๐
- Input parameters: the list of values
$array_ref = $bioassaydata->getQuantitationTypeMap_list()โ handles the list for theBio::MAGE::BioAssayData::QuantitationTypeMapclass, returning a reference to an array of the class objects associated with the package instance. ๐
And yes, it's useful when retrieving data from parsed MAGE-ML file. iykyk.
$bioassaydata->addQuantitationTypeMap(@vals)โ the interface for addingBio::MAGE::BioAssayData::QuantitationTypeMapobjects onto thequantitationtypemap_listlist. Generally used by generic methods such as those in the XMLWriter. โจ- Input parameters: the list of values
@valsto add to the owner association. NOTE: submitting a single value is permitted. ๐ - Return value: none
- Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if any of the objects in@valsis not a subclass of classBio::MAGE::BioAssayData::QuantitationTypeMap๐
- Input parameters: the list of values
$array_ref = $bioassaydata->getBioAssayData_list()โ handles the list for theBio::MAGE::BioAssayData::BioAssayDataclass, returning a reference to an array of the class objects associated with the package instance. ๐
Yep โ useful when retrieving data from parsed MAGE-ML file.
$bioassaydata->addBioAssayData(@vals)โ the interface for addingBio::MAGE::BioAssayData::BioAssayDataobjects onto thebioassaydata_listlist. Generally used by generic methods such as those in the XMLWriter. ๐ง- Input parameters: the list of values
@valsto add to the owner association. NOTE: submitting a single value is permitted. ๐ - Return value: none
- Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if any of the objects in@valsis not a subclass of classBio::MAGE::BioAssayData::BioAssayData๐
- Input parameters: the list of values
$bioassaydata->obj2xml($writer)โ writes this object, and literally every sub-object, out as XML, using the$writeryou hand it to do the actual XML formatting. ๐ซถ- Input parameters:
$writermust be an XML writer, e.g. an instance ofBio::MAGE::XML::Writer. It must have the methods:write_start_tag(),write_end_tag(), andobj2xml(). - Return value: none
- Side effects: all the writing is delegated to the
$writerโ itswrite_start_tag()andwrite_end_tag()methods get invoked with the appropriate data, and all class sub-objects of theBio::MAGE::BioAssayDatainstance will have theirobj2xml()methods invoked in turn. By letting the$writerdo the actual formatting of the output XML, it lets you precisely control the format. ๐ - Exceptions: will call
croak()if no identifier has been set for theBio::MAGE::BioAssayDatainstance. ๐ญ
- Input parameters:
$bioassaydata->register($obj)โ stores an object so it can be written later as XML. ๐ฅ- Input parameters: object to be added to the list of registered objects.
- Return value: none
- Side effects: if
$objneeds to be stored by this class, a reference will be stored in the correct XML list for this class. - Exceptions: none
๐ SLOTS, ATTRIBUTES, AND ASSOCIATIONS ๐
Okay so in the Perl implementation of MAGE-OM classes, there are three types of class data members: slots, attributes, and associations. Let's break it down, bestie. ๐
๐ SLOTS ๐
This API uses the term "slot" to mean a data member of the class that was not present in the UML model and is used for mainly internal purposes โ so like, only touch it if you actually understand the inner workings of the API. ๐ฎ Most often, slots get used by generic methods such as those in the XML writing and reading classes.
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);โ stores$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. ๐
๐ฆ ATTRIBUTES AND ASSOCIATIONS ๐ฆ
The terms "attribute" and "association" indicate data members of the class that were specified directly from the UML model. ๐
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*โ appends a list of objects to any values that may already be stored in the association. โ
NOTE: Only present in associations with list cardinality.
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 ๐
perl v5.32.0 ยท 2020-11-27 ยท MAGE::...ayData(3pm)
And that's the whole page, bestie โ go forth and slay your MAGE-ML parsing. ๐โจ๐ฆ
๐ฆ 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