<commit_before>
#
# BioPerl module for Gene
#
# Cared for by <NAME> <<EMAIL>>
#
# Copyright <NAME>
#
# You may distribute this module under the same terms as perl itself

# POD documentation - main docs before the code

=head1 NAME

Bio::EnsEMBL::Gene - Object for confirmed Genes

=head1 SYNOPSIS

Confirmed genes. Basically has a set of transcripts

=head1 DESCRIPTION

Needs more description.

=head1 CONTACT

Describe contact details here

=head1 APPENDIX

The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _

=cut


# Let the code begin...


package Bio::EnsEMBL::Gene;
use vars qw(@ISA);
use strict;

# Object preamble - inheriets from Bio::SeqFeature::Generic

use Bio::Root::Object;
use Bio::EnsEMBL::Transcript;


@ISA = qw(Bio::Root::Object);
# new() is inherited from Bio::Root::Object

# _initialize is where the heavy stuff will happen when new is called

sub _initialize {
  my($self,@args) = @_;

  my $make = $self->SUPER::_initialize;

  $self->{'_transcript_array'} = [];
# set stuff in self from @args
  return $make; # success - we hope!
}

=head2 add_Transcript

 Title   : add_Transcript
 Usage   : $gene->add_Transcript($tr)
 Function:
 Example :
 Returns : 
 Args    :


=cut<commit_msg>added unique exon/unique contig id<commit_after>
#
# BioPerl module for Gene
#
# Cared for by <NAME> <<EMAIL>>
#
# Copyright <NAME>
#
# You may distribute this module under the same terms as perl itself

# POD documentation - main docs before the code

=head1 NAME

Bio::EnsEMBL::Gene - Object for confirmed Genes

=head1 SYNOPSIS

Confirmed genes. Basically has a set of transcripts

=head1 DESCRIPTION

Needs more description.

=head1 CONTACT

Describe contact details here

=head1 APPENDIX

The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _

=cut


# Let the code begin...


package Bio::EnsEMBL::Gene;
use vars qw(@ISA);
use strict;

# Object preamble - inheriets from Bio::SeqFeature::Generic

use Bio::Root::Object;
use Bio::EnsEMBL::Transcript;


@ISA = qw(Bio::Root::Object);
# new() is inherited from Bio::Root::Object

# _initialize is where the heavy stuff will happen when new is called

sub _initialize {
  my($self,@args) = @_;

  my $make = $self->SUPER::_initialize;

  $self->{'_transcript_array'} = [];
# set stuff in self from @args
  return $make; # success - we hope!
}

=head2 each_unique_Exon

 Title   : each_unique_Exon
 Usage   : foreach my $exon ( $gene->each_unique_Exon )
 Function: retrieves an array of exons associated with this
           gene, made nonredudant
 Example :
 Returns : 
 Args    :


=cut

sub each_unique_Exon{
   my ($self) = @_;
   my %h;

   foreach my $trans ( $self->each_Transcript ) {
       foreach my $exon ( $trans->each_Exon ) {
	   $h{$exon->id()} = $exon;
       }
   }

   return values %h;
   
}

=head2 unique_contig_ids

 Title   : unique_contig_ids
 Usage   : foreach $id ( $gene->unique_contig_ids ) 
 Function: returns an array of contig ids made unique linked
           to this gene
 Example :
 Returns : 
 Args    :


=cut

sub unique_contig_ids{
   my ($self) = @_;
   my %h;

   foreach my $exon ( $self->each_unique_Exon() ) {
       $h{$exon->contig_id()} = 1;
   }

   return keys %h;
}


=head2 add_Transcript

 Title   : add_Transcript
 Usage   : $gene->add_Transcript($tr)
 Function:
 Example :
 Returns : 
 Args    :


=cut
{'fraction_non_alphanumeric': 0.10616637579988365, 'fraction_numerical': 0.004363001745200698, 'mean_word_length': 3.6347708894878705, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7029502', 'n_tokens_mistral': 1206, 'n_tokens_neox': 1131, 'n_words': 383}