Skip to content

Conversation

@tzeitim
Copy link

@tzeitim tzeitim commented Jun 9, 2025

Fixed inconsistency in prepare_alleletable() where indel colors were generated from the full lineage profile instead of the filtered clustered_linprof. This ensures color generation is based on the same subset of data that gets returned for plotting. This resulted in an error when trying to retrieve data from an indel in the wrong scope.

For example in line cassiopeia/plotting/local.py:239:

--> 239     c = hsv_to_rgb(tuple(indel_colors.loc[ind, "color"]))

KeyError: 'CAGTC[46:2D]CGAAG'

The function in its original form creates clustered_linprof (line 520) which is a filtered version of the lineage profile containing only the specified leaves, the bug consists in the use the original lineage_profile to generate colors (line 522) instead of the filtered clustered_linprof.

…ered version

The function creates clustered_linprof (line 520) which is a filtered
version of the lineage profile containing only the specified leaves, the
bug consists in the use the original lineage_profile to generate colors
(line 522) instead of the filtered clustered_linprof.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant