| 36 | } |
| 37 | |
| 38 | void FastaWriter::WriteSequence(const Sequence& seq, unsigned id, |
| 39 | unsigned multiplicity, const string& comment) |
| 40 | { |
| 41 | assert(m_fileHandle != NULL); |
| 42 | const char *sep = comment.empty() ? "" : " "; |
| 43 | int n = opt::rank < 0 |
| 44 | ? fprintf(m_fileHandle, ">%llu %zu %u%s%s\n%s\n", |
| 45 | (long long unsigned)id, |
| 46 | seq.length(), multiplicity, |
| 47 | sep, comment.c_str(), |
| 48 | seq.c_str()) |
| 49 | : fprintf(m_fileHandle, ">%u:%llu %zu %u%s%s\n%s\n", |
| 50 | opt::rank, |
| 51 | (long long unsigned)id, |
| 52 | seq.length(), multiplicity, |
| 53 | sep, comment.c_str(), |
| 54 | seq.c_str()); |
| 55 | if (n < 0) |
| 56 | die(m_path); |
| 57 | } |
| 58 | |
| 59 | void FastaWriter::WriteSequence(const Sequence& seq, unsigned long long id, const std::string& comment) |
| 60 | { |
no test coverage detected