public class AgaveWriter extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
AgaveWriter.Indent
Implements indenting for elements.
|
Modifier and Type | Field and Description |
---|---|
static String |
INDENT
use a two space indent
|
protected AGAVEAnnotFilter |
mAnnotFilter
The AnnotationMap to use for getting
AGAVE XML attributes from a Sequence Annotation.
|
protected org.biojava.bio.seq.io.agave.PCDATAFilterWriter |
mFilter
writes PCDATA replacing XML characters with escape entities
|
protected AgaveWriter.Indent |
mIndent
indent
|
protected PrintWriter |
mOut
Write to XML document
|
protected boolean |
mWriteDocType
write DOCTYPE if true
|
Constructor and Description |
---|
AgaveWriter()
Default constructor uses generic annotation to attribute mapping.
|
AgaveWriter(AGAVEAnnotFilter filter)
Construct with data source specific annotation to attribute
mapping.
|
Modifier and Type | Method and Description |
---|---|
void |
setWriteDocType(boolean writeDocType)
Set flag that determines if XML DOCTYPE is written
or not.
|
protected void |
write(Sequence seq)
Writing Sequence.
|
protected void |
writeAnnotations(FeatureHolder f) |
protected void |
writeAssembly(Annotatable seq) |
protected void |
writeBioSequence(Annotatable seq) |
protected void |
writeClassification(Annotatable seq) |
protected void |
writeCompResult(Annotatable f) |
protected void |
writeContig(Annotatable seq) |
protected void |
writeFooter()
Write </sciobj>
|
protected void |
writeGene(Annotatable f) |
protected void |
writeHeader()
Write <sciobj>
|
protected void |
writeSeqFeature(Annotatable f)
Write SeqFeature XML
|
void |
writeSequence(Sequence seq,
PrintStream os)
Write sequence into AGAVE XML format.
|
protected void |
writeSequenceMap(Annotatable seq)
group sequence_map by getSource()
|
protected void |
writeSequenceMap2(Annotatable f)
Write SequenceMap XML
|
protected void |
writeTranscript(Annotatable f) |
public static final String INDENT
protected PrintWriter mOut
protected AgaveWriter.Indent mIndent
protected org.biojava.bio.seq.io.agave.PCDATAFilterWriter mFilter
protected AGAVEAnnotFilter mAnnotFilter
protected boolean mWriteDocType
public AgaveWriter()
public AgaveWriter(AGAVEAnnotFilter filter)
public void setWriteDocType(boolean writeDocType)
public void writeSequence(Sequence seq, PrintStream os) throws IOException
seq
- maybe the or simple sequence
if annotation of seq has chromosome information , generatetag if seq is SimpleAssembly, generate tag otherwise, generate tag currently each top-level sequence is wrapped into seperated sciobj xml file
IOException
protected void writeHeader()
protected void writeFooter()
protected void write(Sequence seq) throws IOException
seq
- is simple sequence or simple assemblyIOException
protected void writeContig(Annotatable seq) throws IOException
IOException
protected void writeAssembly(Annotatable seq) throws IOException
IOException
protected void writeBioSequence(Annotatable seq) throws IOException
IOException
protected void writeSequenceMap(Annotatable seq) throws IOException
IOException
protected void writeClassification(Annotatable seq) throws IOException
IOException
protected void writeSequenceMap2(Annotatable f) throws IOException
IOException
protected void writeAnnotations(FeatureHolder f) throws IOException
IOException
protected void writeGene(Annotatable f) throws IOException
IOException
protected void writeTranscript(Annotatable f) throws IOException
IOException
protected void writeSeqFeature(Annotatable f) throws IOException
IOException
protected void writeCompResult(Annotatable f) throws IOException
IOException
Copyright © 2014 BioJava. All rights reserved.