On 16/12/09 11:22, Richard Holland wrote:
BufferedReader br = new BufferedReader(new FileReader(args[0]));
Namespace ns = RichObjectFactory.getDefaultNamespace();
RichSequenceIterator iterator = RichSequence.IOTools.readFastaProtein(br,ns);
Thanks, Richard. However, now I get an error:
"BioException cannot be resolved to a type"
Below is the code for the method. What am I missing?
public void read(String filename) {
try {
System.out.println("Reading file: " + filename);
BufferedReader br = new BufferedReader(new FileReader(filename));
Namespace ns = RichObjectFactory.getDefaultNamespace();
RichSequenceIterator iter =
RichSequence.IOTools.readFastaProtein(br,ns);
}
catch (FileNotFoundException ex) {
//can't find file specified by args[0]
ex.printStackTrace();
} catch (BioException ex) {
//error parsing requested format
ex.printStackTrace();
}
}
_______________________________________________
Biojava-l mailing list - [email protected]
http://lists.open-bio.org/mailman/listinfo/biojava-l