SeqXML BioJava support (Version 0.3 only!)

Installation
    
   Place seqxml-1.0.jar into your class path. Requires BioJava Legacy core.jar 
    (tested with 1.7.1 - 1.8.1). BioJava 3 implementation is coming soon.
    
    
http://biojava.orgshapeimage_2_link_0

Download


    biojava-seqxml-1.0.tar.gz

Usage

   

  Reading with the standard BioJava IOTools:


  1. Class.forName("org.biojavax.bio.seq.io.SeqXMLFormat");

  2. Namespace ns = RichObjectFactory.getDefaultNamespace();

  3. RichSequenceIterator seqs = RichSequence.IOTools.readFile(seqXMLFile,ns);



  Writing individual sequences:


  1. import org.biojavax.bio.seq.io.SeqXMLFormat;


  2. RichSequenceFormat seqXMLWrite = new SeqXMLFormat();

  3. seqXMLWrite.setPrintStream(System.out);

  4. seqXMLWrite.beginWriting();

  5. while(seqs.hasNext())

  6.     seqXMLWrite.writeSequence(seqs.nextRichSequence() ,ns);

  7. seqXMLWrite.finishWriting();



    Stream writing:


  1. import org.biojavax.bio.seq.io.SeqXMLFormat;


  2. RichSequenceFormat seqXMLWrite = new SeqXMLFormat();

  3. RichStreamWriter seqsOut = new RichStreamWriter(System.out, seqXMLWrite);

  4. seqsOut.writeStream(seqs, ns);