Skip to content

Commit 846f24d

Browse files
committed
Blank lines are now allowed in fasta files
thanks to @AntonBankevich AntonBankevich/LJA@b814d42
1 parent 5185154 commit 846f24d

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

veritymap/src/tools/sequences/seqio.hpp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,21 +93,15 @@ class SeqReader {
9393
while (stream != nullptr) {
9494
std::string id, seq;
9595
std::getline(*stream, id);
96-
std::getline(*stream, seq);
97-
trim(seq);
98-
if (!id.empty() and !seq.empty()) {
96+
if (!id.empty()) {
9997
std::stringstream ss;
100-
ss << seq;
101-
size_t cnt = 0;
10298
while (stream->peek() != EOF && stream->peek() != '>' && stream->peek() != '+') {
10399
std::getline(*stream, seq);
104100
trim(seq);
105-
if (seq.empty())
106-
break;
107-
ss << seq;
108-
cnt += 1;
101+
if (!seq.empty())
102+
ss << seq;
109103
}
110-
next = {ss.str(), std::move(trim(id.substr(1, id.find(" "))))};
104+
next = {ss.str(), std::move(trim(id.substr(1, id.size() - 1)))};
111105
choose_next_pos(0);
112106
cur_start = 0;
113107
if (fastq) {

0 commit comments

Comments
 (0)