Allow falling back to any strigified Bio::AnnotationI for 'gene_name'
[bioperl-live.git] / t / SeqIO / gbxml.t
blobd7401459f894e5ed405d09517694eaa676212ffb
1 use strict;
3 BEGIN {
4    use lib '.';
5    use Bio::Root::Test;
6    
7    test_begin(-tests => 14);
8    
9    use_ok('Bio::SeqIO::gbxml');
12 my $verbose = test_debug();
14 my $in = Bio::SeqIO->new(-format  => 'gbxml',
15                           -verbose => $verbose,
16                           # This class can't parse dbEST data yet...
17                           # -file    => test_input_file('roa1.gbxml'));
18                           # So let's try a <GBSeq> file:
19                           -file    => test_input_file('EG352462.gbxml'));
20 isa_ok($in, 'Bio::SeqIO');
21 my $seq = $in->next_seq();
22 is($seq->molecule,   'mRNA',                                            'molecule');
23 is($seq->alphabet,   'dna',                                             'alphabet');
24 is($seq->primary_id,  116038450,                                        'primary_id');
25 is($seq->display_id, 'EG352462',                                        'display_id');
26 is($seq->version,     1,                                                'version');
27 is($seq->is_circular, 0,                                                'is_circular');
29 is(substr($seq->description, 0, 10), 'SAAH-aad23',                      'description');
30 is(substr($seq->seq,         0, 10), 'aataaaatta',                      'sequence');
32 my @class = $seq->species->classification;
33 is($class[$#class],'Eukaryota',                                         'classification');
35 my ($feat) = $seq->get_SeqFeatures;
36 is_deeply([ $feat->get_tag_values('clone_lib') ], [ 'Agen 0058' ],      'feat - clone_lib');
37 is_deeply([ $feat->get_tag_values('db_xref') ],   [ 'taxon:79327' ],    'feat - db_xref');
38 is_deeply([ $feat->get_tag_values('lab_host') ],  [ 'DH10B cells' ],    'feat - lab_host');