public class MotifAnnotationParser extends SplitSequenceAnnotationParser
MotifAnnotations.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
SequenceAnnotations that can be used as comment line in a file. |
add, clearAnnotation, getCurrentAnnotationpublic 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)
SequenceAnnotationParseraddToAnnotation in interface SequenceAnnotationParseraddToAnnotation in class SplitSequenceAnnotationParserunparsed - 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 strandednessidentifier - 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)
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)