[Biojava-l] readFastaProtein ?

Matthew Pocock mrp@sanger.ac.uk
Fri, 30 Nov 2001 12:36:25 +0000


Hi Josselin,

Could you send in an example protein file and example java program that 
this fails on and the complete stack-trace you get? Also, the version of 
BioJava and Java that you are running would help. Then we can probably 
track down the problem quite quickly.

Matthew

Josselin Madec wrote:

> 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
> 
> 
> _______________________________________________
> Biojava-l mailing list  -  Biojava-l@biojava.org
> http://biojava.org/mailman/listinfo/biojava-l
> .
> 
>