comparison read2mut.py @ 22:24c50e7539ef draft

planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
author mheinzl
date Mon, 22 Feb 2021 15:58:01 +0000
parents b67d4c7da780
children 25625221b88f
comparison
equal deleted inserted replaced
21:b67d4c7da780 22:24c50e7539ef
294 alt = mut_array[i, 3] 294 alt = mut_array[i, 3]
295 dcs_median = cvrg_dict[key1][2] 295 dcs_median = cvrg_dict[key1][2]
296 whole_array = list(pure_tags_dict_short[key1].keys()) 296 whole_array = list(pure_tags_dict_short[key1].keys())
297 297
298 tier_dict[key1] = {} 298 tier_dict[key1] = {}
299 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), ("tier 3.2", 0), ("tier 4.1", 0), ("tier 4.2", 0), ("tier 5", 0), ("tier 6", 0)] 299 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),
300 ("tier 3.1", 0), ("tier 3.2", 0), ("tier 4.1", 0), ("tier 4.2", 0), ("tier 5", 0), ("tier 6", 0)]
300 for k, v in values_tier_dict: 301 for k, v in values_tier_dict:
301 tier_dict[key1][k] = v 302 tier_dict[key1][k] = v
302 303
303 used_keys = [] 304 used_keys = []
304 if 'ab' in mut_pos_dict[key1].keys(): 305 if 'ab' in mut_pos_dict[key1].keys():
531 beg1 = total1new 532 beg1 = total1new
532 total1new = 0 533 total1new = 0
533 alt1ff = 0 534 alt1ff = 0
534 alt1f = 0 535 alt1f = 0
535 trimmed_five = True 536 trimmed_five = True
537
536 if ((read_pos1 >= 0) and (abs(read_len_median1 - read_pos1) <= trim3)): 538 if ((read_pos1 >= 0) and (abs(read_len_median1 - read_pos1) <= trim3)):
537 beg1 = total1new 539 beg1 = total1new
538 total1new = 0 540 total1new = 0
539 alt1ff = 0 541 alt1ff = 0
540 alt1f = 0 542 alt1f = 0
826 lst = tuple(lst) 828 lst = tuple(lst)
827 ws2.write_row(row + 1, 0, lst) 829 ws2.write_row(row + 1, 0, lst)
828 if chimera_correction: 830 if chimera_correction:
829 ws2.conditional_format('P{}:Q{}'.format(row + 2, row + 2), {'type': 'formula', 'criteria': '=$P$1="tier 1.1"', 'format': format1, 'multi_range': 'P{}:Q{} P1:Q1'.format(row + 2, row + 2)}) 831 ws2.conditional_format('P{}:Q{}'.format(row + 2, row + 2), {'type': 'formula', 'criteria': '=$P$1="tier 1.1"', 'format': format1, 'multi_range': 'P{}:Q{} P1:Q1'.format(row + 2, row + 2)})
830 ws2.conditional_format('R{}:U{}'.format(row + 2, row + 2), {'type': 'formula', 'criteria': '=$R$1="tier 2.1"', 'format': format3, 'multi_range': 'R{}:U{} R1:U1'.format(row + 2, row + 2)}) 832 ws2.conditional_format('R{}:U{}'.format(row + 2, row + 2), {'type': 'formula', 'criteria': '=$R$1="tier 2.1"', 'format': format3, 'multi_range': 'R{}:U{} R1:U1'.format(row + 2, row + 2)})
831 ws2.conditional_format('V{}:AA{}'.format(row + 2, row + 2), {'type': 'formula', 'criteria': '=$V$1="tier 3.1"', 'format': format2, 'multi_range': 'V{}:AA{} V1:AA1'.format(row + 2, row + 2)}) 833 ws2.conditional_format('V{}:Z{}'.format(row + 2, row + 2), {'type': 'formula', 'criteria': '=$V$1="tier 3.1"', 'format': format2, 'multi_range': 'V{}:Z{} V1:Z1'.format(row + 2, row + 2)})
832 else: 834 else:
833 ws2.conditional_format('J{}:K{}'.format(row + 2, row + 2), {'type': 'formula', 'criteria': '=$J$1="tier 1.1"', 'format': format1, 'multi_range': 'J{}:K{} J1:K1'.format(row + 2, row + 2)}) 835 ws2.conditional_format('J{}:K{}'.format(row + 2, row + 2), {'type': 'formula', 'criteria': '=$J$1="tier 1.1"', 'format': format1, 'multi_range': 'J{}:K{} J1:K1'.format(row + 2, row + 2)})
834 ws2.conditional_format('L{}:O{}'.format(row + 2, row + 2), {'type': 'formula', 'criteria': '=$L$1="tier 2.1"', 'format': format3, 'multi_range': 'L{}:O{} L1:O1'.format(row + 2, row + 2)}) 836 ws2.conditional_format('L{}:O{}'.format(row + 2, row + 2), {'type': 'formula', 'criteria': '=$L$1="tier 2.1"', 'format': format3, 'multi_range': 'L{}:O{} L1:O1'.format(row + 2, row + 2)})
835 ws2.conditional_format('P{}:U{}'.format(row + 2, row + 2), {'type': 'formula', 'criteria': '=$P$1="tier 3.1"', 'format': format2, 'multi_range': 'P{}:U{} P1:U1'.format(row + 2, row + 2)}) 837 ws2.conditional_format('P{}:U{}'.format(row + 2, row + 2), {'type': 'formula', 'criteria': '=$P$1="tier 3.1"', 'format': format2, 'multi_range': 'P{}:U{} P1:U1'.format(row + 2, row + 2)})
836 row += 1 838 row += 1