49 const char* name =
"";
60 const uint32 max_read_len = 16*1024*1024;
67 m_read_q.resize( max_read_len, best_quality );
70 while (n_reads + read_mult <= max_reads &&
73 #define NVBIO_TXT_LINE_PARSING
75 #if defined(NVBIO_TXT_LINE_PARSING)
81 char* read_ptr = (
char*)&
m_read_bp[0] + read_off;
90 read_len = strlen( read_ptr ) + read_off;
107 if (read_len &&
m_read_bp[ read_len-1 ] ==
'\n')
114 for (
uint8 c =
get(); c !=
'\n' && c != 0; c =
get())
117 if (c >= 0x21 && c <= 0x7E)
132 const size_t old_size =
m_read_q.size();
134 for (
size_t i = old_size; i < read_len; ++i)
193 n_bps += read_mult * (
uint32)read_len;
194 n_reads += read_mult;
205 const char* read_file_name,
210 m_file =
gzopen(read_file_name,
"r");
260 log_error(stderr,
"error processing TXT file: zlib error %d (%s)\n", err, msg);
271 const char* file_name,
272 const char* compressor,
274 : m_file_name(file_name)
281 template <Alphabet ALPHABET>
288 const uint32 buffer_len = sequence_data.
size() + sequence_data.
bps();
290 std::vector<char> buffer( buffer_len );
292 #pragma omp parallel for
295 const sequence_string
read = sequence_data.
get_read( i );
299 to_string<ALPHABET>( read.begin(), read.size(), &buffer[0] + buffer_offset );
301 buffer[ buffer_offset + read.size() ] =
'\n';
304 if (output_file->
write( buffer_len, &buffer[0] ) == 0)