changeset 80:8336a4f2b647 draft

planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
author mheinzl
date Tue, 26 Jul 2022 10:19:28 +0000
parents d7aea14291e8
children 612c110305db
files read2mut.py
diffstat 1 files changed, 10 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/read2mut.py	Mon Jul 25 13:24:04 2022 +0000
+++ b/read2mut.py	Tue Jul 26 10:19:28 2022 +0000
@@ -1367,13 +1367,12 @@
             correct_tier = False
             correct_tier_ref = False
             if tier_dict[key1]["tier 4"] > 0 and sum_highTiers > 0:
-                tier_dict[key1]["tier 2.5"] = tier_dict[key1]["tier 4"]
-                tier_dict[key1]["tier 4"] = 0
+                # tier_dict[key1]["tier 2.5"] = tier_dict[key1]["tier 4"]
+                # tier_dict[key1]["tier 4"] = 0
                 correct_tier = True
-
-            if tier_dict_ref[key1]["tier 4"] > 0 and sum_highTiers_ref > 0:
-                tier_dict_ref[key1]["tier 2.5"] = tier_dict_ref[key1]["tier 4"]
-                tier_dict_ref[key1]["tier 4"] = 0
+            elif tier_dict_ref[key1]["tier 4"] > 0 and sum_highTiers_ref > 0:
+                # tier_dict_ref[key1]["tier 2.5"] = tier_dict_ref[key1]["tier 4"]
+                # tier_dict_ref[key1]["tier 4"] = 0
                 correct_tier_ref = True
             # print(key1, "change tiers from tier 4 to tier 2.5 for {} DCS ...".format(len(change_tier_after_print)))
             if len(change_tier_after_print) > 0:
@@ -1389,12 +1388,16 @@
                         line1 = tuple(line1)
                         counter_tier25 += 1
                         counter_tier4 -= 1
-                    if line1[2] == "ref" and correct_tier_ref and (current_tier == "4") and actual_high_tier:
+                        tier_dict[key1]["tier 2.5"] += 1
+                        tier_dict[key1]["tier 4"] -= 1
+                    elif line1[2] == "ref" and correct_tier_ref and (current_tier == "4") and actual_high_tier:
                         line1 = list(line1)
                         line1[1] = "2.5"
                         line1 = tuple(line1)
                         counter_tier25 += 1
                         counter_tier4 -= 1
+                        tier_dict_ref[key1]["tier 2.5"] += 1
+                        tier_dict_ref[key1]["tier 4"] -= 1
                     ws1.write_row(row, 0, line1)
                     csv_writer.writerow(line1)
                     ws1.write_row(row + 1, 0, line2)