[Biojava-l] Embl parser problem

Jolyon Holdstock jolyon.holdstock at ogt.co.uk
Tue Jan 3 09:21:46 EST 2006


Hi,

 

I have an application using BioJava1.4pre1.4 that loads an embl or
genbank file.

 

If I load an embl file via the genbank option a BioException error is
thrown.

 

But if I load a genbank file via the embl option no BioException is
thrown and the sequence is created although it is not correct e.g.
sequence.length() returns 0

 

An example of code using the sequence file from the BioJava demos

 

String fileName =
"C:/Downloads/Java/BioJava/BioJava-1.4pre1/biojava-1.4pre1/demos/seq/AL1
21903.genbank";    

try {

  seq = SeqIOTools.readEmbl(new BufferedReader(new
FileReader(fileName))).nextSequence();

  System.out.println("URN: " + seq.getURN());

  System.out.println("Length: " + seq.length());

}

catch (BioException BIOE) {

  System.out.println("BioException " + BIOE);

}

 

The output is:

URN: sequence/embl:SION

Length: 0

 

If I use the matching embl sequence from the demos the output is:

URN: sequence/embl:AL121903

Length: 80600

 

I've used BioJava1.4 with the same outcome. Should I be parsing the file
an alternative way?

 

Thanks,

 

Jolyon

 




More information about the Biojava-l mailing list