[med-svn] [Git][med-team/simka][master] Refresh patches

Shayan Doust gitlab at salsa.debian.org
Tue Jul 28 12:18:11 BST 2020



Shayan Doust pushed to branch master at Debian Med / simka


Commits:
bc06b122 by Shayan Doust at 2020-07-28T12:17:59+01:00
Refresh patches

- - - - -


3 changed files:

- debian/patches/fix_binary_path.patch
- debian/patches/fix_temp_arrays.patch
- debian/patches/fix_test_path.patch


Changes:

=====================================
debian/patches/fix_binary_path.patch
=====================================
@@ -4,10 +4,8 @@ Author: Shayan Doust <hello at shayandoust.me>
 Last-Update: 2019-09-13
 ---
 
-Index: simka/src/SimkaPotara.cpp
-===================================================================
---- simka.orig/src/SimkaPotara.cpp	2019-09-13 08:44:18.831548830 +0100
-+++ simka/src/SimkaPotara.cpp	2019-09-13 08:44:18.831548830 +0100
+--- simka.orig/src/SimkaPotara.cpp
++++ simka/src/SimkaPotara.cpp
 @@ -28,7 +28,7 @@
  */
  SimkaPotara::SimkaPotara(const string& execFilename)  : Tool ("Simka")


=====================================
debian/patches/fix_temp_arrays.patch
=====================================
@@ -3,24 +3,8 @@ Description: separate out array as a defined struct
 Last-Update: 2019-09-16
 ---
 
-Index: simka/src/SimkaPotara.hpp
-===================================================================
---- simka.orig/src/SimkaPotara.hpp	2019-09-16 15:21:36.549855248 +0100
-+++ simka/src/SimkaPotara.hpp	2019-09-16 15:21:36.545855212 +0100
-@@ -902,7 +902,8 @@
- 					}
- 					else{
- 						//sleep(1);
--						nanosleep((const struct timespec[]){{0, 100000000L}}, NULL);
-+						struct timespec ts = {0, 100000000L};
-+						nanosleep(&ts, NULL);
- 					}
- 
- 					if(i >= this->_bankNames.size()) break;
-Index: simka/src/minikc/SimkaCountProcess.cpp
-===================================================================
---- simka.orig/src/minikc/SimkaCountProcess.cpp	2019-09-16 15:21:36.549855248 +0100
-+++ simka/src/minikc/SimkaCountProcess.cpp	2019-09-16 15:21:36.545855212 +0100
+--- simka.orig/src/minikc/SimkaCountProcess.cpp
++++ simka/src/minikc/SimkaCountProcess.cpp
 @@ -22,7 +22,8 @@
  	int nbTries = 0;
  	while(ret != 0){


=====================================
debian/patches/fix_test_path.patch
=====================================
@@ -3,16 +3,14 @@ Author: Shayan Doust <hello at shayandoust.me>
 Last-Update: 2019-09-13
 ---
 
-Index: simka/tests/simkaMin/test_simkaMin.py
-===================================================================
---- simka.orig/tests/simkaMin/test_simkaMin.py	2019-09-16 15:35:57.745165516 +0100
-+++ simka/tests/simkaMin/test_simkaMin.py	2019-09-16 15:35:57.741165482 +0100
+--- simka.orig/tests/simkaMin/test_simkaMin.py
++++ simka/tests/simkaMin/test_simkaMin.py
 @@ -16,28 +16,28 @@
  
  def create_command(scriptFilename, outputPrefix, k, filter, nb_reads, nb_kmers, nb_cores, input_filename):
      outputDir = "k" + str(k) + "_" + filter.replace("-", "") + "_" + str(nb_reads) + "-" + str(nb_kmers) + "_n" + str(nb_cores)
 -    command = "python  " + scriptFilename
-+    command =scriptFilename
++    command = "python3  " + scriptFilename
      command += " -in " + input_filename
      command += " -out " + outputPrefix + "/" + outputDir
      command += " -nb-cores " + str(nb_cores)
@@ -28,9 +26,9 @@ Index: simka/tests/simkaMin/test_simkaMin.py
  def create_command_update(scriptFilename, outputPrefix, k, filter, nb_reads, nb_kmers, nb_cores, input_filename):
      outputDir = "k" + str(k) + "_" + filter.replace("-", "") + "_" + str(nb_reads) + "-" + str(nb_kmers) + "_n" + str(nb_cores)
 -    command = "python  " + scriptFilename
-+    command = scriptFilename
++    command = "python3  " + scriptFilename
      command += " -in " + input_filename
-     command += " -in-to-update " + outputPrefix + "/" + outputDir
+     command += " -in-to-update " + outputPrefix + "/" + outputDir + "/simkamin"
      command += " -nb-cores " + str(nb_cores)
      command += " -max-memory 100 "
      #command += " -kmer-size " + str(k)
@@ -44,8 +42,8 @@ Index: simka/tests/simkaMin/test_simkaMin.py
              for nb_reads in NB_READS:
                  for nb_kmers in NB_KMERS:
                      for nb_cores in NB_CORES:
--                        command, outputDir = create_command("../../simkaMin/simkaMin.py", "truth_simkaMin", k, filter, nb_reads, nb_kmers, nb_cores, " ../../example/simka_input.txt ")
-+                        command, outputDir = create_command("simkaMin", "truth_simkaMin", k, filter, nb_reads, nb_kmers, nb_cores, " ../simka_input.txt ")
+-                        command, outputDir = create_command("../../simkaMin/simkaMin.py", "truth_simkaMin_symetrical", k, filter, nb_reads, nb_kmers, nb_cores, " ../../example/simka_input.txt ")
++                        command, outputDir = create_command("simkaMin.py", "truth_simkaMin_symetrical", k, filter, nb_reads, nb_kmers, nb_cores, " ../../example/simka_input.txt ")
                          print (command)
                          ret = os.system(command)
                          if ret != 0: exit(1)
@@ -58,7 +56,7 @@ Index: simka/tests/simkaMin/test_simkaMin.py
                          print (command)
                          ret = os.system(command + suffix)
                          if ret != 0: exit(1)
-@@ -168,25 +168,25 @@
+@@ -166,25 +166,25 @@
      os.mkdir(out_dir)
  
      merged_sketch_filename = os.path.join(out_dir, "merged_sketch.bin")
@@ -88,7 +86,7 @@ Index: simka/tests/simkaMin/test_simkaMin.py
              print(command)
              ret = os.system(command + suffix)
              if ret != 0: exit(1)
-@@ -196,12 +196,12 @@
+@@ -194,12 +194,12 @@
  
          os.remove(filename_temp)
  
@@ -103,38 +101,38 @@ Index: simka/tests/simkaMin/test_simkaMin.py
      print(command)
      ret = os.system(command + suffix)
      if ret != 0: exit(1)
-@@ -226,23 +226,23 @@
+@@ -223,10 +223,10 @@
+     clear(out_dir)
      os.mkdir(out_dir)
  
-     init = False
 -    filename = "../../example/simka_input.txt"
+-    filename_temp1 = os.path.join("../../example/test_simkaMin_input_temp1.txt")
 +    filename = "../simka_input.txt"
-     for line in open(filename):
-         line = line.strip()
-         if len(line) == 0: continue
- 
--        filename_temp = os.path.join("../../example/test_simkaMin_input_temp.txt")
-+        filename_temp = os.path.join("../test_simkaMin_input_temp.txt")
-         f = open(filename_temp, "w")
-         f.write(line)
-         f.close()
++    filename_temp1 = os.path.join("../test_simkaiMin_input_temp1.txt")
+     f1 = open(filename_temp1, "w")
+-    filename_temp2 = os.path.join("../../example/test_simkaMin_input_temp2.txt")
++    filename_temp2 = os.path.join("../test_simkaMin_input_temp2.txt")
+     f2 = open(filename_temp2, "w")
+     N=2  #where to split the file
+     i=0
+@@ -241,13 +241,13 @@
+     f2.close()
+ 
+     # init
+-    command, outputDir = create_command("../../simkaMin/simkaMin.py", out_dir, 21, "", 0, 100, 4, filename_temp1)
++    command, outputDir = create_command("simkaMin.py", out_dir, 21, "", 0, 100, 4, filename_temp1)
+     print(command)
+     ret = os.system(command + suffix)
+     if ret != 0: exit(1)
  
-         if init:
--            command, outputDir = create_command_update("../../simkaMin/simkaMin_update.py", out_dir, 21, "", 0, 100, 4, filename_temp)
-+            command, outputDir = create_command_update("simkaMin_update", out_dir, 21, "", 0, 100, 4, filename_temp)
-             print(command)
-             ret = os.system(command + suffix)
-             if ret != 0: exit(1)
-         else:
--            command, outputDir = create_command("../../simkaMin/simkaMin.py", out_dir, 21, "", 0, 100, 4, filename_temp)
-+            command, outputDir = create_command("simkaMin", out_dir, 21, "", 0, 100, 4, filename_temp)
-             print(command)
-             ret = os.system(command + suffix)
-             if ret != 0: exit(1)
-Index: simka/tests/simple_test.py
-===================================================================
---- simka.orig/tests/simple_test.py	2019-09-16 15:35:57.745165516 +0100
-+++ simka/tests/simple_test.py	2019-09-16 15:35:57.741165482 +0100
+     # update
+-    command, outputDir = create_command_update("../../simkaMin/simkaMin_update.py", out_dir, 21, "", 0, 100, 4, filename_temp2)
++    command, outputDir = create_command_update("simkaMin_update.py", out_dir, 21, "", 0, 100, 4, filename_temp2)
+     print(command)
+     ret = os.system(command + suffix)
+     if ret != 0: exit(1)
+--- simka.orig/tests/simple_test.py
++++ simka/tests/simple_test.py
 @@ -91,7 +91,7 @@
  #test k=31 t=0
  clear()
@@ -183,10 +181,8 @@ Index: simka/tests/simple_test.py
  os.system(command + suffix)
  test_parallelization()
  
-Index: simka/example/simple_test.sh
-===================================================================
---- simka.orig/example/simple_test.sh	2019-09-16 15:35:57.745165516 +0100
-+++ simka/example/simple_test.sh	2019-09-16 15:36:47.117582577 +0100
+--- simka.orig/example/simple_test.sh
++++ simka/example/simple_test.sh
 @@ -3,23 +3,23 @@
  
  # look for simka binary. In devel mode, it's in ../build/bin directory.



View it on GitLab: https://salsa.debian.org/med-team/simka/-/commit/bc06b1228af1ce5853eddfbcdd9773e3eab2e10a

-- 
View it on GitLab: https://salsa.debian.org/med-team/simka/-/commit/bc06b1228af1ce5853eddfbcdd9773e3eab2e10a
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/20200728/fe770dcd/attachment-0001.html>


More information about the debian-med-commit mailing list