[Biojava-l] regarding errors

indu pandey er.indupandey at gmail.com
Wed Apr 28 16:22:10 UTC 2010


hi

When i m trying to run this code

package javaapplication10;
import org.biojava.bio.symbol.*;
import org.biojava.bio.seq.*;

public class TranscribeDNAtoRNA {
   public static void main(String[] args) {
      try {
       //make a DNA SymbolList
       SymbolList symL = DNATools.createDNA("ATGTAAGGCCAGTGT");
       //transcribe it to RNA (after BioJava 1.4 this method is deprecated)
       symL = RNATools.transcribe(symL);
       //(after BioJava 1.4 use this method instead)
       symL = DNATools.toRNA(symL);
       //just to prove it worked
       System.out.println(symL.seqString());
      }
      catch (IllegalSymbolException ex) {
        //this will happen if you try and make the DNA seq using non IUB
symbols
         ex.printStackTrace();
      }catch (IllegalAlphabetException ex) {
       //this will happen if you try and transcribe a non DNA SymbolList
         ex.printStackTrace();
      }
   }
}


i get following errors:.

*org.biojava.bio.symbol.IllegalAlphabetException: The source alphabet and
translation table source alphabets don't match: RNA and DNA
        at
org.biojava.bio.symbol.TranslatedSymbolList.<init>(TranslatedSymbolList.java:75)
        at
org.biojava.bio.symbol.SymbolListViews.translate(SymbolListViews.java:125)
        at org.biojava.bio.seq.DNATools.toRNA(DNATools.java:490)
        at
javaapplication10.TranscribeDNAtoRNA.main(TranscribeDNAtoRNA.java:23)
*



More information about the Biojava-l mailing list