OrthoXML & SeqXML
OrthoXML & SeqXML
SeqXML BioJava support (Version 0.3 only!)
Usage
Reading with the standard BioJava IOTools:
Class.forName("org.biojavax.bio.seq.io.SeqXMLFormat");
Namespace ns = RichObjectFactory.getDefaultNamespace();
RichSequenceIterator seqs = RichSequence.IOTools.readFile(seqXMLFile,ns);
Writing individual sequences:
import org.biojavax.bio.seq.io.SeqXMLFormat;
RichSequenceFormat seqXMLWrite = new SeqXMLFormat();
seqXMLWrite.setPrintStream(System.out);
seqXMLWrite.beginWriting();
while(seqs.hasNext())
seqXMLWrite.writeSequence(seqs.nextRichSequence() ,ns);
seqXMLWrite.finishWriting();
Stream writing:
import org.biojavax.bio.seq.io.SeqXMLFormat;
RichSequenceFormat seqXMLWrite = new SeqXMLFormat();
RichStreamWriter seqsOut = new RichStreamWriter(System.out, seqXMLWrite);
seqsOut.writeStream(seqs, ns);