Closed hyanwong closed 1 year ago
I assume you tried out colour, boldface, italics etc as other ways of categorising?
Agree it would be helpful to highlight recurrent as well as reversion. I don't find the present notation that obvious though
Oh, good point. I thought about colour, but ruled it out because the list of labels is given as a multi-line string to networkx, and it's hard (impossible?) to assign different colours to different lines.
However, I since realised that you can use matplotlib mathtext in labels, and mark parts as bold or italic using $\bf{bold_text}
, etc. This is an easy change. One issue is that \it
doesn't italicise numbers, so the italic labels don't look very different. Here's an example:
Bold is much more evident:
So how about we put all recurrent mutations in bold, and then put reversions with lowercase letters?
SGTM
Done in #185
It is helpful to highlight both reversions and recurrent mutations in the subgraphs. I'm wondering whether this would be a better notation than what we use at the moment:
A1111T
= a mutation at position 1111 that is not recurrentc2222g
= a recurrent mutation at position 2222c3333T
= a reversion mutation at pos 3333 back to the inherited state ofT
So if a mutation begins with a lowercase letter, it is recurrent, but if it ends with a capital letter, it is additionally a reversion.
I don't know how tedious a change this would be for other people. Maybe it's too late, but it is helpful when looking at these plots to highlight the recurrent as well as the reversions.