Bio::C...::Util(3pm)
π NAME π
Bio::Chado::Schema::Util β bestie, it's the utility functions shared by Bio::Chado::Schema objects π«Ά
β¨ SYNOPSIS β¨
okay so here's the vibe, a little taste of how you'd actually use it:
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',
);
}
πΈ DESCRIPTION πΈ
These are the helper functions that a bunch of the schema classes are all sharing, like a group chat of utilities π
Important Note: this package lives inside theSchema.pmfile as a secondary package, and it does not have a file of its own. But don't stress β theuseis literally the same. She's hiding in there, but she's fully functional π§
π PACKAGE METHODS π
π create_properties
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 => cv.name to use for the given featureprops.
Defaults to 'feature_property',
db_name => 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
'autocreated:',
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 }
let me break this icon down for you π¦
rowβ the DBIC row object you're creating properties for. that's your main character, the row in question πprop_relation_nameβ the DBIC relation name for the properties table you wanna operate on, like'featureprops'πpropertiesβ a hashref of{ propname => value, ...}, your actual data, slayoptionsβ the options hashref, and it's giving very configurable:autocreateβ (optional) boolean. if you pass it, it'll automatically createcv,cvterm, anddbxrefrows when one can't be found for the given featureprop name. default is false β¨cv_nameβ thecv.nameto use for the given featureprops. defaults to'feature_property'πdb_nameβ thedb.nameto use for autocreated dbxrefs, default'null'πallow_duplicate_valuesβ default false. if true, you're allowed duplicate instances of the same cvterm and value in the properties of the feature. and lowkey important: duplicate values will have different ranks. periodt πdbxref_accession_prefixβ optional, default'autocreated:'πdefinitionsβ optional hashref of:
{ cvterm_name => definition,
}
to load into the cvterm table when autocreating cvterms π§
- Returns: a hashref of
{ propname => new row object in property table }β so you get your shiny new rows back, no cap π
π AUTHOR π
- Robert Buels,
<rmb32@cornell.edu> - Naama Menda,
<naama.menda@gmail.com>
and that's the whole page bestie, no crumbs left π
this little legend was served up by perl v5.32.0 on 2020-12-04, and the manual page is Bio::C...::Util(3pm) π go forth and create those properties, you absolute icon π¦β
π¦ where this page comes from
- debian bookworm: libbio-chado-schema-perl 0.20000-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libbio-chado-schema-perl 0.20000-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libbio-chado-schema-perl 0.20000-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libbio-chado-schema-perl 0.20000-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libbio-chado-schema-perl 0.20000-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libbio-chado-schema-perl 0.20000-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms