Because the git Issue tracker does not support compressed files, I have attached relevant FASTA file in the SGA google user group. I wrongly posted an old version of code in the user group, thus a corrected code is posted in here again.
bool SeqReader::get(SeqRecord& sr) {
...
// corrected by Eun-Cheon Lim
while(m_pHandle->good() && m_pHandle->peek() != '>' && m_pHandle->peek() != '@') {
getline(*m_pHandle, temp);
if(m_pHandle->good() && temp.size() > 0) {
seq.append(temp);
temp = "";
}
}
// to ensure the last sequence containing the EOF character being processed
if(temp.size() > 0) {
seq.append(temp);
temp = "";
}
...
}
Because the git Issue tracker does not support compressed files, I have attached relevant FASTA file in the SGA google user group. I wrongly posted an old version of code in the user group, thus a corrected code is posted in here again.
bool SeqReader::get(SeqRecord& sr) { ... // corrected by Eun-Cheon Lim while(m_pHandle->good() && m_pHandle->peek() != '>' && m_pHandle->peek() != '@') { getline(*m_pHandle, temp); if(m_pHandle->good() && temp.size() > 0) { seq.append(temp); temp = ""; } } // to ensure the last sequence containing the EOF character being processed if(temp.size() > 0) { seq.append(temp); temp = ""; } ... }