[Biophp-dev] CVS

biophp-dev@bioinformatics.org biophp-dev@bioinformatics.org
Sun, 27 Apr 2003 21:41:04 PST


Just finished uploading the code I had from Serge with my additions to
cvs.  I did put it a directory called 'genephp' untill we all agree what
should be in the 'real' biophp distribution.  I also cleaned up quite a
few empty directories which I assumed were put there by accident (???).  

The parse class worked nicely for me.  There are now four parsers: for
genbank, swissprot (both from Serge), and for Fasta and pDRAW files
(those were simple...).  There are two subdirectories in genephp
containing testdata and testscripts.  The scripts should run if you place 
the whole structure under your webserver.

The idea is to first create a parse object:
$myParser=new parse($data);
where data can be a file or a string containing the relevant data
then:
$mySeqobject=parse->fetch();
yields the first seqobject.

$myParser->move_Next();
moves to the next (if available)

$myParser->move_Previous()
goes one back

And test for 
$myParser->eof (true when there are no more records)
$myParser->bof (true when at start of data)

See the script testfiles/test.php for the thing in action.

It should actually not be very hard to write these things back to the
appropriate file formats.

Best,

Nico