Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl
Commits
af67b4e2
Commit
af67b4e2
authored
Nov 18, 2015
by
Magali Ruffier
Browse files
testing untested methods
parent
7b630f7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
modules/t/transcript.t
modules/t/transcript.t
+42
-0
No files found.
modules/t/transcript.t
View file @
af67b4e2
...
...
@@ -31,6 +31,8 @@ my $multi = Bio::EnsEMBL::Test::MultiTestDB->new();
ok
(
$multi
);
my
$db
=
$multi
->
get_DBAdaptor
('
core
'
);
my
$ontology
=
Bio::EnsEMBL::Test::
MultiTestDB
->
new
('
ontology
');
my
$odb
=
$ontology
->
get_DBAdaptor
("
ontology
");
my
$sa
=
$db
->
get_SliceAdaptor
();
...
...
@@ -293,6 +295,46 @@ is(3, scalar(@transcripts));
$transcriptCount
=
$ta
->
count_all_by_source
(['
havana
',
'
vega
']);
is
(
3
,
$transcriptCount
);
#
# test TranscriptAdaptor::fetch_all
#
note
("
Test fetch_all
");
@transcripts
=
@
{
$ta
->
fetch_all
()
};
is
(
26
,
scalar
(
@transcripts
),
"
Got 26 transcripts
");
#
# test TranscriptAdaptor::fetch_all_by_GOTerm
#
note
("
Test fetch_all_by_GOTerm
");
my
$go_adaptor
=
$odb
->
get_OntologyTermAdaptor
();
my
$go_term
=
$go_adaptor
->
fetch_by_accession
('
GO:0070363
');
@transcripts
=
@
{
$ta
->
fetch_all_by_GOTerm
(
$go_term
)
};
is
(
scalar
(
@transcripts
),
0
,
"
Found 0 genes with fetch_all_by_GOTerm
");
#
# test TranscriptAdaptor::fetch_all_by_exon_supporting_evidence
#
note
("
Test fetch_all_by_exon_supporting_evidence
");
@transcripts
=
@
{
$ta
->
fetch_all_by_exon_supporting_evidence
('
BRCA2
',
'
dna_align_feature
')
};
is
(
scalar
(
@transcripts
),
0
,
"
No transcripts with BRCA2 daf
");
@transcripts
=
@
{
$ta
->
fetch_all_by_exon_supporting_evidence
('
AK015740.1
',
'
dna_align_feature
')
};
is
(
scalar
(
@transcripts
),
1
,
"
1 transcript with AK015740.1 daf
");
@transcripts
=
@
{
$ta
->
fetch_all_by_exon_supporting_evidence
('
Q9NUG5
',
'
protein_align_feature
')
};
is
(
scalar
(
@transcripts
),
1
,
"
1 transcript with Q9NUG5 paf
");
#
# test TranscriptAdaptor::fetch_all_by_transcript_supporting_evidence
#
note
("
Test fetch_all_by_transcript_supporting_evidence
");
@transcripts
=
@
{
$ta
->
fetch_all_by_transcript_supporting_evidence
('
BRCA2
',
'
dna_align_feature
')
};
is
(
scalar
(
@transcripts
),
0
,
"
No transcripts with BRCA2 daf
");
@transcripts
=
@
{
$ta
->
fetch_all_by_transcript_supporting_evidence
('
AK015740.1
',
'
dna_align_feature
')
};
is
(
scalar
(
@transcripts
),
0
,
"
0 transcripts with AK015740.1 daf
");
@transcripts
=
@
{
$ta
->
fetch_all_by_transcript_supporting_evidence
('
Q9NUG5
',
'
protein_align_feature
')
};
is
(
scalar
(
@transcripts
),
0
,
"
No transcripts with Q9NUG5 paf
");
#
# Test get_all_Introns by joining Exons and introns
# and comparing it to the original
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment