[Bioperl-l] game.pm filehandle/chunkable update

Bradley Marshall bradmars@yahoo.com
Mon, 11 Dec 2000 18:59:04 -0800 (PST)


I've updated the game.pm module to correctly (I think)
support filehandles.  You can now do:

$in = Bio::SeqIO::game->new(-file=>$file,
-format=>'game');

OR:

$in = Bio::SeqIO::game->new(-fh=>$file,
-format=>'game');


It also recognizes the top-level tag:

<bx-game:flavor>chunkable</bx-game:chunkable>

To qualify as being chunkable, a document must be laid
out as such:

<bx-seq:seq bx-seq:id='seq1'>
</bx-seq:seq>

ALL bx-annotation, bx-feature and bx-computation
objects regarding seq1. 

<bx-seq:seq bx-seq:id='seq2'>
</bx-seq:seq>

ALL bx-annotation, bx-feature and bx-computation
objects regarding seq2. 


NOTE:  You can have NON TOP LEVEL sequences and still
be "chunkable", only top-level sequences will be
parsed.

ie:

<bx-seq:seq bx-seq:id='seq1'>
</bx-seq:seq>
<bx-annotation:annotation seq=seq1>
	<bx-seq:seq id='seq2'>
	</bx-seq>
</bx-annotation:annotation>

counts as being chunkable, but seq2 will be ignored by
next_seq.


This revision is more memory intensive, since it loads
the data from <bx-seq:seq> to the next <bx-seq:seq>
into memory as a string and then parses that.

Non-chunkable documents are loaded into memory in
their entirety before being parsed.

FUTURE GOALS:  

- Allow people to use other parsers (ie ones that
don't need expat, which is non-CPAN).  These will have
to be detected at run-time.


That's all for now...

Happy parsing!
Brad


__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/