[Biojava-l] Embl parser problem
mark.schreiber at novartis.com
mark.schreiber at novartis.com
Tue Jan 3 20:09:49 EST 2006
Hi -
A BioException would be expected when parsing an embl file via the genbank
option. I is surprising you don't get one when parsing a genbank file via
the embl option although it clearly has not worked properly.
You should only ever parse a file with the appropriate read method.
Please note that if you have access to CVS you could download the
development version of the new parsers (biojavax) which do a much better
job.
- Mark
"Jolyon Holdstock" <jolyon.holdstock at ogt.co.uk>
Sent by: biojava-l-bounces at portal.open-bio.org
01/03/2006 10:21 PM
To: <biojava-l at biojava.org>
cc: (bcc: Mark Schreiber/GP/Novartis)
Subject: [Biojava-l] Embl parser problem
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
_______________________________________________
Biojava-l mailing list - Biojava-l at biojava.org
http://biojava.org/mailman/listinfo/biojava-l
More information about the Biojava-l
mailing list