File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -1682,13 +1682,15 @@ def sort_mutation_label(s):
1682
1682
lpos = "lft"
1683
1683
elif edge .left > 0 and edge .right == ts .sequence_length :
1684
1684
lpos = "rgt"
1685
- if interval_labels [lpos ][pc ]:
1686
- interval_labels [lpos ][pc ] += " " # multiple same-side intervals for an edge
1687
- if lpos == "rgt" and interval_labels ["lft" ][pc ]:
1688
- interval_labels [lpos ][pc ] = " " + interval_labels [lpos ][pc ]
1689
- interval_labels [lpos ][pc ] = f"{ int (edge .left )} …{ int (edge .right )} "
1690
- if lpos == "lft" and interval_labels ["rgt" ][pc ]:
1691
- interval_labels [lpos ][pc ] += " "
1685
+ # Add spaces between or in front of labels if
1686
+ # multiple lft or rgt labels (i.e. intervals) exist for an edge
1687
+ if interval_labels [lpos ][pc ]: # between same side labels
1688
+ interval_labels [lpos ][pc ] += " "
1689
+ if lpos == "rgt" and interval_labels ["lft" ][pc ]: # in front of rgt label
1690
+ interval_labels [lpos ][pc ] = " " + interval_labels [lpos ][pc ]
1691
+ interval_labels [lpos ][pc ] += f"{ int (edge .left )} …{ int (edge .right )} "
1692
+ if lpos == "lft" and interval_labels ["rgt" ][pc ]: # at end of lft label
1693
+ interval_labels [lpos ][pc ] += " "
1692
1694
1693
1695
if label_replace is not None :
1694
1696
for search , replace in label_replace .items ():
You can’t perform that action at this time.
0 commit comments