Store dictionary/index data on sequence files, such as coming from .fai
or .dict
files.
See DictReader and FaiReader for the input format readers. Furthermore, FastaReader also offers a mode to read a fasta
file, and just retaining the dict/index information. Lastly, see sequence_set_to_dict() for a function to get this information from a given SequenceSet.
Currently, we only store the sequence names and their lengths, in the order as provided in the input file. We might add further information such as offset in the fasta file in the future, once we offer to read with jumps in fasta files.
- See also
- ReferenceGenome
Definition at line 63 of file sequence_dict.hpp.
void add |
( |
Entry && |
entry, |
|
|
bool |
also_look_up_first_word = true |
|
) |
| |
|
inline |
Add an entry to the dictionary.
If also_look_up_first_word
is set (true by default), we add an additional look up name for the added sequence: In addition to its full name, it can also be looked up with just the first word, that is, until the first tab or space character, in case there are any, as this is what typical fasta indexing tools also seem to do. The sequence is still stored with its original name though, and just that additional lookup is added for using find() or get().
Definition at line 171 of file sequence_dict.hpp.
void add |
( |
Entry const & |
entry, |
|
|
bool |
also_look_up_first_word = true |
|
) |
| |
|
inline |
Add an entry to the dictionary.
If also_look_up_first_word
is set (true by default), we add an additional look up name for the added sequence: In addition to its full name, it can also be looked up with just the first word, that is, until the first tab or space character, in case there are any, as this is what typical fasta indexing tools also seem to do. The sequence is still stored with its original name though, and just that additional lookup is added for using find() or get().
Definition at line 156 of file sequence_dict.hpp.
void add |
( |
Sequence const & |
sequence, |
|
|
bool |
also_look_up_first_word = true |
|
) |
| |
|
inline |
Add a Sequence to the dictionary.
If also_look_up_first_word
is set (true by default), we add an additional look up name for the added sequence: In addition to its full name, it can also be looked up with just the first word, that is, until the first tab or space character, in case there are any, as this is what typical fasta indexing tools also seem to do. The sequence is still stored with its original name though, and just that additional lookup is added for using find() or get().
Definition at line 133 of file sequence_dict.hpp.
void add |
( |
std::string const & |
name, |
|
|
size_t |
length, |
|
|
bool |
also_look_up_first_word = true |
|
) |
| |
|
inline |
Add an entry to the dictionary, given its name and length.
If also_look_up_first_word
is set (true by default), we add an additional look up name for the added sequence: In addition to its full name, it can also be looked up with just the first word, that is, until the first tab or space character, in case there are any, as this is what typical fasta indexing tools also seem to do. The sequence is still stored with its original name though, and just that additional lookup is added for using find() or get().
Definition at line 143 of file sequence_dict.hpp.