Skip to content
Snippets Groups Projects
Commit 0a388edf authored by Glenn Proctor's avatar Glenn Proctor
Browse files

Tests for new UnconventionalTranscriptAssociationAdaptor object.

parent 34d5fdb9
No related branches found
No related tags found
No related merge requests found
use strict;
use Bio::EnsEMBL::Test::TestUtils;
use Bio::EnsEMBL::Test::MultiTestDB;
BEGIN { $| = 1;
use Test;
plan tests => 14;
}
my $multi_db = Bio::EnsEMBL::Test::MultiTestDB->new;
my $db = $multi_db->get_DBAdaptor('core');
my $verbose = 0;
# Test Creation
my $gene = $db->get_GeneAdaptor->fetch_by_dbID(18256);
my $transcript = $db->get_TranscriptAdaptor()->fetch_by_dbID(21718);
my $utaa = $db->get_UnconventionalTranscriptAssociationAdaptor();
ok(ref($utaa) && $utaa->isa('Bio::EnsEMBL::DBSQL::UnconventionalTranscriptAssociationAdaptor'));
# test fetch all by interaction type
ok(@{$utaa->fetch_all_by_interaction_type('antisense')} == 3);
# test fetch all by gene, with and without type
ok(@{$utaa->fetch_all_by_gene($gene)} == 3);
ok(@{$utaa->fetch_all_by_gene($gene, 'antisense')} == 2);
# test fetch all by transcript, with and without type
ok(@{$utaa->fetch_all_by_transcript($transcript)} == 2);
ok(@{$utaa->fetch_all_by_transcript($transcript, 'antisense')} == 1);
# TODO - test functionality in gene.t
# Test store
$multi_db->save('core', 'unconventional_transcript_association');
my $uta = Bio::EnsEMBL::UnconventionalTranscriptAssociation->new($transcript, $gene, 'antisense');
$utaa->store($uta);
# TODO - check contents
$multi_db->restore('core');
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