comparison read2mut.py @ 51:26e53b5b8bcb draft

planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
author mheinzl
date Thu, 11 Mar 2021 14:58:29 +0000
parents b32c973fe8ab
children 49ecab32c83f
comparison
equal deleted inserted replaced
50:b32c973fe8ab 51:26e53b5b8bcb
322 alt = mut_array[i, 3] 322 alt = mut_array[i, 3]
323 dcs_median = cvrg_dict[key1][2] 323 dcs_median = cvrg_dict[key1][2]
324 whole_array = pure_tags_dict_short[key1].keys() 324 whole_array = pure_tags_dict_short[key1].keys()
325 325
326 tier_dict[key1] = {} 326 tier_dict[key1] = {}
327 values_tier_dict = [("tier 1.1", 0), ("tier 1.2", 0), ("tier 2.1", 0), ("tier 2.2", 0), ("tier 2.3", 0), ("tier 2.4", 0), ("tier 3.1", 0), 327 values_tier_dict = [("tier 1.1", 0), ("tier 1.2", 0), ("tier 2.1", 0), ("tier 2.2", 0), ("tier 2.3", 0), ("tier 2.4", 0),("tier 2.5", 0),
328 ("tier 3.2", 0), ("tier 2.5", 0), ("tier 4", 0), ("tier 5.1", 0), ("tier 5.2", 0), ("tier 5.3", 0), ("tier 5.4", 0), ("tier 5.5", 0), 328 ("tier 3.1", 0), ("tier 3.2", 0), ("tier 4", 0), ("tier 5.1", 0), ("tier 5.2", 0), ("tier 5.3", 0), ("tier 5.4", 0), ("tier 5.5", 0),
329 ("tier 6", 0), ("tier 7", 0)] 329 ("tier 6", 0), ("tier 7", 0)]
330 for k, v in values_tier_dict: 330 for k, v in values_tier_dict:
331 tier_dict[key1][k] = v 331 tier_dict[key1][k] = v
332 332
333 used_keys = [] 333 used_keys = []
1069 else: 1069 else:
1070 chimeric_dcs_high_tiers += high_tiers 1070 chimeric_dcs_high_tiers += high_tiers
1071 chimera_dict[key1] = (chimeric_dcs, chimeric_dcs_high_tiers) 1071 chimera_dict[key1] = (chimeric_dcs, chimeric_dcs_high_tiers)
1072 1072
1073 # move tier 4 counts to tier 2.5 if there other mutations with tier <= 2.4 1073 # move tier 4 counts to tier 2.5 if there other mutations with tier <= 2.4
1074 sum_highTiers = sum([tier_dict[key1][ij] for ij in tier_dict[key1].keys()[:6]]) 1074 print(list(tier_dict[key1].keys())[:6])
1075 sum_highTiers = sum([tier_dict[key1][ij] for ij in list(tier_dict[key1].keys())[:6]])
1076 print(sum_highTiers)
1075 if tier_dict[key1]["tier 4"] > 0 and sum_highTiers > 0: 1077 if tier_dict[key1]["tier 4"] > 0 and sum_highTiers > 0:
1076 tier_dict[key1]["tier 2.5"] = tier_dict[key1]["tier 4"] 1078 tier_dict[key1]["tier 2.5"] = tier_dict[key1]["tier 4"]
1077 tier_dict[key1]["tier 4"] = 0 1079 tier_dict[key1]["tier 4"] = 0
1078 lines = change_tier_after_print[key1] 1080 lines = change_tier_after_print[key1]
1079 1081