Skip to content
Snippets Groups Projects
Commit f249611d authored by Andreas Kusalananda Kähäri's avatar Andreas Kusalananda Kähäri
Browse files

Added tests for cdna_start(), cdna_end(), cdna_coding_start(),

cdna_coding_end(), coding_region_start(), and coding_region_end() on
exons.

Current API and test DB passes the tests.
parent 6520767f
No related branches found
No related tags found
No related merge requests found
use strict;
BEGIN { $| = 1;
use Test ;
plan tests => 35;
BEGIN {
$| = 1;
use Test;
plan tests => 47;
}
my $loaded = 0;
......@@ -264,3 +265,29 @@ foreach my $e (@exons) {
$multi->restore();
# TESTS 36-47: Tests for cdna_start(), cdna_end(), cdna_coding_start(),
# cdna_coding_end(), coding_region_start(), and coding_region_end().
my $transcriptad = $db->get_TranscriptAdaptor();
my $transcript = $transcriptad->fetch_by_stable_id('ENST00000246229');
@exons = @{ $transcript->get_all_Exons() };
$exon = shift @exons; # First exon is non-coding.
ok( $exon->cdna_start($transcript) == 1 );
ok( $exon->cdna_end($transcript) == 88 );
ok( !defined $exon->cdna_coding_start($transcript) );
ok( !defined $exon->cdna_coding_end($transcript) );
ok( !defined $exon->coding_region_start($transcript) );
ok( !defined $exon->coding_region_end($transcript) );
$exon = shift @exons; # Second exon is coding.
ok( $exon->cdna_start($transcript) == 89 );
ok( $exon->cdna_end($transcript) == 462 );
ok( $exon->cdna_coding_start($transcript) == 203 );
ok( $exon->cdna_coding_end($transcript) == 462 );
ok( $exon->coding_region_start($transcript) == 30577779 );
ok( $exon->coding_region_end($transcript) == 30578038 );
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment