This file is indexed.

/usr/share/perl5/Bio/SeqIO/tigrxml.pm is in libbio-perl-perl 1.7.2-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
#
# BioPerl module for Bio::SeqIO::tigrxml
#
# Please direct questions and support issues to <bioperl-l@bioperl.org> 
#
# Cared for by Jason Stajich <jason-at-bioperl-dot-org>
#
# Copyright Jason Stajich
#
# You may distribute this module under the same terms as perl itself

# POD documentation - main docs before the code

=head1 NAME

Bio::SeqIO::tigrxml - Parse TIGR (new) XML 

=head1 SYNOPSIS

  use Bio::SeqIO;
  my $in = Bio::SeqIO->new(-format => 'tigrcoordset',
                          -file   => 'file.xml');

  while( my $seq = $in->next_seq ) {
     # do something...
  }

=head1 DESCRIPTION

This is a parser for TIGR Coordset XML for their in-progress
annotation dbs.

=head1 FEEDBACK

=head2 Mailing Lists

User feedback is an integral part of the evolution of this and other
Bioperl modules. Send your comments and suggestions preferably to
the Bioperl mailing list.  Your participation is much appreciated.

  bioperl-l@bioperl.org                  - General discussion
  http://bioperl.org/wiki/Mailing_lists  - About the mailing lists

=head2 Support 

Please direct usage questions or support issues to the mailing list:

I<bioperl-l@bioperl.org>

rather than to the module maintainer directly. Many experienced and 
reponsive experts will be able look at the problem and quickly 
address it. Please include a thorough description of the problem 
with code and data examples if at all possible.

=head2 Reporting Bugs

Report bugs to the Bioperl bug tracking system to help us keep track
of the bugs and their resolution. Bug reports can be submitted via the
web:

  https://github.com/bioperl/bioperl-live/issues

=head1 AUTHOR - Jason Stajich

Email jason-at-bioperl-dot-org

=head1 APPENDIX

The rest of the documentation details each of the object methods.
Internal methods are usually preceded with a _

=cut


# Let the code begin...


package Bio::SeqIO::tigrxml;
use vars qw($Default_Source);
use strict;
use XML::SAX;
use XML::SAX::Writer;
use Data::Dumper;
use Bio::Seq::SeqFactory;
use Bio::Species;
use Bio::SeqFeature::Generic;
use Bio::Annotation::Reference;
use Bio::Annotation::Comment;
use Bio::Annotation::DBLink;
use List::Util qw(min max);

use base qw(Bio::SeqIO XML::SAX::Base);


$Default_Source = 'TIGR';

sub _initialize {
    my ($self) = shift;
    $self->SUPER::_initialize(@_);
    $self->{'_parser'} = XML::SAX::ParserFactory->parser('Handler' => $self);
    if( ! defined $self->sequence_factory ) {
	$self->sequence_factory(Bio::Seq::SeqFactory->new
				(-verbose => $self->verbose(), 
				 -type => 'Bio::Seq::RichSeq'));
    }
    return;
}

sub next_seq {    
    my $self = shift;
    if( @{$self->{'_seendata'}->{'_seqs'} || []} || 
	eof($self->_fh)) { 
	return shift @{$self->{'_seendata'}->{'_seqs'}};
    }
    $self->{'_parser'}->parse_file($self->_fh);
    return shift @{$self->{'_seendata'}->{'_seqs'}};
}

# XML::SAX::Base methods

sub start_document {
    my ($self,$doc) = @_;
    $self->{'_seendata'} = {'_seqs'    => [],
			    '_authors' => [],
			    '_feats'   => [] };
    $self->SUPER::start_document($doc);
}

sub end_document { 
    my ($self,$doc) = @_;
    $self->SUPER::end_document($doc);
}

sub start_element {
    my ($self,$ele) = @_;
    # attributes
    my $name = uc $ele->{'LocalName'};
    my $attr = $ele->{'Attributes'};
    my $seqid = defined $self->{'_seendata'}->{'_seqs'}->[-1] ? 
	$self->{'_seendata'}->{'_seqs'}->[-1]->display_id : undef;
	
    # we're going to try and be SO-nice here
    if( $name eq 'ASSEMBLY' ) { # New sequence
	my ($len) = $attr->{'{}COORDS'}->{'Value'} =~ /\d+\-(\d+)/;
	push @{$self->{'_seendata'}->{'_seqs'}},
	$self->sequence_factory->create
	    (
	     -display_id => $attr->{'{}ASMBL_ID'}->{'Value'},
	     -length     => $len,
	     );
    } elsif( $name eq 'HEADER' ) { 
    } elsif( $name eq 'CLONE_NAME' ) {
    } elsif( $name eq 'ORGANISM' ) { 
    } elsif( $name eq 'AUTHOR_LIST' ) {
	$self->{'_seendata'}->{'_authors'} = [];
    } elsif( $name eq 'TU' ) { # gene feature
	my ($s,$e) = ($attr->{'{}COORDS'}->{'Value'} =~ /(\d+)\-(\d+)/);
	my $strand = 1;
	if( $s > $e) { 
	    ($s,$e,$strand) = ( $e,$s,-1);
	}
	my $fname = $attr->{'{}FEAT_NAME'}->{'Value'};
	my $f = Bio::SeqFeature::Generic->new
	    (-seq_id      => $seqid,
	     -start       => $s,
	     -end         => $e,
	     -strand      => $strand,
	     -primary_tag => 'gene', # what does this really map to?
	     -source_tag  => $Default_Source,
	     -tag         => { 
		 'Note'         => $attr->{'{}COM_NAME'}->{'Value'},
		 'ID'           => $fname,
		 'locus'        => $attr->{'{}LOCUS'}->{'Value'},
		 'pub_locus'    => $attr->{'{}PUB_LOCUS'}->{'Value'},
		 'alt_locus'    => $attr->{'{}ALT_LOCUS'}->{'Value'},
		 'pub_comment'  => $attr->{'{}PUB_COMMENT'}->{'Value'},
	     }
	     );
	push @{$self->{'_seendata'}->{'_feats'}}, $f;
	# add this feature to the current sequence
	$self->{'_seendata'}->{'_seqs'}->[-1]->add_SeqFeature($f);
    } elsif( $name eq 'MODEL' ) { # mRNA/transcript
	# reset the UTRs
	$self->{'_seendata'}->{"five_prime_UTR"}= undef;
	$self->{'_seendata'}->{"three_prime_UTR"} = undef;
	my ($s,$e) = ($attr->{'{}COORDS'}->{'Value'} =~ /(\d+)\-(\d+)/);
	my $strand = 1;
	if( $s > $e) { 
	    ($s,$e,$strand) = ( $e,$s,-1);
	}
	my $parent = $self->{'_seendata'}->{'_feats'}->[-1];
	my ($parentid) = $parent->get_tag_values('ID');
	my $f = Bio::SeqFeature::Generic->new
	    (-primary_tag => 'transcript',
	     -source_tag  => $Default_Source,
	     -start       => $s,	     # we use parent start/stop because 'MODEL' means CDS start/stop
	     -end         => $e,             # but we want to reflect 
	     -strand      => $strand,
	     -seq_id      => $seqid,
	     -tag         => {
		 'ID'     => $attr->{'{}FEAT_NAME'}->{'Value'},
		 'Parent' => $parentid,
		 'Note'   => $attr->{'{}COMMENT'}->{'Value'},
	     });
	$parent->add_SeqFeature($f);
	push @{$self->{'_seendata'}->{'_feats'}}, $f;
	$self->{'_seendata'}->{'_seqs'}->[-1]->add_SeqFeature($f);
    } elsif( $name eq 'EXON' ) { # exon feature
	my ($s,$e) = ($attr->{'{}COORDS'}->{'Value'} =~ /(\d+)\-(\d+)/);
	my $strand = 1;
	if( $s > $e) { 
	    ($s,$e,$strand) = ( $e,$s,-1);
	}
	my $parent = $self->{'_seendata'}->{'_feats'}->[-1];
	
	my ($parentid) = $parent->get_tag_values('ID');	

	my $f = Bio::SeqFeature::Generic->new
	    (-primary_tag => 'exon',
	     -source_tag  => $Default_Source,
	     -seq_id      => $seqid,
	     -start       => $s,
	     -end         => $e, 
	     -strand      => $strand,
	     -tag         => {
		 'ID'     => $attr->{'{}FEAT_NAME'}->{'Value'},
		 'Parent' => $parentid,
	     });
	$parent->add_SeqFeature($f,'EXPAND');
	$self->{'_seendata'}->{'_seqs'}->[-1]->add_SeqFeature($f);
	# we'll still just add exons to the transcript 
    } elsif( $name eq 'PROTEIN_SEQ' ) { 
	
    } elsif( $name eq 'CDS' ) {
	# CDS will be the translation of the transcript
	my ($s,$e) = ($attr->{'{}COORDS'}->{'Value'} =~ /(\d+)\-(\d+)/);
	my $strand = 1;
	if( $s > $e) { 
	    ($s,$e,$strand) = ( $e,$s,-1);
	}
	my $parent = $self->{'_seendata'}->{'_feats'}->[-1];
	my ($parentid) = $parent->get_tag_values('ID');
	$self->assert($parent->primary_tag eq 'transcript', 'Testing for primary tag equivalent to mRNA');
	$self->assert($parent->strand == $strand || abs($s-$e) == 0, 'Testing that parent feature and current feature strand are equal '. $parentid. ' '.$attr->{'{}FEAT_NAME'}->{'Value'});
	my $f = Bio::SeqFeature::Generic->new
	    (-primary_tag => 'CDS',
	     -source_tag  => $Default_Source,
	     -seq_id      => $seqid,
	     -start       => $s,
	     -end         => $e, 
	     -strand      => $parent->strand,
	     -tag         => {
		 'ID'     => $attr->{'{}FEAT_NAME'}->{'Value'},
		 'Parent' => $parentid, # should be the mRNA
	     });
	$parent->add_SeqFeature($f);
	$self->{'_seendata'}->{'_seqs'}->[-1]->add_SeqFeature($f);	    
    } elsif( $name eq 'RNA-EXON' ) {

	my ($s,$e) = ($attr->{'{}COORDS'}->{'Value'} =~ /(\d+)\-(\d+)/);
	my $strand = 1;
	if( $s > $e) { 
	    ($s,$e,$strand) = ( $e,$s,-1);
	}
	my $parent = $self->{'_seendata'}->{'_feats'}->[-1];
	my ($parentid) = $parent->get_tag_values('ID');
	my $f = Bio::SeqFeature::Generic->new
	    (-primary_tag => 'tRNA_exon', # tRNA_exon?
	     -source_tag  => $Default_Source,
	     -seq_id      => $seqid,
	     -start       => $s,
	     -end         => $e, 
	     -strand      => $strand,
	     -tag         => {
		 'ID'     => $attr->{'{}FEAT_NAME'}->{'Value'},
		 'Parent' => $parentid,
	     }
	     );
	$parent->add_SeqFeature($f);
	$self->{'_seendata'}->{'_seqs'}->[-1]->add_SeqFeature($f);
    } elsif( $name eq 'PRE-TRNA' ) { # tRNA gene
	my ($s,$e) = ( $attr->{'{}COORDS'}->{'Value'} =~/(\d+)\-(\d+)/);
	my $strand = 1;
	if( $s > $e) { 
	    ($s,$e,$strand) = ( $e,$s,-1);
	}
	my $f = Bio::SeqFeature::Generic->new
	    ( -primary_tag => 'tRNA_coding_gene',
	      -source_tag  => $Default_Source,
	      -seq_id      => $seqid,
	      -start       => $s,
	      -end         => $e,
	      -strand      => $strand,
	      -tag         => {'ID' => $attr->{'{}FEAT_NAME'}->{'Value'}, 
			   }
	      );
	push  @{$self->{'_seendata'}->{'_feats'}}, $f;	
	$self->{'_seendata'}->{'_seqs'}->[-1]->add_SeqFeature($f);	
    } elsif( $name eq 'TRNA' ) { # tRNA transcript
	my ($s,$e) = ($attr->{'{}COORDS'}->{'Value'} =~ /(\d+)\-(\d+)/);
	my $strand = 1;
	if( $s > $e) { 
	    ($s,$e,$strand) = ( $e,$s,-1);
	}
	my $parent = $self->{'_seendata'}->{'_feats'}->[-1];
	my ($parentid) = $parent->get_tag_values('ID');
	my $f = Bio::SeqFeature::Generic->new
	    (-primary_tag => 'tRNA_primary_transcript',
	     -source_tag  => $Default_Source,
	     -start       => $s,
	     -end         => $e, 
	     -strand      => $strand,
	     -seq_id      => $seqid,
	     -tag         => {
		 'ID'     => $attr->{'{}FEAT_NAME'}->{'Value'},
		 'Parent' => $parentid,
		 'Note'   => $attr->{'{}COM_NAME'}->{'Value'},
		 'anticodon' => $attr->{'{}ANTICODON'}->{'Value'},
		 'pub_locus' => $attr->{'{}PUB_LOCUS'}->{'Value'},

	     });
	$parent->add_SeqFeature($f);
	push  @{$self->{'_seendata'}->{'_feats'}}, $f;	
	$self->{'_seendata'}->{'_seqs'}->[-1]->add_SeqFeature($f);
    } elsif( $name eq 'REPEAT_LIST' ) {
    } elsif( $name eq 'REPEAT' ) {
	my ($s,$e) = ($attr->{'{}COORDS'}->{'Value'} =~ /(\d+)\-(\d+)/);
	my $strand = 1;
	if( $s > $e) { 
	    ($s,$e,$strand) = ( $e,$s,-1);
	}
	my $f = Bio::SeqFeature::Generic->new
	    (-primary_tag => 'simple_repeat',
	     -source_tag  => $Default_Source,
	     -seq_id      => $seqid,
	     -start       => $s,
	     -end         => $e, 
	     -stand       => $strand,
	     -tag         => {
		 'ID'     => $attr->{'{}FEAT_NAME'}->{'Value'},
	     });

	push @{$self->{'_seendata'}->{'_feats'}}, $f;
	$self->{'_seendata'}->{'_seqs'}->[-1]->add_SeqFeature($f);	
    } elsif ( $name  eq 'AUTHOR' ) {
    } elsif( $name eq 'GB_DESCRIPTION' ) {
	
    } elsif( $name eq 'GB_COMMENT' ) {
    } elsif( $name eq 'LINEAGE' ) {
	
    } else { 
	$self->warn("Unknown element $name, ignored\n");
    }
    push @{$self->{'_state'}}, $name;
    $self->SUPER::start_element($ele);
}

sub end_element {
    my ($self,$ele) = @_;
    pop @{$self->{'_state'}};
    my $name = $ele->{'LocalName'};
    my $curseq = $self->{'_seendata'}->{'_seqs'}->[-1];
    if( $name eq 'AUTHOR_LIST' ) {
	if( $curseq->can('annotation') ) {
	    $curseq->annotation->add_Annotation
		('reference',Bio::Annotation::Reference->new
		 (-authors => join(',',@{$self->{'_seendata'}->{'_authors'}}))
		 );	    
	}
	$self->{'_seendata'}->{'_authors'} = [];
    } elsif( $name eq 'ASSEMBLY' ) {
	if( @{$self->{'_seendata'}->{'_feats'} || []} ) {
	    $self->warn("Leftover features which were not finished!");
	}
	$self->debug("end element for ASSEMBLY ". $curseq->display_id. "\n");
    } elsif( $name eq 'TU' || 
	     $name eq 'TRNA'  || $name eq 'PRE-TRNA' || 
	     $name eq 'REPEAT' ) {
	pop @{$self->{'_seendata'}->{'_feats'}};
    } elsif( $name eq 'MODEL' ) {
	# This is all to for adding UTRs	

	my $model = pop @{$self->{'_seendata'}->{'_feats'}};
	my $curseq = $self->{'_seendata'}->{'_seqs'}->[-1];
	# sort smallest to largest, don't forget about 
	# strandedness
	my ($parentid) = $model->get_tag_values('Parent');	

	my @features = $model->get_SeqFeatures();
	my @exons = sort { $a->start <=> $b->start } 
  	            grep { $_->primary_tag eq 'exon' } @features;
	
        my @cdsexons = sort { $a->start <=> $b->start } 
	               grep { $_->primary_tag eq 'CDS' } @features;
	
	# look at the exons, find those which come after the model start
	my $cdsexon = shift @cdsexons;	
	my $exon = shift @exons; # first exon
	if( ! defined $cdsexon ) { 
	    $self->warn( "no CDS exons $parentid!");
	    return;
	} elsif( ! defined $exon ) { 
	    $self->warn("no exons $parentid!" );
	    return;
	}
	my $utrct = 1;
	while( defined $exon && $exon->start < $cdsexon->start ) {
	    my ($pid) = $exon->get_tag_values('Parent');
	    $self->debug("LeftPhase: tu-id $parentid mrna-id $pid exon is ".
			 $exon->location->to_FTstring. 
			 " CDSexon is ".$cdsexon->location->to_FTstring."\n");
	    
	    my $utr = Bio::SeqFeature::Generic->new
		(-seq_id      => $exon->seq_id,
		 -strand      => $exon->strand,
		 -primary_tag => $exon->strand > 0 ? "five_prime_UTR" : "three_prime_UTR",
		 -source_tag  => $Default_Source,
		 -tag         => { 
		     'ID'     => "$pid.UTR".$utrct++,
		     'Parent' => $pid },
		 );
	    my ($ns,$ne);
	    if( $utr->primary_tag eq 'five_prime_UTR' ) {
		$ns = $exon->start;
		$ne = min ( $exon->end, $cdsexon->start - 1);
	    } else {
		$ne = min( $exon->end, $cdsexon->start - 1);
		$ns = $exon->start;
	    }
	    $utr->start($ns); $utr->end($ne);	    
	    $model->add_SeqFeature($utr);
	    $curseq->add_SeqFeature($utr);
	    $exon = shift @exons;
	}
	@exons = sort { $a->start <=> $b->start } 
	         grep {$_->primary_tag eq 'exon' } @features;
        @cdsexons = sort { $a->start <=> $b->start } 
	            grep { $_->primary_tag eq 'CDS' } @features;
	
	$cdsexon = pop @cdsexons;
	$exon = pop @exons;
	if( ! defined $cdsexon ) { 
	    $self->warn( "no CDS exons $parentid!");
	    return;
	} elsif( ! defined $exon ) { 
	    $self->warn("no exons $parentid!" );
	    return;
	}
	$utrct = 1;
	while( defined $exon &&$exon->end > $cdsexon->end ) { 
	    my ($pid) = $exon->get_tag_values('Parent');
	    $self->debug("RightPhase: tu-id $parentid mrna-id $pid exon is ".
			 $exon->location->to_FTstring. 
			 " CDSexon is ".$cdsexon->location->to_FTstring."\n");
	    
	    my $utr = Bio::SeqFeature::Generic->new
	       (-seq_id      => $exon->seq_id,
		-strand      => $exon->strand,
		-primary_tag => $exon->strand < 0 ? "five_prime_UTR" : "three_prime_UTR",
		-source_tag  => $Default_Source,
		-tag         => { 
		    'Parent' => $pid,
		    'ID'     => "$pid.UTR".$utrct++,
		}
		);
	    my ($ns,$ne);
	    if( $utr->primary_tag eq 'three_prime_UTR' ) {		
		$ns = max ( $exon->start, $cdsexon->end + 1);
		$ne = $exon->end;		
	    } else {		
		$ns = $cdsexon->end+1;
		$ne = max ( $exon->end, $cdsexon->start + 1);
	    }
	    $utr->start($ns); $utr->end($ne);
	    
	    $model->add_SeqFeature($utr);
	    $curseq->add_SeqFeature($utr);
	    $exon = pop @exons;
	}
    }
    $self->SUPER::end_element($ele);
}

