[Biojava-l] How to read a protein clustal alignment?

Damian D'Onia dd3a@dc.uba.ar
Mon, 01 Oct 2001 12:15:37 -0300


Hi,

         I'm trying to read a clustal file (.ALN) that contains protein 
sequences. Now I have a subclass of DefaultHandler which can read DNA 
sequences from .aln files, but I don't know how to fill a SymbolList from 
String.

         This is the code for endElement method I current use to read DNA:

     public void endElement(String poURI, String poLocalName, String poQName) {

                 //Deal with the PC Data - trim leading and trailing whitespace

                 String oFinalBuffer = oPCDataBuffer.toString().trim();
                 //System.out.println(oFinalBuffer);

                 //Clear PC Data Buffer as soon as dealt with
                 oPCDataBuffer.setLength(0);

                 if (oNameStack.pop().equals("HitId")) {
                         try {
                                 oSeqDB.addSequence(new 
SimpleSequence(DNATools.createDNA(oFinalBuffer),oCurrentSeqName,oCurrentSeqName,null));
                         }
                         catch (Exception e) {
                                 System.out.println("Invalid sequence: " + 
oFinalBuffer);
                         }
                 }
     }


But, ProteinTools don't have a method like createDNA.

Somebody can help me with this?


Thanks in advance.

Damián. //

PS: Excuse me "terrible" english.


-----
Damian D'Onia (dd3a@dc.uba.ar)
Facultad de Ciencias Exactas y Naturales, UBA