abiview bug

Tim Carver tcarver at hgmp.mrc.ac.uk
Wed Feb 14 10:46:29 UTC 2001


Hi James,

     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.

Regards
Tim

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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.open-bio.org/pipermail/emboss-dev/attachments/20010214/d57700b2/attachment-0001.html>


More information about the emboss-dev mailing list