Bio::EnsEMBL::Analysis::RunnableDB::WGA2Genes GeneRecord
Other packages in the module: Bio::EnsEMBL::Analysis::RunnableDB::WGA2Genes
Package variablesGeneral documentationMethods
Toolbar
WebCvsRaw content
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::Utils::Argument qw ( rearrange )
Synopsis
No synopsis!
Description
No description!
Methods
_get_all_transcript_cds_features
No description
Code
clone
No description
Code
gene
No description
Code
good_source_transcripts
No description
Code
name
No description
Code
new
No description
Code
projected_transcripts
No description
Code
source_transcripts
No description
Code
transcript_cds_feats
No description
Code
Methods description
None available.
Methods code
_get_all_transcript_cds_featuresdescriptionprevnextTop
sub _get_all_transcript_cds_features {
  my ($self) = @_;

  my (@orig_cds_feats, @merged_cds_feats);

  foreach my $tran (@{$self->source_transcripts}) {
    foreach my $exon (@{$tran->get_all_translateable_Exons}) {
      push @orig_cds_feats, Bio::EnsEMBL::Feature->
          new(-start  => $exon->start,
              -end    => $exon->end,
              -slice  => $exon->slice);
    }
  }

  foreach my $feat (sort {$a->start <=> $b->start} @orig_cds_feats) {
    if (not @merged_cds_feats or 
        $feat->start > $merged_cds_feats[-1]->end) {
      push @merged_cds_feats, $feat;
    } else {
      if ($feat->end > $merged_cds_feats[-1]->end) {
        $merged_cds_feats[-1]->end($feat->end);
      }
    }
  }

  $self->transcript_cds_feats(\@merged_cds_feats);
}

##################
# get/sets
#################
}
clonedescriptionprevnextTop
sub clone {
  my ($self) = @_;

  my $new_one = Bio::EnsEMBL::Analysis::RunnableDB::WGA2Genes::GeneRecord
      ->new(-source_transcripts => $self->source_transcripts,
            -gene               => $self->gene);

  return $new_one;
}



#################################################################
# FUNCTION : get_all_transcript_cds_features
#
# Description :
# Returns a list of Bio::EnsEMBL::Features representing the
# projection of the coding regions of the given transcripts
# onto the query
#################################################################
}
genedescriptionprevnextTop
sub gene {
  my ($self, $val) = @_;

  if (defined $val) {
    $self->{_gene} = $val;
  }

  return $self->{_gene};
}
good_source_transcriptsdescriptionprevnextTop
sub good_source_transcripts {
  my ($self, $val) = @_;

  if (defined $val) {
    $self->{_good_source_transcripts} = $val;
  }

  return $self->{_good_source_transcripts};
}
namedescriptionprevnextTop
sub name {
  my ($self, $val) = @_;

  if (defined $val) {
    $self->{_name} = $val;
  }

  return $self->{_name};
}
newdescriptionprevnextTop
sub new {
  my ($class, @args) = @_;

  my $self = bless {}, $class;

  my ($name, $gene, $source_trans) = rearrange
    (['NAME', 'GENE', 'SOURCE_TRANSCRIPTS'], @args);

  $self->name($name) if defined $name;
  $self->gene($gene) if defined $gene;
  $self->source_transcripts($source_trans) if defined $source_trans;

  $self->good_source_transcripts([]);
  $self->projected_transcripts([]);

  return $self;
}
projected_transcriptsdescriptionprevnextTop
sub projected_transcripts {
  my ($self, $val) = @_;

  if (defined $val) {
    $self->{_projected_transcripts} = $val;
  }

  return $self->{_projected_transcripts};
}


1;
}
source_transcriptsdescriptionprevnextTop
sub source_transcripts {
  my ($self, $val) = @_;

  if (defined $val) {
    $self->{_source_transcripts} = $val;

    $self->_get_all_transcript_cds_features;
  }

  return $self->{_source_transcripts};
}
transcript_cds_featsdescriptionprevnextTop
sub transcript_cds_feats {
  my ($self, $val) = @_;

  if (defined $val) {
    $self->{_transcript_cds} = $val;
  }

  return $self->{_transcript_cds};
}
General documentation
No general documentation available.