changeset 89:1a5974404d4f draft

planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
author mheinzl
date Tue, 25 Apr 2023 17:06:38 +0000
parents 63e4e5d9a98f
children 24f166c1dba7
files read2mut.py read2mut.xml
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/read2mut.py	Sat Apr 22 10:06:51 2023 +0000
+++ b/read2mut.py	Tue Apr 25 17:06:38 2023 +0000
@@ -383,7 +383,6 @@
     ws3 = workbook3.add_worksheet("Tiers")
     current_result_sheet = ws1
 
-
     format1 = workbook.add_format({'bg_color': '#BCF5A9'})  # green
     format2 = workbook.add_format({'bg_color': '#FFC7CE'})  # red
     format3 = workbook.add_format({'bg_color': '#FACC2E'})  # yellow
@@ -403,7 +402,7 @@
                    'na.ab', 'na.ba', 'lowq.ab', 'lowq.ba', 'trim.ab', 'trim.ba',
                    'SSCS alt.ab', 'SSCS alt.ba', 'SSCS ref.ab', 'SSCS ref.ba',
                    'in phase', 'chimeric tag')
-    ws1.write_row(0, 0, header_line)
+    current_result_sheet.write_row(0, 0, header_line)
     csv_writer.writerow(header_line)
 
     counter_tier11 = 0
@@ -697,6 +696,7 @@
                             count_sheet += 1
                             ws_new = workbook.add_worksheet("Results" + str(count_sheet))
                             current_result_sheet = ws_new
+                            current_result_sheet.write_row(0, 0, header_line)
                             row = 1 
 
                         if variant_type == "alt":
@@ -1295,14 +1295,14 @@
                                         half1_mate2 = array2_half2
                                         half2_mate2 = array2_half
                                     # calculate HD of "a" in the tag to all "a's" or "b" in the tag to all "b's"
-                                    dist = np.array([sum(itertools.imap(operator.ne, half1_mate1, c)) for c in half1_mate2])
+                                    dist = np.array([sum(itertools.map(operator.ne, half1_mate1, c)) for c in half1_mate2])
                                     min_index = np.where(dist == dist.min())  # get index of min HD
                                     # get all "b's" of the tag or all "a's" of the tag with minimum HD
                                     min_tag_half2 = half2_mate2[min_index]
                                     min_tag_array2 = array2[min_index]  # get whole tag with min HD
                                     min_value = dist.min()
                                     # calculate HD of "b" to all "b's" or "a" to all "a's"
-                                    dist_second_half = np.array([sum(itertools.imap(operator.ne, half2_mate1, e))
+                                    dist_second_half = np.array([sum(itertools.map(operator.ne, half2_mate1, e))
                                                                  for e in min_tag_half2])
                                     dist2 = dist_second_half.max()
                                     max_index = np.where(dist_second_half == dist_second_half.max())[0]  # get index of max HD
--- a/read2mut.xml	Sat Apr 22 10:06:51 2023 +0000
+++ b/read2mut.xml	Tue Apr 25 17:06:38 2023 +0000
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<tool id="read2mut" name="Call specific mutations in reads:" version="3.2.0" profile="19.01">
+<tool id="read2mut" name="Call specific mutations in reads:" version="3.3.0" profile="19.01">
     <description>Looks for reads with a mutation at known positions and calculates frequencies and stats.</description>
     <macros>
         <import>va_macros.xml</import>