Package org.biojava.bio.seq.io.agave
Class AgaveWriter
java.lang.Object
org.biojava.bio.seq.io.agave.AgaveWriter
Writes Sequence into AGAVE XML document. The AGAVE
format is defined in agave.dtd which can be downloaded
from http://www.agavexml.org.
- Author:
- Hanning Ni, Brian King
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
Implements indenting for elements. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
use a two space indentprotected AGAVEAnnotFilter
The AnnotationMap to use for getting AGAVE XML attributes from a Sequence Annotation.protected org.biojava.bio.seq.io.agave.PCDATAFilterWriter
writes PCDATA replacing XML characters with escape entitiesprotected AgaveWriter.Indent
indentprotected PrintWriter
Write to XML documentprotected boolean
write DOCTYPE if true -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor uses generic annotation to attribute mapping.AgaveWriter
(AGAVEAnnotFilter filter) Construct with data source specific annotation to attribute mapping. -
Method Summary
Modifier and TypeMethodDescriptionvoid
setWriteDocType
(boolean writeDocType) Set flag that determines if XML DOCTYPE is written or not.protected void
Writing Sequence.protected void
protected void
writeAssembly
(Annotatable seq) protected void
protected void
protected void
protected void
writeContig
(Annotatable seq) protected void
Write </sciobj>protected void
protected void
Write <sciobj>protected void
Write SeqFeature XMLvoid
writeSequence
(Sequence seq, PrintStream os) Write sequence into AGAVE XML format.protected void
group sequence_map by getSource()protected void
Write SequenceMap XMLprotected void
-
Field Details
-
INDENT
use a two space indent- See Also:
-
mOut
Write to XML document -
mIndent
indent -
mFilter
writes PCDATA replacing XML characters with escape entities -
mAnnotFilter
The AnnotationMap to use for getting AGAVE XML attributes from a Sequence Annotation. -
mWriteDocType
write DOCTYPE if true
-
-
Constructor Details
-
AgaveWriter
public AgaveWriter()Default constructor uses generic annotation to attribute mapping. -
AgaveWriter
Construct with data source specific annotation to attribute mapping.
-
-
Method Details
-
setWriteDocType
Set flag that determines if XML DOCTYPE is written or not. Default is true. -
writeSequence
Write sequence into AGAVE XML format.- Parameters:
seq
- maybe the or simple sequenceif annotation of seq has chromosome information , generate
tag if seq is SimpleAssembly, generate tag otherwise, generate tag currently each top-level sequence is wrapped into seperated sciobj xml file - Throws:
IOException
-
writeHeader
Write <sciobj> -
write
Writing Sequence.- Parameters:
seq
- is simple sequence or simple assembly- Throws:
IOException
-
writeContig
- Throws:
IOException
-
writeAssembly
- Throws:
IOException
-
writeBioSequence
- Throws:
IOException
-
writeSequenceMap
group sequence_map by getSource()- Throws:
IOException
-
writeClassification
- Throws:
IOException
-
writeSequenceMap2
Write SequenceMap XML- Throws:
IOException
-
writeAnnotations
- Throws:
IOException
-
writeGene
- Throws:
IOException
-
writeTranscript
- Throws:
IOException
-
writeSeqFeature
Write SeqFeature XML- Throws:
IOException
-
writeCompResult
- Throws:
IOException
-