[Biojava-l] advice on ABIFParser

Ed Dicks emd at sanger.ac.uk
Thu Oct 12 09:44:31 UTC 2006


Hi,

Can anyone give me some advice on using;
org.biojava.bio.program.abi.ABIFParser

I'm working with an ab1 sequence trace file and trying to pull out the
value of a data item defined with a tag - index pair.

my sample code is; (trying to pull out the mobility file name)

  ABIFParser abiParse=new ABIFParser("temp.ab1");
  ABIFParser.DataAccess a1=abiParse.getDataAccess();
  ABIFParser.TaggedDataRecord r1=abiParse.getDataRecord("PDMF",1);
  System.err.println("r1 ok "+r1.toString());

The output looks like...
r1 ok org.biojava.bio.program.abi.ABIFParser$TaggedDataRecord at 80474d4[
  tagName         = PDMF
  tagNumber       = 1
  dataType        = PSTRING
  elementLength   = 1
  numberOfElements= 21
  recordLength    = 21
  dataRecord      = 0x0001265A
  crypticVariable = 0
]
now I've done "strings temp.ab1" to verify the tag "PDMF" is present.
What's going on here is that ABIFParser reads the data item into a long
variable (field dataRecord) but the PSTRING is length 21 which is too big
for a long. I have succesfully pulled out strings that are length <= 8 but
this one just seems too big, can anyone give me some advice on this.

Thanks
Ed

---------------------------------------------------------
   Dr Ed Dicks          Cancer Genome Project (Team 78)
   The Wellcome Trust Sanger Institute
   Hinxton, Cambs. CB10 1SA        Tel: +44 1223 494967
---------------------------------------------------------



More information about the Biojava-l mailing list