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 classImplements indenting for elements. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringuse a two space indentprotected AGAVEAnnotFilterThe AnnotationMap to use for getting AGAVE XML attributes from a Sequence Annotation.protected org.biojava.bio.seq.io.agave.PCDATAFilterWriterwrites PCDATA replacing XML characters with escape entitiesprotected AgaveWriter.Indentindentprotected PrintWriterWrite to XML documentprotected booleanwrite 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 TypeMethodDescriptionvoidsetWriteDocType(boolean writeDocType) Set flag that determines if XML DOCTYPE is written or not.protected voidWriting Sequence.protected voidprotected voidwriteAssembly(Annotatable seq) protected voidprotected voidprotected voidprotected voidwriteContig(Annotatable seq) protected voidWrite </sciobj>protected voidprotected voidWrite <sciobj>protected voidWrite SeqFeature XMLvoidwriteSequence(Sequence seq, PrintStream os) Write sequence into AGAVE XML format.protected voidgroup sequence_map by getSource()protected voidWrite 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
-