[Biojava-l] Reading Fasta file problem (new to biojava)
Chris Cole
chris at compbio.dundee.ac.uk
Wed Dec 16 09:10:23 UTC 2009
[ repost as the first attempt never got through ]
Hi,
I'm new to biojava and relatively new to Java, but not new to progamming
in general (perl and C).
As a quick exercise I wanted to be able to read in a Fasta file, but
this code here (Solution 2):
http://biojava.org/wiki/BioJava:Cookbook:SeqIO:ReadFasta
Has deprecated warnings for SeqIOTools and fileToBioJava(). The code
currently works, but what's the non-deprecated way of going about it?
I can see from Javadoc that RichSequence.IOTools from
org.biojavax.bio.seq is now the recommended class, but how does one
implement it?
I've tried this, but readFastaProtein() requires a namespace, which I've
no idea what that means.
BufferedReader br = new BufferedReader(new FileReader(args[0]));
RichSequenceIterator iter =
(RichSequenceIterator)RichSequence.IOTools.readFastaProtein(br);
All pointers appreciated.
Cheers,
Chris
More information about the Biojava-l
mailing list