Skip to content

Commit

Permalink
edit read.h to fix read ID, moved the bam tags to the end of the read
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Settles committed Sep 7, 2024
1 parent 0f46b5f commit 156208a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions common/src/read.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,12 @@ class Read {
const std::string get_id_fastq(const char& read='\0') const {
std::string sam_comment = "";
for (auto const& s : comments) { sam_comment += '|' + s; }
std::string tmp = id + ' ' + read;
if (!(id2 == "")) tmp = tmp + id2;
tmp = tmp + sam_comment;
std::string tmp = id;
if (!(id2 == "")){
tmp = tmp + ' ' + read + id2 + sam_comment;
} else if (!(sam_comment == "")){
tmp = tmp + ' ' + read + sam_comment;
}
return tmp;
}
const std::string get_id_tab(const char& read='\0') const {
Expand Down

0 comments on commit 156208a

Please sign in to comment.