MCPcopy Create free account
hub / github.com/BirolLab/abyss / WriteSequence

Method WriteSequence

DataLayer/FastaWriter.cpp:38–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38void 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
59void FastaWriter::WriteSequence(const Sequence& seq, unsigned long long id, const std::string& comment)
60{

Callers 2

mergeFastaFilesFunction · 0.45
assembleContigFunction · 0.45

Calls 4

dieFunction · 0.85
emptyMethod · 0.45
lengthMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected