changeset 29:b14b69697cf6 draft

planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
author mheinzl
date Wed, 24 Feb 2021 10:21:07 +0000
parents afda74e874ac
children e7da54e10e2d
files read2mut.py
diffstat 1 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/read2mut.py	Wed Feb 24 09:39:24 2021 +0000
+++ b/read2mut.py	Wed Feb 24 10:21:07 2021 +0000
@@ -237,13 +237,13 @@
     else:
         pure_tags_dict_short = pure_tags_dict
 
-    #csv_data = open(outputFile_csv, "w")
-    #csv_writer = csv.writer(csv_data, delimiter=",")
+    csv_data = open(outputFile_csv, "wb")
+    csv_writer = csv.writer(csv_data, delimiter=",")
 
     # output summary with threshold
     workbook = xlsxwriter.Workbook(outfile)
-    workbook2 = xlsxwriter.Workbook(outfile2, {'in_memory': True})
-    workbook3 = xlsxwriter.Workbook(outfile3, {'in_memory': True})
+    workbook2 = xlsxwriter.Workbook(outfile2)
+    workbook3 = xlsxwriter.Workbook(outfile3)
     ws1 = workbook.add_worksheet("Results")
     ws2 = workbook2.add_worksheet("Allele frequencies")
     ws3 = workbook3.add_worksheet("Tiers")
@@ -268,7 +268,7 @@
                    'SSCS alt.ab', 'SSCS alt.ba', 'SSCS ref.ab', 'SSCS ref.ba',
                    'in phase', 'chimeric tag')
     ws1.write_row(0, 0, header_line)
-    #csv_writer.writerow(header_line)
+    csv_writer.writerow(header_line)
     counter_tier11 = 0
     counter_tier12 = 0
     counter_tier21 = 0
@@ -733,10 +733,10 @@
                             read_pos3 = read_len_median3 = None
                         line = (var_id, tier, key2[:-5], 'ab1.ba2', read_pos1, read_pos4, read_len_median1, read_len_median4, dcs_median) + details1 + (sscs_mut_ab, sscs_mut_ba, sscs_ref_ab, sscs_ref_ba, add_mut14, chimera)
                         ws1.write_row(row, 0, line)
-                        #csv_writer.writerow(line)
+                        csv_writer.writerow(line)
                         line = ("", "", key2[:-5], 'ab2.ba1', read_pos2, read_pos3, read_len_median2, read_len_median3, dcs_median) + details2 + (sscs_mut_ab, sscs_mut_ba, sscs_ref_ab, sscs_ref_ba, add_mut23, chimera)
                         ws1.write_row(row + 1, 0, line)
-                        #csv_writer.writerow(line)
+                        csv_writer.writerow(line)
 
                         ws1.conditional_format('L{}:M{}'.format(row + 1, row + 2),
                                                {'type': 'formula',
@@ -974,6 +974,7 @@
     workbook.close()
     workbook2.close()
     workbook3.close()
+    csv_data.close()