Skip to content

Commit

Permalink
add cross symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
tanghaibao committed Jan 24, 2025
1 parent d8c4a82 commit 294669f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/jcvi/projects/sugarcane.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,12 @@ def _pair_chromosomes(
pairs.append(pair)
singletons = [x for x in self.chromosomes if x.uuid not in paired]
if inplace:
self.chromosomes = flatten(pairs) + singletons
print([str(x) for x in self.chromosomes])
reordered = []
for a, b in pairs:
reordered += [a, b]
reordered += singletons
reordered.sort(key=self._sort_key)
self.chromosomes = reordered
return pairs, singletons

def _crossover_chromosomes(
Expand Down Expand Up @@ -1060,6 +1064,10 @@ def chromosome(args):
yy = 0.92
plot_genome(root, 0.35, yy, chrom_height, SO, haplotype_colors)
plot_genome(root, 0.75, yy, chrom_height, SS, haplotype_colors)
# Plot big cross sign
root.text(
0.5, yy - chrom_height / 2, r"$\times$", ha="center", va="center", fontsize=36
)

for _, genome in genomes:
yy -= yinterval
Expand Down

0 comments on commit 294669f

Please sign in to comment.