Mercurial > repos > mheinzl > variant_analyzer2
diff read2mut.py @ 64:fd342f5a97d9 draft
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
author | mheinzl |
---|---|
date | Thu, 18 Mar 2021 10:14:24 +0000 |
parents | f0fc93b7945c |
children | 712a37137b1f |
line wrap: on
line diff
--- a/read2mut.py Thu Mar 18 10:07:50 2021 +0000 +++ b/read2mut.py Thu Mar 18 10:14:24 2021 +0000 @@ -962,42 +962,42 @@ tier_dict[key1]["tier 4"] += 1 # assign tiers - if ((all(int(ij) >= 3 for ij in [total1new_trim, total4new_trim]) & - all(float(ij) >= 0.75 for ij in [alt1ff_trim, alt4ff_trim])) | - (all(int(ij) >= 3 for ij in [total2new_trim, total3new_trim]) & - all(float(ij) >= 0.75 for ij in [alt2ff_trim, alt3ff_trim]))): - trimmed_actual_high_tier = True - elif (all(int(ij) >= 1 for ij in [total1new_trim, total2new_trim, total3new_trim, total4new_trim]) & - any(int(ij) >= 3 for ij in [total1new_trim, total4new_trim]) & - any(int(ij) >= 3 for ij in [total2new_trim, total3new_trim]) & - all(float(ij) >= 0.75 for ij in [alt1ff, alt2ff, alt3ff, alt4ff])): + if ((all(int(ij) >= 3 for ij in [total1new_trim, total4new_trim]) & + all(float(ij) >= 0.75 for ij in [alt1ff_trim, alt4ff_trim])) | + (all(int(ij) >= 3 for ij in [total2new_trim, total3new_trim]) & + all(float(ij) >= 0.75 for ij in [alt2ff_trim, alt3ff_trim]))): + trimmed_actual_high_tier = True + elif (all(int(ij) >= 1 for ij in [total1new_trim, total2new_trim, total3new_trim, total4new_trim]) & + any(int(ij) >= 3 for ij in [total1new_trim, total4new_trim]) & + any(int(ij) >= 3 for ij in [total2new_trim, total3new_trim]) & + all(float(ij) >= 0.75 for ij in [alt1ff, alt2ff, alt3ff, alt4ff])): trimmed_actual_high_tier = True elif ((all(int(ij) >= 1 for ij in [total1new_trim, total4new_trim]) & any(int(ij) >= 3 for ij in [total1new_trim, total4new_trim]) & all(float(ij) >= 0.75 for ij in [alt1ff_trim, alt4ff_trim])) | - (all(int(ij) >= 1 for ij in [total2new_trim, total3new_trim]) & - any(int(ij) >= 3 for ij in [total2new_trim, total3new_trim]) & - all(float(ij) >= 0.75 for ij in [alt2ff_trim, alt3ff_trim]))): - trimmed_actual_high_tier = True - elif (all(int(ij) >= 1 for ij in [total1new_trim, total2new_trim, total3new_trim, total4new_trim]) & - all(float(ij) >= 0.75 for ij in [alt1ff_trim, alt2ff_trim, alt3ff_trim, alt4ff_trim])): - trimmed_actual_high_tier = True - elif ((all(int(ij) >= 1 for ij in [total1new_trim, total4new_trim]) & - any(int(ij) >= 3 for ij in [total2new_trim, total3new_trim]) & - all(float(ij) >= 0.75 for ij in [alt1ff_trim, alt4ff_trim]) & - any(float(ij) >= 0.75 for ij in [alt2ff_trim, alt3ff_trim])) | - (all(int(ij) >= 1 for ij in [total2new_trim, total3new_trim]) & - any(int(ij) >= 3 for ij in [total1new_trim, total4new_trim]) & - all(float(ij) >= 0.75 for ij in [alt2ff_trim, alt3ff_trim]) & - any(float(ij) >= 0.75 for ij in [alt1ff_trim, alt4ff_trim]))): - trimmed_actual_high_tier = True - elif ((all(int(ij) >= 1 for ij in [total1new_trim, total4new_trim]) & - all(float(ij) >= 0.75 for ij in [alt1ff_trim, alt4ff_trim])) | - (all(int(ij) >= 1 for ij in [total2new_trim, total3new_trim]) & - all(float(ij) >= 0.75 for ij in [alt2ff_trim, alt3ff_trim]))): - trimmed_actual_high_tier = True - else: - trimmed_actual_high_tier = False + (all(int(ij) >= 1 for ij in [total2new_trim, total3new_trim]) & + any(int(ij) >= 3 for ij in [total2new_trim, total3new_trim]) & + all(float(ij) >= 0.75 for ij in [alt2ff_trim, alt3ff_trim]))): + trimmed_actual_high_tier = True + elif (all(int(ij) >= 1 for ij in [total1new_trim, total2new_trim, total3new_trim, total4new_trim]) & + all(float(ij) >= 0.75 for ij in [alt1ff_trim, alt2ff_trim, alt3ff_trim, alt4ff_trim])): + trimmed_actual_high_tier = True + elif ((all(int(ij) >= 1 for ij in [total1new_trim, total4new_trim]) & + any(int(ij) >= 3 for ij in [total2new_trim, total3new_trim]) & + all(float(ij) >= 0.75 for ij in [alt1ff_trim, alt4ff_trim]) & + any(float(ij) >= 0.75 for ij in [alt2ff_trim, alt3ff_trim])) | + (all(int(ij) >= 1 for ij in [total2new_trim, total3new_trim]) & + any(int(ij) >= 3 for ij in [total1new_trim, total4new_trim]) & + all(float(ij) >= 0.75 for ij in [alt2ff_trim, alt3ff_trim]) & + any(float(ij) >= 0.75 for ij in [alt1ff_trim, alt4ff_trim]))): + trimmed_actual_high_tier = True + elif ((all(int(ij) >= 1 for ij in [total1new_trim, total4new_trim]) & + all(float(ij) >= 0.75 for ij in [alt1ff_trim, alt4ff_trim])) | + (all(int(ij) >= 1 for ij in [total2new_trim, total3new_trim]) & + all(float(ij) >= 0.75 for ij in [alt2ff_trim, alt3ff_trim]))): + trimmed_actual_high_tier = True + else: + trimmed_actual_high_tier = False elif softclipped_mutation_allMates: tier = "5.1"