[med-svn] [Git][med-team/spoa][master] 4 commits: routine-update: New upstream version

Michael R. Crusoe gitlab at salsa.debian.org
Tue Jan 19 06:41:02 GMT 2021



Michael R. Crusoe pushed to branch master at Debian Med / spoa


Commits:
e3af0c20 by Michael R. Crusoe at 2021-01-19T07:33:37+01:00
routine-update: New upstream version

- - - - -
e3b1732d by Michael R. Crusoe at 2021-01-19T07:33:38+01:00
New upstream version 4.0.7+ds
- - - - -
6a164ca0 by Michael R. Crusoe at 2021-01-19T07:33:39+01:00
Update upstream source from tag 'upstream/4.0.7+ds'

Update to upstream version '4.0.7+ds'
with Debian dir 5bdaf1b20fd35ce452f3086ec2aba104b751daf2
- - - - -
179e4117 by Michael R. Crusoe at 2021-01-19T07:33:42+01:00
routine-update: Ready to upload to unstable

- - - - -


4 changed files:

- CMakeLists.txt
- README.md
- debian/changelog
- src/main.cpp


Changes:

=====================================
CMakeLists.txt
=====================================
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 3.9)
 
-project(spoa VERSION 4.0.6
+project(spoa VERSION 4.0.7
              LANGUAGES CXX
              DESCRIPTION "Spoa is a c++ library (and tool) for SIMD vectorized partial order alignment.")
 


=====================================
README.md
=====================================
@@ -53,7 +53,7 @@ usage: spoa [options ...] <sequences>
         0 - local (Smith-Waterman)
         1 - global (Needleman-Wunsch)
         2 - semi-global
-    -r, --result <int>
+    -r, --result <int> (option can be used multiple times)
       default: 0
       result mode:
         0 - consensus (FASTA)


=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+spoa (4.0.7+ds-1) unstable; urgency=medium
+
+  * Team upload.
+  * New upstream version
+
+ -- Michael R. Crusoe <crusoe at debian.org>  Tue, 19 Jan 2021 07:33:42 +0100
+
 spoa (4.0.6+ds2-2) unstable; urgency=medium
 
   * Team upload.


=====================================
src/main.cpp
=====================================
@@ -95,7 +95,7 @@ void Help() {
       "        0 - local (Smith-Waterman)\n"
       "        1 - global (Needleman-Wunsch)\n"
       "        2 - semi-global\n"
-      "    -r, --result <int>\n"
+      "    -r, --result <int> (option can be used multiple times)\n"
       "      default: 0\n"
       "      result mode:\n"
       "        0 - consensus (FASTA)\n"
@@ -211,7 +211,7 @@ int main(int argc, char** argv) {
   std::int8_t c = -4;
 
   std::uint8_t algorithm = 0;
-  std::uint8_t result = 0;
+  std::vector<std::uint8_t> results = { 0 };
   std::string dot_path{};
   bool is_strand_ambiguous = false;
 
@@ -226,7 +226,7 @@ int main(int argc, char** argv) {
       case 'q': q = atoi(optarg); break;
       case 'c': c = atoi(optarg); break;
       case 'l': algorithm = atoi(optarg); break;
-      case 'r': result = atoi(optarg); break;
+      case 'r': results.emplace_back(atoi(optarg)); break;
       case 'd': dot_path = optarg; break;
       case 's': is_strand_ambiguous = true; break;
       case 'v': std::cout << spoa_version << std::endl; return 0;
@@ -234,6 +234,9 @@ int main(int argc, char** argv) {
       default: return 1;
     }
   }
+  if (results.size() > 1) {
+    results.erase(results.begin());
+  }
 
   if (optind >= argc) {
     std::cerr << "[spoa::] error: missing input file!" << std::endl;
@@ -312,35 +315,37 @@ int main(int argc, char** argv) {
     }
   }
 
-  switch (result) {
-    case 0: {
-      auto consensus = graph.GenerateConsensus();
-      std::cout << ">Consensus LN:i:" << consensus.size() << std::endl
-                << consensus << std::endl;
-      break;
-    }
-    case 1:
-    case 2: {
-      auto msa = graph.GenerateMultipleSequenceAlignment(result == 2);
-      for (std::uint32_t i = 0; i < msa.size(); ++i) {
-        std::string name = i < sequences.size() ? sequences[i]->name : "Consensus";  // NOLINT
-        std::cout << ">" << name << std::endl
-                  << msa[i] << std::endl;
+  for (const auto& it : results) {
+    switch (it) {
+      case 0: {
+        auto consensus = graph.GenerateConsensus();
+        std::cout << ">Consensus LN:i:" << consensus.size() << std::endl
+                  << consensus << std::endl;
+        break;
       }
-      break;
-    }
-    case 3:
-    case 4: {
-      std::vector<std::string> headers;
-      for (const auto& it : sequences) {
-        headers.emplace_back(it->name);
+      case 1:
+      case 2: {
+        auto msa = graph.GenerateMultipleSequenceAlignment(it == 2);
+        for (std::uint32_t i = 0; i < msa.size(); ++i) {
+          std::string name = i < sequences.size() ? sequences[i]->name : "Consensus";  // NOLINT
+          std::cout << ">" << name << std::endl
+                    << msa[i] << std::endl;
+        }
+        break;
+      }
+      case 3:
+      case 4: {
+        std::vector<std::string> headers;
+        for (const auto& it : sequences) {
+          headers.emplace_back(it->name);
+        }
+        graph.GenerateConsensus();
+        PrintGfa(graph, headers, is_reversed, it == 4);
+        break;
       }
-      graph.GenerateConsensus();
-      PrintGfa(graph, headers, is_reversed, result == 4);
-      break;
+      default:
+        break;
     }
-    default:
-      break;
   }
 
   graph.PrintDot(dot_path);



View it on GitLab: https://salsa.debian.org/med-team/spoa/-/compare/f53fc61fbca6bdfebe31efd2f1d0bdafd5791701...179e41174117e44e8b79a843d9da0e992240d8b1

-- 
View it on GitLab: https://salsa.debian.org/med-team/spoa/-/compare/f53fc61fbca6bdfebe31efd2f1d0bdafd5791701...179e41174117e44e8b79a843d9da0e992240d8b1
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20210119/25a0cdb4/attachment-0001.html>


More information about the debian-med-commit mailing list