public class MotifAnnotationParser extends SplitSequenceAnnotationParser
MotifAnnotation
s.annot, annotationDelimiter, keyValueDelimiter
Constructor and Description |
---|
MotifAnnotationParser()
Creates a new
MotifAnnotationParser with default delimiters. |
MotifAnnotationParser(String keyValueDelimiter,
String annotationDelimiter)
Creates a new
MotifAnnotationParser with the supplied delimiters |
Modifier and Type | Method and Description |
---|---|
protected void |
add(String identifier,
int position,
int length,
StrandedLocatedSequenceAnnotationWithLength.Strand strandedness)
Adds the motif with identifier
identifier at position position
with length length and StrandedLocatedSequenceAnnotationWithLength.Strand strandedness |
void |
addToAnnotation(String unparsed)
|
String |
parseAnnotationToComment(char commentChar,
SequenceAnnotation... annotations)
This method returns a
String representation of the given
SequenceAnnotation s that can be used as comment line in a file. |
add, clearAnnotation, getCurrentAnnotation
public MotifAnnotationParser()
MotifAnnotationParser
with default delimiters.public MotifAnnotationParser(String keyValueDelimiter, String annotationDelimiter)
MotifAnnotationParser
with the supplied delimiterskeyValueDelimiter
- the delimiter between key and valueannotationDelimiter
- the delimiter between different annotationspublic void addToAnnotation(String unparsed)
SequenceAnnotationParser
addToAnnotation
in interface SequenceAnnotationParser
addToAnnotation
in class SplitSequenceAnnotationParser
unparsed
- the String containing the annotationprotected void add(String identifier, int position, int length, StrandedLocatedSequenceAnnotationWithLength.Strand strandedness)
identifier
at position position
with length length
and StrandedLocatedSequenceAnnotationWithLength.Strand
strandedness
identifier
- the identifier of the motifposition
- the position of the motiflength
- the length of the motifstrandedness
- the strand of the motifpublic String parseAnnotationToComment(char commentChar, SequenceAnnotation... annotations)
SequenceAnnotationParser
String
representation of the given
SequenceAnnotation
s that can be used as comment line in a file.
SequenceAnnotationParser.addToAnnotation(String)
.parseAnnotationToComment
in interface SequenceAnnotationParser
parseAnnotationToComment
in class SplitSequenceAnnotationParser
commentChar
- the char at the beginning of comment linesannotations
- the SequenceAnnotation
s to be parsedSequenceAnnotation
sDataSet.save(java.io.OutputStream, char, SequenceAnnotationParser)