Package htsjdk.tribble.gff
Class Gff3Writer
java.lang.Object
htsjdk.tribble.gff.Gff3Writer
- All Implemented Interfaces:
Closeable,AutoCloseable
A class to write out gff3 files. Features are added using
addFeature(Gff3Feature), directives using addDirective(Gff3Codec.Gff3Directive),
and comments using addComment(String). Note that the version 3 directive is automatically added at creation, so should not be added separately.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddComment(String comment) Add comment linevoidaddDirective(Gff3Codec.Gff3Directive directive) Add a directivevoidaddDirective(Gff3Codec.Gff3Directive directive, Object object) Add a directive with an objectvoidaddFeature(Gff3Feature feature) add a featurevoidclose()protected Stringescape a String.
-
Constructor Details
-
Gff3Writer
- Throws:
IOException
-
Gff3Writer
-
-
Method Details
-
addFeature
add a feature- Parameters:
feature- the feature to be added- Throws:
IOException
-
escapeString
escape a String. Default behavior is to callencodeString(String)- Parameters:
s- the string to be escaped- Returns:
- the escaped string
-
addDirective
Add a directive with an object- Parameters:
directive- the directive to be addedobject- the object to be encoded with the directive- Throws:
IOException
-
addDirective
Add a directive- Parameters:
directive- the directive to be added- Throws:
IOException
-
addComment
Add comment line- Parameters:
comment- the comment line (not including leading #)- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-