Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
a914a57e
Commit
a914a57e
authored
Feb 27, 2016
by
Mathieu Giraud
Browse files
core/fasta.{h,cpp}: Fasta parser, extract OnlineFasta::addLineToCurrentSequence()
parent
403773ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
algo/core/fasta.cpp
View file @
a914a57e
...
...
@@ -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
c
urrent
.
s
equence
+=
line
;
addLineToC
urrent
S
equence
(
line
)
;
break
;
case
FASTX_FASTQ_SEQ
:
// FASTQ separator between sequence and quality
...
...
algo/core/fasta.h
View file @
a914a57e
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment