Commit a914a57e authored by Mathieu Giraud's avatar Mathieu Giraud

core/fasta.{h,cpp}: Fasta parser, extract OnlineFasta::addLineToCurrentSequence()

parent 403773ad
......@@ -211,6 +211,10 @@ void OnlineFasta::skipToNthSequence() {
return ;
}
void OnlineFasta::addLineToCurrentSequence(string line)
{
current.sequence += line;
}
void OnlineFasta::next() {
fasta_state state = FASTX_UNINIT;
......@@ -247,7 +251,7 @@ void OnlineFasta::next() {
switch(state) {
case FASTX_FASTA: case FASTX_FASTQ_ID:
// Sequence
current.sequence += line;
addLineToCurrentSequence(line);
break;
case FASTX_FASTQ_SEQ:
// FASTQ separator between sequence and quality
......
......@@ -101,6 +101,8 @@ class OnlineFasta {
size_t line_nb;
unsigned long long char_nb;
void addLineToCurrentSequence(string line);
int nb_sequences_parsed;
int nb_sequences_returned;
int nb_sequences_max;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment