Skip to content

Commit

Permalink
Change executable output to FASTA
Browse files Browse the repository at this point in the history
  • Loading branch information
rvaser committed May 7, 2020
1 parent 06d58ef commit 09db337
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "spoa/spoa.hpp"
#include "bioparser/bioparser.hpp"

static const std::string version = "v3.1.1";
static const std::string version = "v3.2.0";

static struct option options[] = {
{"algorithm", required_argument, nullptr, 'l'},
Expand Down Expand Up @@ -118,18 +118,16 @@ int main(int argc, char** argv) {
}
}

if (result == 0 || result == 2) {
if (result == 0) {
std::string consensus = graph->generate_consensus();
std::cout << "Consensus (" << consensus.size() << ")" << std::endl;
std::cout << consensus << std::endl;
}

if (result == 1 || result == 2) {
std::cout << ">Consensus LN:i:" << consensus.size() << std::endl
<< consensus << std::endl;
} else {
std::vector<std::string> msa;
graph->generate_multiple_sequence_alignment(msa);
std::cout << "Multiple sequence alignment" << std::endl;
for (const auto& it: msa) {
std::cout << it << std::endl;
graph->generate_multiple_sequence_alignment(msa, result == 2);
for (std::uint32_t i = 0; i < msa.size(); ++i) {
std::cout << ">" << (i < sequences.size() ? sequences[i]->name() : "Consensus") << std::endl
<< msa[i] << std::endl;
}
}

Expand Down

0 comments on commit 09db337

Please sign in to comment.