bpp-seq
2.2.0
|
The phd sequence file format from phred software. More...
#include <Bpp/Seq/Io/PhredPhd.h>
Public Member Functions | |
PhredPhd () | |
Build a new PhredPhd object. More... | |
virtual | ~PhredPhd () |
bool | nextSequence (std::istream &input, Sequence &seq, std::vector< int > &pos) const throw (Exception) |
Read a SequenceWithQuality from stream and store chromatographic positions. More... | |
The ISequenceStream interface. | |
bool | nextSequence (std::istream &input, Sequence &seq) const throw (Exception) |
Read sequence from stream. More... | |
The IOFormat interface. | |
const std::string | getDataType () const |
const std::string | getFormatName () const |
const std::string | getFormatDescription () const |
Private Member Functions | |
bool | parseFile_ (std::istream &input, std::string &name, std::string &sequence, std::vector< int > &qual, std::vector< int > &pos) const |
Global file parser. More... | |
bool | parseDNA_ (std::istream &input, std::string &sequence, std::vector< int > &qual, std::vector< int > &pos) const |
Parse the DNA part of the file. More... | |
The phd sequence file format from phred software.
This class read DNA SequenceWithQuality from phd files produced by the phred program from the University of Washington.
Definition at line 78 of file PhredPhd.h.
|
inline |
Build a new PhredPhd object.
Definition at line 84 of file PhredPhd.h.
|
inlinevirtual |
Definition at line 86 of file PhredPhd.h.
|
inline |
Definition at line 123 of file PhredPhd.h.
|
inline |
Definition at line 125 of file PhredPhd.h.
|
inline |
Definition at line 124 of file PhredPhd.h.
|
virtual |
Read sequence from stream.
Read one sequence from a stream.
input | The stream to read. |
seq | The sequence to fill. |
Exception | IOExecption and Sequence related Exceptions. |
Implements bpp::ISequenceStream.
Definition at line 52 of file PhredPhd.cpp.
bool PhredPhd::nextSequence | ( | std::istream & | input, |
Sequence & | seq, | ||
std::vector< int > & | pos | ||
) | const | ||
throw | ( | Exception | |
) |
Read a SequenceWithQuality from stream and store chromatographic positions.
A more complete parser that read a SequenceWithQuality and store the position of each base call on the chromatogram in a vector of int.
input | The stram to read. |
seq | The sequence to fill. |
pos | The vector of positions to fill. |
Exception | IOException and Sequence related exceptions. |
Definition at line 59 of file PhredPhd.cpp.
References bpp::SequenceWithQuality::setQualities().
|
private |
Parse the DNA part of the file.
Read the DNA part until ‘END_DNA’ or EOF.
input | The stream to read |
sequence | The string to store the sequence |
qual | The vector to store qualities |
pos | The vector to store positions |
Definition at line 115 of file PhredPhd.cpp.
Referenced by parseFile_().
|
private |
Global file parser.
input | The stream to read |
name | The string to store the sequence name |
sequence | The string to store the sequence |
qual | The vector to store qualities |
pos | The vector to store positions |
Definition at line 84 of file PhredPhd.cpp.
References parseDNA_().