Bio::EnsEMBL::Utils::VegaCuration Gene
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::Utils::ConversionSupport
Inherit
Bio::EnsEMBL::Utils::ConversionSupport
Synopsis
Description
Methods
find_gapsDescriptionCode
Methods description
find_gapscode    nextTop
   Args       : arrayref of B::E::Transcripts
Example : my $gaps = find_gaps($all_transcripts)
Description: identifies regions of a gene that are not covered by any transcript
Returntype : int
Exceptions : none
Caller : internal
Methods code
find_gapsdescriptionprevnextTop
sub find_gaps {
	my $self = shift;
	my ($all_transcripts) = @_;
	my $gaps = 0;
	my @sorted_transcripts = sort {$a->start <=> $b->start || $b->end <=> $a->end} @{$all_transcripts};
	my $first_transcript = shift @sorted_transcripts;
	my $pos = $first_transcript->end;
	foreach my $transcript (@sorted_transcripts) {
		next if ($transcript->end < $pos );
		if ($transcript->start < $pos && $transcript->end > $pos ) {
			$pos = $transcript->end;			
			next;
		}
		elsif ($transcript->end > $pos) {
			$gaps++;
			$pos = $transcript->end;
		}
	}
	return $gaps;
}
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>.