Bio::T...number(3pm)
β¨ Bio::Tools::ECnumber β the manual page, but make it cute β¨
okay bestie, so this is Bio::T...number(3pm) from the User Contributed Perl Documentation β a little slice of the Bioperl world, and honestly? it's giving structured. it's giving β¨taxonomy of enzymesβ¨. let's get into it π
πΈ NAME πΈ
Bio::Tools::ECnumber β representation of EC numbers (Enzyme Classification)
like, it's the Perl object that holds an EC number for u. that's the whole gig. iconic π
π¦ SYNOPSIS π¦
here's the vibe in code, no cap:
use Bio::Tools::ECnumber;
# Creation of ECnumber objects
my $EC1 = Bio::Tools::ECnumber->new( -ec_string => "4.3.2.1" );
my $EC2 = Bio::Tools::ECnumber->new( -ec_string => "EC 1.1.1.1" );
my $EC3 = Bio::Tools::ECnumber->new();
# Copying
my $EC4 = $EC1->copy();
# Modification/canonicalization of ECnumber objects
print $EC3->EC_string( "1.01.01.001" ); # Prints "1.1.1.1".
# Stringify
print $EC3->EC_string();
# or
print $EC3->to_string();
# Test for equality
# -- Against ECnumber object:
if ( $EC3->is_equal( $EC2 ) ) { # Prints "equal".
print "equal";
}
# -- Against string representation of EC number:
if ( ! $EC3->is_equal( "1.1.1.-" ) ) { # Prints "not equal".
print "not equal";
}
# Test for membership
my $EC5 = Bio::Tools::ECnumber->new( -ec_string => "4.3.2.-" );
# -- Against ECnumber object.
if ( $EC1->is_member( $EC5 ) ) { # Prints "member".
print "member";
}
# -- Against string representation of EC number.
if ( ! $EC1->is_member( "4.3.1.-" ) ) { # Prints "not member".
print "not member";
}
make a new one, copy it, set it, stringify it, compare it, check if it's a member β that's the whole friend group of methods right there π«Ά
π DESCRIPTION π
Bio::Tools::ECnumber is a representation of EC numbers, the numerical hierarchy for Enzyme Classification.
so like, if u ever needed to hold <pink>4.3.2.1</pink> in a little object instead of a sad loose string, this is ur girlie. π
want more deets? peek at <http://www.chem.qmul.ac.uk/iubmb/enzyme/> β¨
π FEEDBACK π
π¬ Mailing Lists π¬
User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated.
bioperl-l@bioperl.org - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
like literally, they want to hear from u. bestie energy fr fr π
π«Ά Support π«Ά
Please direct usage questions or support issues to the mailing list:
bioperl-l@bioperl.org
rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.
ngl, this is the "don't DM the maintainer, post in the group chat" rule and honestly? valid. the experts are right there and they're fast π
π Reporting Bugs π
Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web:
https://github.com/bioperl/bioperl-live/issues
go file it, bestie. bugs hate to see u coming π
π AUTHOR π
Christian M. Zmasek
Email: czmasek-at-burnham.org or cmzmasek@yahoo.com
WWW: <http://monochrome-effect.net/>
Address:
Genomics Institute of the Novartis Research Foundation
10675 John Jay Hopkins Drive
San Diego, CA 92121
shoutout to Christian for writing this, we love a legend β
π APPENDIX π
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
so yes, if u see a _ in front of something, that's the behind-the-scenes stuff, iykyk π
π§ new
Title : new
Usage : $EC1 = Bio::Tools::ECnumber->new( -ec_string => "4.3.2.1" );
or
$EC2 = Bio::Tools::ECnumber->new( -ec_string => "4.3.2.2",
-comment => "Is EC 4.3.2.2" );
or
$EC3 = Bio::Tools::ECnumber->new(); # EC3 is now "-.-.-.-"
Function: Creates a new ECnumber object.
Parses a EC number from "x.x.x.x", "EC x.x.x.x",
"ECx.x.x.x", or "EC:x.x.x.x";
x being either a positive integer or a "-".
Returns : A new ECnumber object.
Args : A string representing a EC number, e.g. "4.3.2.1"
or "EC 4.3.2.1" or "1.-.-.-".
okay so this is the constructor, the main character entrance β¨ hand it a string and it'll parse "x.x.x.x", "EC x.x.x.x", "ECx.x.x.x", or "EC:x.x.x.x" β and each x is either a positive integer or a "-". call it with nothing and u get "-.-.-.-", which is the blank-slate vibe. π
π§ init
Title : init()
Usage : $EC1->init(); # EC1 is now "-.-.-.-"
Function: Initializes this ECnumber to default values.
Returns :
Args :
resets ur ECnumber back to the default values. poof, clean slate, -.-.-.- πΈ (returns nothing, takes nothing, no drama.)
π§ copy
Title : copy()
Usage : $EC2 = $EC1->copy();
Function: Creates a new ECnumber object which is an exact copy
of this ECnumber.
Returns : A copy of this ECnumber.
Args :
an exact copy. not a reference to the same one, a whole new object. so u can go edit the clone and ur original stays unbothered πβ¨
π§ EC_string
Title : EC_string
Usage : $EC3->EC_string( "1.1.1.-" );
or
print $EC3->EC_string();
Function: Set/get for string representations of EC numbers.
Parses a EC number from "x.x.x.x", "EC x.x.x.x",
"ECx.x.x.x", or "EC:x.x.x.x";
x being either a positive integer or a "-".
Returns : A string representations of a EC number.
Args : A string representations of a EC number.
set it or get it, whichever u need. same parsing rules as new β "x.x.x.x", "EC x.x.x.x", "ECx.x.x.x", or "EC:x.x.x.x", with each x being a positive integer or a "-". and it canonicalizes, so ur messy leading zeros get cleaned up π§Ό
π§ to_string
Title : to_string()
Usage : print $EC3->to_string();
Function: To string method for EC numbers
(equals the "get" functionality of "EC_string").
Returns : A string representations of a EC number.
Args :
the stringify method π« literally just the get half of EC_string, so it's the "print me pls" option when u don't wanna pass an argument.
π§ is_equal
Title : is_equal
Usage : if ( $EC3->is_equal( $EC2 ) )
or
if ( $EC3->is_equal( "1.1.1.-" ) )
Function: Checks whether this ECnumber is equal to the argument
EC number (please note: "1.1.1.1" != "1.1.1.-").
Returns : True (1) or false (0).
Args : A ECnumber object or a string representation of a EC number.
are these two the same? true (1) or false (0). u can hand it an ECnumber object or a plain string. π«Ά
β οΈ important bestie:"1.1.1.1"is NOT equal to"1.1.1.-". the dash is not a wildcard here, it's its own thing. don't get got π
π§ is_member
Title : is_member
Usage : if ( $EC1->is_member( $EC5 ) )
or
if ( $EC1->is_member( "4.3.-.-" ) )
Function: Checks whether this ECnumber is a member of the (incomplete)
argument EC number (e.g. "1.1.1.1" is a member of "1.1.1.-"
but not of "1.1.1.2").
Returns : True (1) or false (0).
Args : A ECnumber object or a string representation of a EC number.
this one is the β¨subset checkβ¨ β is my EC number a member of the (incomplete) EC number u passed in? like "1.1.1.1" is a member of "1.1.1.-" but not of "1.1.1.2". here the - does act as the "anything goes here" slot π returns true (1) or false (0), and takes an ECnumber object or a string.
π§ enzyme_class
Title : enzyme_class
Usage : $EC1->enzyme_class( 1 );
or
print $EC1->enzyme_class();
Function: Set/get for the enzyme class number of ECnumbers.
Returns : The enzyme class number of this ECnumber.
Args : A positive integer or "-".
set/get for the enzyme class number β first slot of the four. args are a positive integer or "-" π
π§ sub_class
Title : sub_class
Usage : $EC1->sub_class( 4 );
or
print $EC1->sub_class();
Function: Set/get for the enzyme sub class number of ECnumbers.
Returns : The enzyme sub class number of this ECnumber.
Args : A positive integer or "-".
set/get for the enzyme sub class number β second slot. positive integer or "-" π
π§ sub_sub_class
Title : sub_sub_class
Usage : $EC1->sub_sub_class( 12 );
or
print $EC1->sub_sub_class();
Function: Set/get for the enzyme sub sub class number of ECnumbers.
Returns : The enzyme sub sub class number of this ECnumber.
Args : A positive integer or "-".
set/get for the enzyme sub sub class number β third slot, yes it's really called that, we don't make the rules. positive integer or "-" β¨
π§ serial_number
Title : serial_number
Usage : $EC1->serial_number( 482 );
or
print $EC1->serial_number();
Function: Set/get for the serial number of ECnumbers.
Returns : The serial number of this ECnumber.
Args : A positive integer or "-".
set/get for the serial number β the fourth and final slot. positive integer or "-" π
π§ comment
Title : comment
Usage : $EC1->comment( "deprecated" );
or
print $EC1->comment();
Function: Set/get for a arbitrary comment.
Returns : A comment [scalar].
Args : A comment [scalar].
set/get for an arbitrary comment β just a scalar, ur lil free-text note. put whatever u want in there, it's ur ECnumber's status update π
and that's the whole page bestie, every flag, every method, every warning, nothing skipped π
sign-off time: this beauty is perl v5.32.1, dated 2021-08-15, and it shipped as Bio::T...number(3pm) π go forth and classify ur enzymes, u absolute icon π
π¦ where this page comes from
- debian bookworm: libbio-perl-perl 1.7.8-1 Β· Perl
- debian trixie: libbio-perl-perl 1.7.8-1 Β· Perl
- ubuntu jammy: libbio-perl-perl 1.7.8-1 Β· Perl
- ubuntu noble: libbio-perl-perl 1.7.8-1 Β· Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms