frisen-lab / TREX

Simultaneous lineage TRacking and EXpression profiling of single cells using RNA-seq
MIT License
5 stars 6 forks source link

Fix plot clone graph bug #68

Closed acorbat closed 6 months ago

acorbat commented 6 months ago

If I am interpreting this correctly, dot method is calculating the scale of edges and nodes to be used. It is expecting at least one of the nodes to have n higher than 1, but if all nodes have n=1, then their maximum is. Logarithm of 1 is 0, and this is the denominator used for scaling, which ends up in a division by zero.

I added a try/except for this division and then the scale is just max_width - 1.

This should solve issue #66 . Is this ok?