sarcgraph.sg.SarcGraph._score_graph

SarcGraph._score_graph(G, c_avg_length=1.0, c_angle=1.0, c_length_diff=1.0, l_avg=15.0, l_max=30.0)[source]

Assigns a score to each connection of the input graph. Higher score indicates the two corresponding zdiscs are likely to be two ends of a sarcomere.

Parameters:
  • G (nx.Graph) –

  • c_avg_length (float, optional) – comparison of the length of a connection with l_avg affects the connection score, c_avg_length sets the relative effect of this score metric compared to the other two, by default 1.0

  • c_angle (float, optional) – the angle between a connection and its neighboring connections affects the connection score, c_angle sets the relative effect of this score metric compared to the other two, by default 1.0

  • c_length_diff (float, optional) – comparison of the length of a connection with the length of all neighboring connections affects the score, c_length_diff sets the relative effect of this score metric compared to the other two, by default 1.0

  • l_avg (float, optional) – an initial guess for the average length of sarcomeres in pixels, by default 15.0

  • l_max (float, optional) – Max allowable length for the length of sarcomeres in pixels, by default 30.0

Returns:

a graph of zdiscs with all connections scored

Return type:

nx.Graph