|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.bio.program.phred.PhredFormat
Format object representing Phred Quality files. The only `sequence property' reported by this parser is PROPERTY_DESCRIPTIONLINE, which is the contents of the sequence's description line (the line starting with a '>' character). Essentially a rework of FastaFormat to cope with the quirks of Phred Quality data.
Copyright (c) 2001
Company: AgResearch
Field Summary | |
static java.lang.String |
DEFAULT
|
static java.lang.String |
PROPERTY_DESCRIPTIONLINE
Constant string which is the property key used to notify listeners of the description lines of Phred sequences. |
Constructor Summary | |
PhredFormat()
|
Method Summary | |
protected java.lang.String |
describeSequence(Sequence seq)
Return a suitable description line for a Sequence. |
java.lang.String |
getDefaultFormat()
Deprecated. |
int |
getLineWidth()
Retrive the current line width. |
boolean |
readSequence(java.io.BufferedReader reader,
SymbolTokenization symParser,
SeqIOListener siol)
Read a sequence and pass data on to a SeqIOListener. |
void |
setLineWidth(int width)
Set the line width. |
void |
writeSequence(Sequence seq,
java.io.PrintStream os)
This method will print symbols to the line width followed by a new line etc. |
void |
writeSequence(Sequence seq,
java.lang.String format,
java.io.PrintStream os)
Deprecated. use writeSequence(Sequence seq, PrintStream os) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DEFAULT
public static final java.lang.String PROPERTY_DESCRIPTIONLINE
Constructor Detail |
public PhredFormat()
Method Detail |
public int getLineWidth()
public void setLineWidth(int width)
When writing, the lines of sequence will never be longer than the line width.
width
- the new line widthpublic boolean readSequence(java.io.BufferedReader reader, SymbolTokenization symParser, SeqIOListener siol) throws IllegalSymbolException, java.io.IOException, ParseException
SequenceFormat
readSequence
in interface SequenceFormat
reader
- The stream of data to parse.symParser
- A SymbolParser defining a mapping from
character data to Symbols.siol
- A listener to notify when data is extracted
from the stream.
IllegalSymbolException
- if it is not possible to
translate character data from the stream into valid BioJava
symbols.
java.io.IOException
- if an error occurs while reading from the
stream.
ParseException
protected java.lang.String describeSequence(Sequence seq)
public void writeSequence(Sequence seq, java.io.PrintStream os) throws java.io.IOException
writeSequence
in interface SequenceFormat
seq
- the sequence to write out.os
- the printstream to write to.
java.io.IOException
public void writeSequence(Sequence seq, java.lang.String format, java.io.PrintStream os) throws java.io.IOException
writeSequence
writes a sequence to the specified
PrintStream
, using the specified format.
writeSequence
in interface SequenceFormat
seq
- a Sequence
to write out.format
- a String
indicating which sub-format
of those available from a particular
SequenceFormat
implemention to use when
writing.os
- a PrintStream
object.
java.io.IOException
- if an error occurs.public java.lang.String getDefaultFormat()
getDefaultFormat
returns the String identifier for
the default format.
getDefaultFormat
in interface SequenceFormat
String
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |