[Biojava-l] Problem with RichSequence.IOTools.writeFasta method

El Mabrouk M elmh06 at yahoo.ca
Wed Oct 3 18:27:36 UTC 2007


Hi!  
 
I have just started to learn biojava. I have written a small    
program that write a sequence in fasta file with the help of the biojavax method
 
RichSequence.IOTools.writeFasta(seqOut, s1, ns);  
I have got the error "cannot find symbol".
I'm using biojava 1.5, jdk 1.6 and netbeans.
What can be done to fix this problem?

This is what I tried:

import org.biojava.bio.seq.*;
import java.io.*;
import org.biojava.bio.symbol.SymbolList;
import org.biojavax.RichObjectFactory;
import javax.xml.stream.events.Namespace;
import org.biojavax.bio.seq.RichSequence;

public class SeqFastaF {
    public static void main(String[] args) {
        SymbolList dna0 = DNATools.createDNASequence("atgctgaacaacggcatggcaacttacggacggactacgact", "dna_1");
        Sequence s1 = DNATools.createDNASequence(dna0.seqString(), "dna_0");
        try {
            OutputStream seqOut = System.out;
            Namespace ns = (Namespace) RichObjectFactory.getDefaultNamespace();
            RichSequence.IOTools.writeFasta(seqOut,s1,ns); 
        } catch (IOException ex) {
            //io error
            ex.printStackTrace();
        }
    }
}

Error:
cannot find symbol
symbol  : method writeFasta(java.io.OutputStream,org.biojava.bio.seq.Sequence,javax.xml.stream.events.Namespace)
location: class org.biojavax.bio.seq.RichSequence.IOTools


       
---------------------------------
Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail  



More information about the Biojava-l mailing list