MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / writeNext

Method writeNext

src/openms/source/FORMAT/FASTAFile.cpp:234–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232 }
233
234 void FASTAFile::writeNext(const FASTAEntry &protein)
235 {
236 outfile_ << ">" << protein.identifier << " " << protein.description << "\n";
237 const String &tmp(protein.sequence);
238
239 int chunks(tmp.size() / 80); // number of complete chunks
240 Size chunk_pos(0);
241 while (--chunks >= 0)
242 {
243 outfile_.write(&tmp[chunk_pos], 80);
244 outfile_ << "\n";
245 chunk_pos += 80;
246 }
247
248 if (tmp.size() > chunk_pos)
249 {
250 outfile_.write(&tmp[chunk_pos], tmp.size() - chunk_pos);
251 outfile_ << "\n";
252 }
253 }
254
255 void FASTAFile::writeEnd()
256 {

Callers 4

main_Method · 0.80
main_Method · 0.80
main_Method · 0.80
storeMethod · 0.80

Calls 2

sizeMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected