Bio::EnsEMBL::IdMapping TinyGene
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::EnsEMBL::IdMapping::TinyGene - lightweight gene object
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::IdMapping::TinyFeature
Bio::EnsEMBL::Utils::Exception qw ( throw warning )
Inherit
Bio::EnsEMBL::IdMapping::TinyFeature
Synopsis
 # fetch a gene from the db and create a lightweight gene object from it
my $gene = $gene_adaptor->fetch_by_stable_id('ENSG000345437');
my $lightweight_gene = Bio::EnsEMBL::IdMapping::TinyGene->new_fast( [
$gene->dbID, $gene->stable_id,
$gene->version, $gene->created_date,
$gene->modified_date, $gene->start,
$gene->end, $gene->strand,
$gene->slice->seq_region_name, $gene->biotype,
$gene->status, $gene->analysis->logic_name,
( $gene->is_known ? 1 : 0 ),
] );
Description
This is a lightweight gene object for the stable Id mapping. See the
documentation in TinyFeature for general considerations about its
design.
Methods
add_TranscriptDescriptionCode
biotypeDescriptionCode
endDescriptionCode
get_all_TranscriptsDescriptionCode
is_knownDescriptionCode
lengthDescriptionCode
logic_nameDescriptionCode
seq_region_nameDescriptionCode
startDescriptionCode
status
No description
Code
strandDescriptionCode
Methods description
add_Transcriptcode    nextTop
  Arg[1]      : Bio::EnsEMBL::IdMapping::TinyTranscript $tr - the transcript to
add
Example : $tiny_gene->add_Transcript($tiny_transcript);
Description : Adds a transcript to a gene.
Return type : none
Exceptions : thrown on wrong or missing argument
Caller : general
Status : At Risk
: under development
biotypecodeprevnextTop
  Arg[1]      : (optional) String - the gene's biotype
Description : Getter/setter for the gene's biotype.
Return type : String
Exceptions : none
Caller : general
Status : At Risk
: under development
endcodeprevnextTop
  Arg[1]      : (optional) Int - the gene's end coordinate
Description : Getter/setter for the gene's end coordinate.
Return type : Int
Exceptions : none
Caller : general
Status : At Risk
: under development
get_all_TranscriptscodeprevnextTop
  Example     : foreach my $tr (@{ $tiny_gene->get_all_Transcripts }) {
# do something with transcript
}
Description : Returns all transcripts attached to that gene.
Return type : Arrayref of Bio::EnsEMBL::IdMapping::TinyTranscript objects
Exceptions : none
Caller : general
Status : At Risk
: under development
is_knowncodeprevnextTop
  Arg[1]      : (optional) Boolean - the gene's "known" status
Description : Getter/setter for the gene's "known" status.
Return type : Boolean
Exceptions : none
Caller : general
Status : At Risk
: under development
lengthcodeprevnextTop
  Description : Returns the gene length (distance between start and end).
Return type : Int
Exceptions : none
Caller : general
Status : At Risk
: under development
logic_namecodeprevnextTop
  Arg[1]      : (optional) String - the gene's analysis' logic_name
Description : Getter/setter for the gene's analysis' logic_name.
Return type : String
Exceptions : none
Caller : general
Status : At Risk
: under development
seq_region_namecodeprevnextTop
  Arg[1]      : (optional) String - seq_region name
Description : Getter/setter for the seq_region name of the slice the gene is
on.
Return type : String
Exceptions : none
Caller : general
Status : At Risk
: under development
startcodeprevnextTop
  Arg[1]      : (optional) Int - the gene's start coordinate
Description : Getter/setter for the gene's start coordinate.
Return type : Int
Exceptions : none
Caller : general
Status : At Risk
: under development
strand(2)codeprevnextTop
  Arg[1]      : (optional) String - the gene's status
Description : Getter/setter for the gene's status.
Return type : String
Exceptions : none
Caller : general
Status : At Risk
: under development
Methods code
add_TranscriptdescriptionprevnextTop
sub add_Transcript {
  my $self = shift;
  my $tr = shift;

  unless ($tr && $tr->isa('Bio::EnsEMBL::IdMapping::TinyTranscript')) {
    throw('Need a Bio::EnsEMBL::IdMapping::TinyTranscript.');
  }

  push @{ $self->[13] }, $tr;
}
biotypedescriptionprevnextTop
sub biotype {
  my $self = shift;
  $self->[9] = shift if (@_);
  return $self->[9];
}
enddescriptionprevnextTop
sub end {
  my $self = shift;
  $self->[6] = shift if (@_);
  return $self->[6];
}
get_all_TranscriptsdescriptionprevnextTop
sub get_all_Transcripts {
  return $_[0]->[13] || [];
}
is_knowndescriptionprevnextTop
sub is_known {
  my $self = shift;
  $self->[12] = shift if (@_);
  return $self->[12];
}
lengthdescriptionprevnextTop
sub length {
  my $self = shift;
  return ($self->end - $self->start + 1);
}


1;
}
logic_namedescriptionprevnextTop
sub logic_name {
  my $self = shift;
  $self->[11] = shift if (@_);
  return $self->[11];
}
seq_region_namedescriptionprevnextTop
sub seq_region_name {
  my $self = shift;
  $self->[8] = shift if (@_);
  return $self->[8];
}
startdescriptionprevnextTop
sub start {
  my $self = shift;
  $self->[5] = shift if (@_);
  return $self->[5];
}
statusdescriptionprevnextTop
sub status {
  my $self = shift;
  $self->[10] = shift if (@_);
  return $self->[10];
}
stranddescriptionprevnextTop
sub strand {
  my $self = shift;
  $self->[7] = shift if (@_);
  return $self->[7];
}
General documentation
LICENSETop
  Copyright (c) 1999-2009 The European Bioinformatics Institute and
Genome Research Limited. All rights reserved.
This software is distributed under a modified Apache license. For license details, please see /info/about/code_licence.html
CONTACTTop
  Please email comments or questions to the public Ensembl
developers list at <ensembl-dev@ebi.ac.uk>.
Questions may also be sent to the Ensembl help desk at <helpdesk@ensembl.org>.