Skip to content

Commit 05c6dd6

Browse files
committed
[FEATURE] much progress on sam/bam
1 parent 7e26974 commit 05c6dd6

2 files changed

Lines changed: 215 additions & 119 deletions

File tree

src/options.hpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
#include <cstdio>
3232
#include <unistd.h>
33+
#include <bitset>
3334

3435
#include <seqan/basic.h>
3536
#include <seqan/translation.h>
@@ -224,7 +225,7 @@ struct LambdaOptions : public SharedOptions
224225
std::string output;
225226
std::vector<BlastMatchField<>::Enum> columns;
226227
std::string outputBam;
227-
std::vector<SamBamExtraTags<>::Enum> samBamColumns;
228+
std::bitset<64> samBamColumns;
228229
bool samWithRefHeader;
229230
bool samBamSeq;
230231

@@ -797,8 +798,9 @@ parseCommandLine(LambdaOptions & options, int argc, char const ** argv)
797798
getOptionValue(buffer, parser, "sam-bam-columns");
798799
if (buffer == "help")
799800
{
800-
std::cout << "Please specify the columns in this format -oc 'column1 column2', i.e. space-seperated and "
801-
<< "enclosed in single quotes.\nThe following specifiers are supported:\n";
801+
std::cout << "Please specify the tags in this format -oc 'tag1 tag2', i.e. space-seperated and "
802+
<< "enclosed in quotes. The order of tags is not preserved.\nThe following specifiers are "
803+
<< "supported:\n";
802804

803805
for (auto const & c : SamBamExtraTags<>::keyDescPairs)
804806
std::cout << "\t" << std::get<0>(c) << "\t" << std::get<1>(c) << "\n";
@@ -816,7 +818,7 @@ parseCommandLine(LambdaOptions & options, int argc, char const ** argv)
816818
{
817819
if (std::get<0>(SamBamExtraTags<>::keyDescPairs[i]) == str)
818820
{
819-
appendValue(options.samBamColumns, static_cast<SamBamExtraTags<>::Enum>(i));
821+
options.samBamColumns[i] = true;
820822
resolved = true;
821823
break;
822824
}

0 commit comments

Comments
 (0)