Bio::Species - Generic species object
$species = Bio::Species->new(-classification => [@classification]); # Can also pass classification # array to new as below $species->classification(qw( sapiens Homo Hominidae Catarrhini Primates Eutheria Mammalia Vertebrata Chordata Metazoa Eukaryota )); $genus = $species->genus(); $bi = $species->binomial(); # $bi is now "Homo sapiens" # For storing common name $species->common_name("human"); # For storing subspecies $species->sub_species("accountant");
Provides a very simple object for storing phylogenetic information. The classification is stored in an array, which is a list of nodes in a phylogenetic tree. Access to getting and setting species and genus is provided, but not to any of the other node types (eg: "phlum", "class", "order", "family"). There's plenty of scope for making the model more sophisticated, if this is ever needed.
A methods are also provided for storing common names, and subspecies.
James Gilbert email jgrg@sanger.ac.uk
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
Title : classification Usage : $self->classification(@class_array); @classification = $self->classification(); Function: Fills or returns the classifcation list in the object. The array provided must be in the order SPECIES, GENUS ---> KINGDOM. Checks are made that species is in lower case, and all other elements are in title case. Example : $obj->classification(qw( sapiens Homo Hominidae Catarrhini Primates Eutheria Mammalia Vertebrata Chordata Metazoa Eukaryota)); Returns : Classification array Args : Classification array
Title : common_name Usage : $self->common_name( $common_name ); $common_name = $self->common_name(); Function: Get or set the commonn name of the species Example : $self->common_name('human') Returns : The common name in a string Args : String, which is the common name
Title : organelle Usage : $self->organelle( $organelle ); $organelle = $self->organelle(); Function: Get or set the organelle name Example : $self->organelle('Chloroplast') Returns : The organelle name in a string Args : String, which is the organelle name
Title : species Usage : $self->species( $species ); $species = $self->species(); Function: Get or set the scientific species name. The species name must be in lower case. Example : $self->species( 'sapiens' ); Returns : Scientific species name as string Args : Scientific species name as string
Title : genus Usage : $self->genus( $genus ); $genus = $self->genus(); Function: Get or set the scientific genus name. The genus must be in title case. Example : $self->genus( 'Homo' ); Returns : Scientific genus name as string Args : Scientific genus name as string
Title : sub_species Usage : $obj->sub_species($newval) Function: Returns : value of sub_species Args : newvalue (optional)
Title : binomial Usage : $binomial = $self->binomial(); $binomial = $self->binomial('FULL'); Function: Returns a string "Genus species", or "Genus species subspecies", the first argument is 'FULL' (and the species has a subspecies). Args : Optionally the string 'FULL' to get the full name including the the subspecies.
To install Bio::Seq, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bio::Seq
CPAN shell
perl -MCPAN -e shell install Bio::Seq
For more information on module installation, please visit the detailed CPAN module installation guide.