public class ReferenceSequenceAnnotationParser extends SplitSequenceAnnotationParser
SequenceAnnotationParser that parses a ReferenceSequenceAnnotation from the comment lines of a sequence.annot, annotationDelimiter, keyValueDelimiter| Constructor and Description |
|---|
ReferenceSequenceAnnotationParser(String key,
AlphabetContainer alphabet,
String keyValueDelimiter,
String annotationDelimiter)
Creates a new
ReferenceSequenceAnnotationParser with user-specified delimiters. |
ReferenceSequenceAnnotationParser(String key,
AlphabetContainer alphabet,
String keyValueDelimiter,
String annotationDelimiter,
String delim)
Creates a new
ReferenceSequenceAnnotationParser with user-specified delimiters. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
add(String type,
String identifier)
This method actually adds a
SequenceAnnotation to the internal list. |
String |
parseAnnotationToComment(char commentChar,
SequenceAnnotation... annotations)
This method returns a
String representation of the given
SequenceAnnotations that can be used as comment line in a file. |
addToAnnotation, clearAnnotation, getCurrentAnnotationpublic ReferenceSequenceAnnotationParser(String key, AlphabetContainer alphabet, String keyValueDelimiter, String annotationDelimiter, String delim) throws IllegalArgumentException
ReferenceSequenceAnnotationParser with user-specified delimiters.key - the key for the ReferenceSequenceAnnotationalphabet - the AlphabetContainer of the reference sequencekeyValueDelimiter - the delimiter between key and corresponding valueannotationDelimiter - the delimiter between different SequenceAnnotationsdelim - the delimiter between symbols a the reference sequenceIllegalArgumentException - if the delimiters are identicalpublic ReferenceSequenceAnnotationParser(String key, AlphabetContainer alphabet, String keyValueDelimiter, String annotationDelimiter) throws IllegalArgumentException
ReferenceSequenceAnnotationParser with user-specified delimiters.key - the key for the ReferenceSequenceAnnotationalphabet - the AlphabetContainer of the reference sequencekeyValueDelimiter - the delimiter between key and corresponding valueannotationDelimiter - the delimiter between different SequenceAnnotationsIllegalArgumentException - if the delimiters are identicalprotected void add(String type, String identifier)
SplitSequenceAnnotationParserSequenceAnnotation to the internal list.add in class SplitSequenceAnnotationParsertype - the type of the SequenceAnnotationidentifier - the identifier of the SequenceAnnotationpublic String parseAnnotationToComment(char commentChar, SequenceAnnotation... annotations)
SequenceAnnotationParserString representation of the given
SequenceAnnotations that can be used as comment line in a file.
SequenceAnnotationParser.addToAnnotation(String).parseAnnotationToComment in interface SequenceAnnotationParserparseAnnotationToComment in class SplitSequenceAnnotationParsercommentChar - the char at the beginning of comment linesannotations - the SequenceAnnotations to be parsedSequenceAnnotationsDataSet.save(java.io.OutputStream, char, SequenceAnnotationParser)