|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Converts the description line of a fasta entry into useful information.
Fasta files can have rich information shoe-horned into the description. This is unpredictable, and it would be fruitless to write a single routine for decoding all description formats. This interface lets you pop in your own parser, as apropriate.
Method Summary | |
void |
parseAnnotation(java.lang.String desc,
Annotation annotation)
Add any annotation to this annotation bundle that can be extracted from the description. |
java.lang.String[] |
parseURNName(java.lang.String desc)
Parse out the name and urn from the description line. |
java.lang.String |
writeDescription(Sequence seq)
Write the description for a sequence. |
Method Detail |
public java.lang.String[] parseURNName(java.lang.String desc)
Most description lines contain some sort of unique id for the sequence. This routine should extract that information, and construct a sequence name and urn from it.
desc
- the description text from the first non-white space character
after > in the file untill the end of that linepublic void parseAnnotation(java.lang.String desc, Annotation annotation)
desc
- the description text from the first non-white space character
after > in the file untill the end of that lineannotation
- the Annotation bundle to modifypublic java.lang.String writeDescription(Sequence seq)
This should generate a suitable description line, not including the leading > and spaces, or the trailing newline, and return it as a string.
seq
- the Sequence to generate a description for
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |