|
bpp-seq3
3.0.0
|
The SequenceFileIndex class for Fasta format. More...
#include <Bpp/Seq/Io/Fasta.h>
Inheritance diagram for bpp::Fasta::FileIndex:
Collaboration diagram for bpp::Fasta::FileIndex:Public Member Functions | |
| FileIndex () | |
| ~FileIndex () | |
| void | build (const std::string &path) |
| Build the index given a path to the file. More... | |
| void | build (const std::string &path, const bool strictSequenceNames) |
| Constructor. More... | |
| std::streampos | getSequencePosition (const std::string &id) const |
| Get the position of a Sequence given its ID. More... | |
| size_t | getNumberOfSequences () const |
| Get the number of sequences. More... | |
| void | read (const std::string &path) |
| Read the index from a file. More... | |
| void | write (const std::string &path) |
| Write the index to a file. More... | |
| void | getSequence (const std::string &seqid, Sequence &seq, const std::string &path) const |
| Get a sequence given its ID. More... | |
| void | getSequence (const std::string &seqid, Sequence &seq, const std::string &path, const bool strictSequenceNames) const |
Private Attributes | |
| std::map< std::string, std::streampos > | index_ |
| std::streampos | fileSize_ |
The SequenceFileIndex class for Fasta format.
|
inlinevirtual |
Build the index given a path to the file.
Implements bpp::SequenceFileIndex.
| void Fasta::FileIndex::build | ( | const std::string & | path, |
| const bool | strictSequenceNames | ||
| ) |
|
inlinevirtual |
Get the number of sequences.
Implements bpp::SequenceFileIndex.
Definition at line 163 of file Fasta.h.
References index_.
| void Fasta::FileIndex::getSequence | ( | const std::string & | seqid, |
| Sequence & | seq, | ||
| const std::string & | path | ||
| ) | const |
| void Fasta::FileIndex::getSequence | ( | const std::string & | seqid, |
| Sequence & | seq, | ||
| const std::string & | path, | ||
| const bool | strictSequenceNames | ||
| ) | const |
Definition at line 275 of file Fasta.cpp.
References bpp::Fasta::nextSequence(), and bpp::Fasta::strictNames().
|
virtual |
Get the position of a Sequence given its ID.
Implements bpp::SequenceFileIndex.
| void Fasta::FileIndex::read | ( | const std::string & | path | ) |
Read the index from a file.
Definition at line 243 of file Fasta.cpp.
References bpp::StringTokenizer::getToken(), bpp::TextTools::isEmpty(), bpp::TextTools::removeSurroundingWhiteSpaces(), and bpp::TextTools::toInt().
| void Fasta::FileIndex::write | ( | const std::string & | path | ) |
Write the index to a file.
Definition at line 260 of file Fasta.cpp.
References bpp::TextTools::toString().
|
private |
Definition at line 182 of file Fasta.h.
Referenced by getNumberOfSequences().