<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hi James,
<p> Many thanks for the patch. Glad it was simple.
This has now been installed here. I agree with your comments about io_lib
and re-inventing the wheel. At some stage it would be good to get all these
formats in.
<p>Regards
<br>Tim
<blockquote TYPE=CITE>Hello all,
<p>I've now identified the problem in the abiview program.
<br>The program was assuming that the position of the PLOC block immediately
<br>follows the PBAS block, which is not always true. All blocks should
be
<br>considered as files in a directory - they can physically be stored
in any
<br>order. Hence you have to query the directory in order to find the file
<br>location. Fortunately the patch is simple:
<p>*** abiview.c~ Wed Feb 14 09:48:07 2001
<br>--- abiview.c Wed Feb 14 10:05:59 2001
<br>***************
<br>*** 71,76 ****
<br>--- 71,77 ----
<br> int i;
<br> int base;
<br> long int baseO;
<br>+ long int basePosO;
<br> long int numBases;
<br> long int numPoints;
<br> long int dataOffset[4];
<br>***************
<br>*** 121,126 ****
<br>--- 122,129 ----
<br> res4 = (char)(fwo_&BYTE[0]);
<p> ajSeqABIReadSeq(fp,baseO,numBases,&nseq);
<br>+ basePosO = ajSeqABIGetBasePosOffset(fp);
/* find PLOC tag & get offset */
<br>+ ajFileSeek(fp, basePosO, SEEK_SET);
<br> ajSeqABIGetBasePosition(fp,numBases,&basePositions);
<p>On a more general note, most people do not keep ABI files on disk as
they are
<br>simply too large. They typically convert them to SCF instead. (Indeed
some
<br>machines, eg Licor, write SCF as their native format.) We maintain
a freely
<br>available library (io_lib) of routines for reading and writing ABI,
ALF, SCF,
<br>CTF (Jean Thierry-mieg's compressed format) and ZTR (my own compressed
<br>format). All of ABI->* filters are lossy as there's lots of other bits
in the
<br>ABI files which no one quite knows what to do with, however the SCF->CTF
and
<br>SCF->ZTR are lossless (and SCF->ZTR is typically slightly smaller than
bzipped
<br>SCF). Maybe it makes sense not to duplicate work.
<p>io_lib is free although it isn't yet GPLed. That shouldn't be a problem,
but
<br>if it is I cannot see an issue with GPLing io_lib. Indeed it already
looks
<br>like parts of io_lib (or at least "ted" which much of it came from)
are in
<br>emboss; there's a striking similarities in the seqABIGetFlag and
<br>getABIIndexEntryLW functions (eg the same bizarre flow controls, identical
<br>code layout, and some identical variable names).
<p>James
<p>--
<br>James Bonfield (jkb@mrc-lmb.cam.ac.uk) Tel: 01223 402499
Fax: 01223 213556
<br>Medical Research Council - Laboratory of Molecular Biology,
<br>Hills Road, Cambridge, CB2 2QH, England.
<br>Also see Staden Package WWW site at <a href="http://www.mrc-lmb.cam.ac.uk/pubseq/">http://www.mrc-lmb.cam.ac.uk/pubseq/</a></blockquote>
<pre></pre>
</html>