jeromekelleher / sc2ts-paper

3 stars 5 forks source link

Change mutation notation? #183

Closed hyanwong closed 1 year ago

hyanwong commented 1 year ago

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 recurrent c2222g = a recurrent mutation at position 2222 c3333T = a reversion mutation at pos 3333 back to the inherited state of T

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.

jeromekelleher commented 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

hyanwong commented 1 year ago

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:

Screenshot 2023-06-07 at 12 52 57

Bold is much more evident:

Screenshot 2023-06-07 at 12 59 02

So how about we put all recurrent mutations in bold, and then put reversions with lowercase letters?

jeromekelleher commented 1 year ago

SGTM

hyanwong commented 1 year ago

Done in #185