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
64e00f69
Commit
64e00f69
authored
Jun 15, 2012
by
Andy Yates
Browse files
Updating GFF parser tests
parent
ee9aabdf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
modules/t/gffParser.t
modules/t/gffParser.t
+34
-0
No files found.
modules/t/gffParser.t
View file @
64e00f69
...
...
@@ -79,4 +79,38 @@ GFF
}
}
{
my
$string
=
<<GFF;
##gff-version 3
##sequence-region ctg123 1 1497228
##taken-from example parsing file with FASTA directive
ctg123\t.\tgene\t1000\t9000\t.\t+\t.\tID=gene00001;Name=EDEN
###
##FASTA
>ctg123
AACCTTTGGGCCGGGCCTTAAAA
AACC
GFF
my
$io
=
IO::
String
->
new
(
\
$string
);
my
$gff
=
Bio::EnsEMBL::Utils::IO::
GFFParser
->
new
(
$io
);
my
$header
=
$gff
->
parse_header
();
is_deeply
(
$header
,
[
'
##gff-version 3
',
'
##sequence-region ctg123 1 1497228
',
'
##taken-from example parsing file with FASTA directive
'],
'
Checking headers all parse
'
);
my
$actual_gene
=
$gff
->
parse_next_feature
();
my
$expected_gene
=
{
seqid
=>
'
ctg123
',
start
=>
1000
,
end
=>
9000
,
strand
=>
1
,
source
=>
'
.
',
type
=>
'
gene
',
score
=>
'
.
',
phase
=>
'
.
',
attribute
=>
{
ID
=>
'
gene00001
',
Name
=>
'
EDEN
'
}
};
is_deeply
(
$actual_gene
,
$expected_gene
,
'
Checking TF record parses
');
my
$id
=
$gff
->
parse_next_feature
();
ok
(
!
defined
$id
,
'
No more features
');
my
$seq
=
$gff
->
parse_next_sequence
();
is_deeply
(
$seq
,
{
header
=>
'
>ctg123
',
sequence
=>
"
AACCTTTGGGCCGGGCCTTAAAAAACC
"},
"
Checking Sequence parses correctly
")
}
done_testing
();
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