bpp-seq3
3.0.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< size_t > &pos) const |
Read a SequenceWithQuality from stream and store chromatographic positions. More... | |
virtual bool | nextSequence (std::istream &input, SequenceType &seq) const =0 |
Read sequence from stream. More... | |
The ISequenceStream interface. | |
bool | nextSequence (std::istream &input, Sequence &seq) const |
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< size_t > &pos) const |
Global file parser. More... | |
bool | parseDNA_ (std::istream &input, std::string &sequence, std::vector< int > &qual, std::vector< size_t > &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 44 of file PhredPhd.h.
|
inline |
Build a new PhredPhd object.
Definition at line 50 of file PhredPhd.h.
|
inlinevirtual |
Definition at line 52 of file PhredPhd.h.
|
inlinevirtual |
Implements bpp::IOFormat.
Definition at line 89 of file PhredPhd.h.
|
inlinevirtual |
Implements bpp::IOFormat.
Definition at line 91 of file PhredPhd.h.
|
inlinevirtual |
Implements bpp::IOFormat.
Definition at line 90 of file PhredPhd.h.
bool PhredPhd::nextSequence | ( | std::istream & | input, |
Sequence & | seq | ||
) | const |
Definition at line 18 of file PhredPhd.cpp.
bool PhredPhd::nextSequence | ( | std::istream & | input, |
Sequence & | seq, | ||
std::vector< size_t > & | pos | ||
) | const |
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 stream to read. |
seq | The sequence to fill. |
pos | The vector of positions to fill. |
Exception | IOException and Sequence related exceptions. |
Definition at line 26 of file PhredPhd.cpp.
References parseFile_(), bpp::Sequence::setContent(), bpp::AbstractCoreSequence::setName(), and bpp::SequenceWithQuality::setQualities().
|
pure virtualinherited |
|
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 94 of file PhredPhd.cpp.
References bpp::StringTokenizer::getToken(), bpp::StringTokenizer::hasMoreToken(), bpp::StringTokenizer::numberOfRemainingTokens(), bpp::TextTools::toInt(), and bpp::TextTools::toUpper().
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 56 of file PhredPhd.cpp.
References bpp::StringTokenizer::getToken(), bpp::StringTokenizer::hasMoreToken(), and parseDNA_().
Referenced by nextSequence().