NAME
Bio::Cluster::UniGene - UniGene object
SYNOPSIS
use Bio::Cluster::UniGene;use Bio::ClusterIO;$stream = Bio::ClusterIO->new('-file' => "Hs.data",'-format' => "unigene");# note: we quote -format to keep older perl's from complaining.while ( my $in = $stream->next_cluster() ) {print $in->unigene_id() . "\n";while ( my $sequence = $in->next_seq() ) {print $sequence->accession_number() . "\n";}}
DESCRIPTION
This UniGene object implements the Bio::Cluster::UniGeneI interface for the representation if UniGene clusters in Bioperl. It is returned by the Bio::ClusterIO parser for unigene format and contains all the data associated with one UniGene record.
This class implements several interfaces and hence can be used wherever instances of such interfaces are expected. In particular, the interfaces are Bio::ClusterI as the base interface for all cluster representations, and in addition Bio::IdentifiableI and Bio::DescribableI.
The following lists the UniGene specific methods that are available (see below for details). Be aware next_XXX iterators take a snapshot of the array property when they are first called, and this snapshot is not reset until the iterator is exhausted. Hence, once called you need to exhaust the iterator to see any changes that have been made to the property in the meantime. You will usually want to use the non-iterator equivalents and loop over the elements yourself.
new() - standard new call
unigene_id() - set/get unigene_id
title() - set/get title (description)
gene() - set/get gene
cytoband() - set/get cytoband
mgi() - set/get mgi
locuslink() - set/get locuslink
homol() - set/get homologene
gnm_terminus() - set/get gnm_terminus
scount() - set/get scount
express() - set/get express, currently takes/returns a reference to an array of expressed tissues
next_express() - returns the next tissue expression from the expressed tissue array
chromosome() - set/get chromosome, currently takes/returns a reference to an array of chromosome lines
next_chromosome() - returns the next chromosome line from the array of chromosome lines
sts() - set/get sts, currently takes/returns a reference to an array of sts lines
next_sts() - returns the next sts line from the array of sts lines
txmap() - set/get txmap, currently takes/returns a reference to an array of txmap lines
next_txmap() - returns the next txmap line from the array of txmap lines
protsim() - set/get protsim, currently takes/returns a reference to an array of protsim lines
next_protsim() - returns the next protsim line from the array of protsim lines
sequences() - set/get sequence, currently takes/returns a reference to an array of references to seq info
next_seq() - returns a Seq object that currently only contains an accession number
Implemented Interfaces
This class implementes the following interfaces.
- Bio::Cluster::UniGeneI
-
This includes implementing Bio::ClusterI.
- Bio::IdentifiableI
- Bio::DescribableI
- Bio::AnnotatableI
- Bio::Factory::SequenceStreamI
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.
[email protected] - General discussionhttp://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support
Please direct usage questions or support issues to the mailing list:
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.
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
AUTHOR - Andrew Macgregor
Email andrew at cbbc.murdoch.edu.au
CONTRIBUTORS
Hilmar Lapp, hlapp at gmx.net
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a "_".
new
Title : newUsage : used by ClusterIOReturns : a new Bio::Cluster::Unigene object
Bio::Cluster::UniGeneI methods
unigene_id
Title : unigene_idUsage : unigene_id();Function: Returns the unigene_id associated with the object.Example : $id = $unigene->unigene_id or $unigene->unigene_id($id)Returns : A stringArgs : None or an id
title
Title : titleUsage : title();Function: Returns the title associated with the object.Example : $title = $unigene->title or $unigene->title($title)Returns : A stringArgs : None or a title
gene
Title : geneUsage : gene();Function: Returns the gene associated with the object.Example : $gene = $unigene->gene or $unigene->gene($gene)Returns : A stringArgs : None or a gene
cytoband
Title : cytobandUsage : cytoband();Function: Returns the cytoband associated with the object.Example : $cytoband = $unigene->cytoband or $unigene->cytoband($cytoband)Returns : A stringArgs : None or a cytoband
mgi
Title : mgiUsage : mgi();Function: Returns the mgi associated with the object.Example : $mgi = $unigene->mgi or $unigene->mgi($mgi)Returns : A stringArgs : None or a mgi
locuslink
Title : locuslinkUsage : locuslink();Function: Returns or stores a reference to an array containing locuslink data.Returns : An array referenceArgs : None or an array reference
homol
Title : homolUsage : homol();Function: Returns the homol entry associated with the object.Example : $homol = $unigene->homol or $unigene->homol($homol)Returns : A stringArgs : None or a homol entry
restr_expr
Title : restr_exprUsage : restr_expr();Function: Returns the restr_expr entry associated with the object.Example : $restr_expr = $unigene->restr_expr or $unigene->restr_expr($restr_expr)Returns : A stringArgs : None or a restr_expr entry
gnm_terminus
Title : gnm_terminusUsage : gnm_terminus();Function: Returns the gnm_terminus associated with the object.Example : $gnm_terminus = $unigene->gnm_terminus or$unigene->gnm_terminus($gnm_terminus)Returns : A stringArgs : None or a gnm_terminus
scount
Title : scountUsage : scount();Function: Returns the scount associated with the object.Example : $scount = $unigene->scount or $unigene->scount($scount)Returns : A stringArgs : None or a scount
express
Title : expressUsage : express();Function: Returns or stores a reference to an array containingtissue expression dataReturns : An array referenceArgs : None or an array reference
chromosome
Title : chromosomeUsage : chromosome();Function: Returns or stores a reference to an array containingchromosome linesReturns : An array referenceArgs : None or an array reference
sts
Title : stsUsage : sts();Function: Returns or stores a reference to an array containing sts linesReturns : An array referenceArgs : None or an array reference
txmap
Title : txmapUsage : txmap();Function: Returns or stores a reference to an array containing txmap linesReturns : An array referenceArgs : None or an array reference
protsim
Title : protsimUsage : protsim();Function: Returns or stores a reference to an array containing protsim linesThis should really only be used by ClusterIO, not directlyReturns : An array referenceArgs : None or an array reference
sequences
Title : sequencesUsage : sequences();Function: Returns or stores a reference to an array containingsequence data.This is mostly reserved for ClusterIO parsers. You shoulduse get_members() for get and add_member()/remove_members()for set.Returns : An array reference, or undefArgs : None or an array reference or undef
species
Title : speciesUsage : $obj->species($newval)Function: Get/set the species object for this Unigene cluster.Example :Returns : value of species (a L<Bio::Species> object)Args : on set, new value (a L<Bio::Species> object orthe binomial name, or undef, optional)
Bio::ClusterI methods
display_id
Title : display_idUsage :Function: Get/set the display name or identifier for the clusterThis is aliased to unigene_id().Returns : a stringArgs : optional, on set the display ID ( a string)
description
Title : descriptionUsage : Bio::ClusterI->description("POLYUBIQUITIN")Function: get/set for the consensus description of the clusterThis is aliased to title().Returns : the description stringArgs : Optional the description string
size
Title : sizeUsage : Bio::ClusterI->size();Function: get for the size of the family,calculated from the number of membersThis is aliased to scount().Returns : the size of the clusterArgs :
cluster_score
Title : cluster_scoreUsage : $cluster ->cluster_score(100);Function: get/set for cluster_score whichrepresent the score in which the clusteringalgorithm assigns to this cluster.For UniGene clusters, there really is no cluster score thatwould come with the data. However, we provide animplementation here so that you can score UniGene clustersif you want to.Returns : a numberArgs : optionally, on set a number
get_members
Title : get_membersUsage : Bio::ClusterI->get_members(($seq1, $seq2));Function: retrieve the members of the family by some criteriaWill return all members if no criteria are provided.At this time this implementation does not supportspecifying criteria and will always return all members.Returns : the array of membersArgs :
Annotatable view at the object properties
annotation
Title : annotationUsage : $obj->annotation($newval)Function: Get/set the L<Bio::AnnotationCollectionI> object forthis UniGene cluster.Many attributes of this class are actually stored withinthe annotation collection object as L<Bio::AnnotationI>compliant objects, so you can conveniently access themthrough the same interface as you would e.g. accessL<Bio::SeqI> annotation properties.If you call this method in set mode and replace theannotation collection with another one you should knowexactly what you are doing.Example :Returns : a L<Bio::AnnotationCollectionI> compliant objectArgs : on set, new value (a L<Bio::AnnotationCollectionI>compliant object or undef, optional)
Implementation specific methods
These are mostly for adding/removing to array properties, and formethods with special functionality.
add_member
Title : add_memberUsage :Function: Adds a member object to the list of members.Example :Returns : TRUE if the new member was successfully added, and FALSEotherwise.Args : The member to add.
remove_members
Title : remove_membersUsage :Function: Remove the list of members for this cluster such that themember list is undefined afterwards (as opposed to zero members).Example :Returns : the previous list of membersArgs : none
next_locuslink
Title : next_locuslinkUsage : next_locuslink();Function: Returns the next locuslink from an array referredto using $obj->{'locuslink'}If you call this iterator again after it returned undef, itwill re-cycle through the list of elements. Changes in theunderlying array property while you loop over this iteratorwill not be reflected until you exhaust the iterator.Example : while ( my $locuslink = $in->next_locuslink() ) {print "$locuslink\n";}Returns : StringArgs : None
next_express
Title : next_expressUsage : next_express();Function: Returns the next tissue from an array referredto using $obj->{'express'}If you call this iterator again after it returned undef, itwill re-cycle through the list of elements. Changes in theunderlying array property while you loop over this iteratorwill not be reflected until you exhaust the iterator.Example : while ( my $express = $in->next_express() ) {print "$express\n";}Returns : StringArgs : None
next_chromosome
Title : next_chromosomeUsage : next_chromosome();Function: Returns the next chromosome line from an array referredto using $obj->{'chromosome'}If you call this iterator again after it returned undef, itwill re-cycle through the list of elements. Changes in theunderlying array property while you loop over this iteratorwill not be reflected until you exhaust the iterator.Example : while ( my $chromosome = $in->next_chromosome() ) {print "$chromosome\n";}Returns : StringArgs : None
next_protsim
Title : next_protsimUsage : next_protsim();Function: Returns the next protsim line from an array referredto using $obj->{'protsim'}If you call this iterator again after it returned undef, itwill re-cycle through the list of elements. Changes in theunderlying array property while you loop over this iteratorwill not be reflected until you exhaust the iterator.Example : while ( my $protsim = $in->next_protsim() ) {print "$protsim\n";}Returns : StringArgs : None
next_sts
Title : next_stsUsage : next_sts();Function: Returns the next sts line from an array referredto using $obj->{'sts'}If you call this iterator again after it returned undef, itwill re-cycle through the list of elements. Changes in theunderlying array property while you loop over this iteratorwill not be reflected until you exhaust the iterator.Example : while ( my $sts = $in->next_sts() ) {print "$sts\n";}Returns : StringArgs : None
next_txmap
Title : next_txmapUsage : next_txmap();Function: Returns the next txmap line from an arrayreferred to using $obj->{'txmap'}If you call this iterator again after it returned undef, itwill re-cycle through the list of elements. Changes in theunderlying array property while you loop over this iteratorwill not be reflected until you exhaust the iterator.Example : while ( my $tsmap = $in->next_txmap() ) {print "$txmap\n";}Returns : StringArgs : None
Bio::IdentifiableI methods
object_id
Title : object_idUsage : $string = $obj->object_id()Function: a string which represents the stable primary identifierin this namespace of this object. For DNA sequences thisis its accession_number, similarly for protein sequencesThis is aliased to unigene_id().Returns : A scalar
version
Title : versionUsage : $version = $obj->version()Function: a number which differentiates between versions ofthe same object. Higher numbers are considered to belater and more relevant, but a single object describedthe same identifier should represent the same conceptUnigene clusters usually won't have a version, so thiswill be mostly undefined.Returns : A numberArgs : on set, new value (a scalar or undef, optional)
authority
Title : authorityUsage : $authority = $obj->authority()Function: a string which represents the organisation whichgranted the namespace, written as the DNS name fororganisation (eg, wormbase.org)Returns : A scalarArgs : on set, new value (a scalar or undef, optional)
namespace
Title : namespaceUsage : $string = $obj->namespace()Function: A string representing the name space this identifieris valid in, often the database name or the namedescribing the collectionReturns : A scalarArgs : on set, new value (a scalar or undef, optional)
Bio::DescribableI methods
display_name
Title : display_nameUsage : $string = $obj->display_name()Function: A string which is what should be displayed to the userthe string should have no spaces (ideally, though a cautioususer of this interface would not assume this) and should beless than thirty characters (though again, double checkingthis is a good idea)This is aliased to unigene_id().Returns : A scalarStatus : Virtual
description()
Title : descriptionUsage : $string = $obj->description()Function: A text string suitable for displaying to the user adescription. This string is likely to have spaces, butshould not have any newlines or formatting - just plaintext. The string should not be greater than 255 charactersand clients can feel justified at truncating strings at 255characters for the purposes of displayThis is already demanded by Bio::ClusterI and hence ispresent anyway.Returns : A scalar
Bio::Factory::SequenceStreamI methods
next_seq
Title : next_seqUsage : next_seq();Function: Returns the next seq as a Seq object as defined by$seq->sequence_factory(),at present an empty Bio::Seq::RichSeq object withjust the accession_number() and pid() setThis iterator will not exhaust the array of membersequences. If you call next_seq() again after it returnedundef, it will re-cycle through the list of membersequences.Example : while ( my $sequence = $in->next_seq() ) {print $sequence->accession_number() . "\n";}Returns : Bio::PrimarySeqI objectArgs : None
sequence_factory
Title : sequence_factoryUsage : $seqio->sequence_factory($seqfactory)Function: Get/Set the Bio::Factory::SequenceFactoryIReturns : Bio::Factory::SequenceFactoryIArgs : [optional] Bio::Factory::SequenceFactoryI
Private methods
_annotation_value
Title : _annotation_valueUsage :Function: Private method.Example :Returns : the value (a string)Args : annotation key (a string)on set, annotation value (a string)
_annotation_value_ary
Title : _annotation_value_aryUsage :Function: Private method.Example :Returns : reference to the array of valuesArgs : annotation key (a string)on set, reference to an array holding the values
_annotation_dblink
Title : _annotation_dblinkUsage :Function: Private method.Example :Returns : array of accessions for the given database (namespace)Args : annotation key (a string)dbname (a string) (optional on get, mandatory on set)on set, accession or ID (a string), and version
_remove_dblink
Title : _remove_dblinkUsage :Function: Private method.Example :Returns : array of accessions for the given database (namespace)Args : annotation key (a string)dbname (a string) (optional)