[Biojava-l] readFastaProtein ?

Josselin Madec jmadec@sinfobio.com
Fri, 30 Nov 2001 12:49:03 +0100


Hello,
I'am a new biojava user.
Someone could help me to use readFastaProtein
because when i use it in the following code i have an error :
org.biojava.bio.BioException: Could not read sequence!
When i looked for the alphabet ProteinTools SymbolList, i saw that a
symbol is an 3c code (ex Alanine : Ala and not A).
Is the error due to the use of the 3c code ?

Best Regards



 public int[][] protCompo(String typeseq, BufferedReader path) throws
Exception
    {
        /*FiniteAlphabet fa = ProteinTools.getAlphabet();
        int nb = fa.size();
        System.out.println("fa = " + fa);
        System.out.println("fa.size() = " + nb);
        SymbolList sl = fa.symbols();
        Iterator it = sl.iterator();

        while (it.hasNext())
        {
            Object c =  it.next();
            System.out.println("-> c : " + c);
        }*/

        if (typeseq.compareTo("protein") == 0)
        {
            SequenceIterator stream = SeqIOTools.readFastaProtein(path);


            while(stream.hasNext())
            {
                Sequence seq = stream.nextSequence(); <- the problem
seems to come from here