If that's a compile-time error, it's probably because you haven't got an
'import' statement for BioException, and/or you're compiling against an
out-of-date version of BioJava (particularly if you're using Eclipse or some
other IDE, check that your source dependencies for BioJava are the same version
as the JAR dependencies).
If that doesn't solve it, could you post the full error stack/console output?
cheers,
Richard
On 16 Dec 2009, at 15:00, Chris Cole wrote:
> 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();
> }
> }
--
Richard Holland, BSc MBCS
Operations and Delivery Director, Eagle Genomics Ltd
T: +44 (0)1223 654481 ext 3 | E: [email protected]
http://www.eaglegenomics.com/
_______________________________________________
Biojava-l mailing list - [email protected]
http://lists.open-bio.org/mailman/listinfo/biojava-l