sub characters {
    my ($self,$data) = @_;
    if( ! @{$self->{'_state'}} ) {
	$self->warn("Calling characters with no previous start_element call. Ignoring data");
    } else {
	my $curseq = $self->{'_seendata'}->{'_seqs'}->[-1];
	my $curfeat = $self->{'_seendata'}->{'_feats'}->[-1];
	my $name = $self->{'_state'}->[-1];	
	if( defined $curseq ) { 
	    if( $name eq 'CLONE_NAME' ) {
		$self->debug("Clone name is ",$data->{'Data'}, "\n");
		$curseq->display_id($data->{'Data'});
	    } elsif( $name eq 'ORGANISM' ) {
		my ($genus,$species,$subspec) = split(/\s+/,$data->{Data},3);
		$curseq->species(Bio::Species->new(
						   -classification => 
						   [$species,$genus],
						   -sub_species => $species));
	    } elsif( $name eq 'LINEAGE' ) {
		$curseq->species->classification( 
				  [ 
				    $curseq->species->species,
				    $curseq->species->genus, 
				    reverse  (map { s/^\s+//; 
						    s/\s+$//; $_; } 
					      split /[;\.]+/,$data->{'Data'} ),
				    ]
				  );
	    } elsif( $name eq 'AUTHOR' ) {
		push @{$self->{'_seendata'}->{'_authors'}}, $data->{'Data'};
	    }
	}
	if( defined $curfeat ) {
	    if( $name eq 'EXON' ) { # exon feature
	    } elsif( $name eq 'RNA-EXON' ) {
		
	    } elsif( $name eq 'PROTEIN_SEQ' ) { 
		$curfeat->add_tag_value('translation',$data->{'Data'});
	    } elsif( $name eq 'CDS' ) {
	    } elsif( $name eq 'PRE-TRNA' ) { # tRNA gene
	    } elsif( $name eq 'TRNA' ) { # tRNA transcript
	    } elsif( $name eq 'REPEAT_LIST' ) {
	    } elsif( $name eq 'REPEAT' ) {
		$curfeat->add_tag_value('Note',$data->{'Data'});
	    } elsif( $name eq 'GB_COMMENT' ) {
		$curseq->annotation->add_Annotation
		    ('comment',
		     Bio::Annotation::Comment->new(-text => $data->{'Data'}));
	    } elsif( $name eq 'GB_DESCRIPTION' ) {
		$curseq->description($data->{'Data'});
	    }
	}
    }
    $self->SUPER::characters($data);
}


sub assert { 
    my ($self,$test,$msg) = @_;
    $self->throw($msg) unless $test;
}
1;