Skip to content
Snippets Groups Projects
Commit 5e684d39 authored by Thomas Krannich's avatar Thomas Krannich
Browse files

update PG IDs fields

parent 84f646a1
Branches
1 merge request!8Fix duplication of PG IDs when merging SAM headers
...@@ -103,10 +103,12 @@ inline void readRecordAndCorrectRIds(BamAlignmentRecord & record, BamFileIn & st ...@@ -103,10 +103,12 @@ inline void readRecordAndCorrectRIds(BamAlignmentRecord & record, BamFileIn & st
inline CharString iterSuffix(const CharString &PG_ID, const std::unordered_set<char*> &ids, const unsigned i){ inline CharString iterSuffix(const CharString &PG_ID, const std::unordered_set<char*> &ids, const unsigned i){
CharString ret; CharString ret;
append(ret, PG_ID); append(ret, PG_ID);
CharString suf = ".mH"; CharString inf = ".mH";
append(ret, inf);
char buffer[32];
itoa(i, buffer, 10); // unsigned, char*, numerical base
CharString suf = buffer;
append(ret, suf); append(ret, suf);
CharString iter = i;
append(ret, iter);
if (ids.find(toCString(ret)) == ids.end()) if (ids.find(toCString(ret)) == ids.end())
return ret; return ret;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment