Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotate intertrack edges in the ctc get_edge_errors function #54

Merged
merged 10 commits into from
Oct 25, 2023

Conversation

msschwartz21
Copy link
Collaborator

This PR moves the annotation of intertrack edges into get_edge_errors based on the assumption that any edge connecting a parent to a daughter cells is an intertrack edge. This closes #45.

A couple additional changes that emerged:

  • get_edge_errors explicitly checks that node errors have been annotated and computes them if they are missing (since get_edge_errors requires access to true positive nodes)
  • True positive edges are no longer annotated by get_edge_errors. The CTC metrics do not use the true positive annotation. Currently true positive edge and wrong semantic edge were considered mutually exclusive which Caroline and I both thought was a potentially dangerous assumption for someone who wasn't operating with CTC metrics. Without the true positive edges explicitly annotated, anyone who wants to count them can impose their own assumptions about what merits a true positive edge.

Copy link
Collaborator

@DragaDoncila DragaDoncila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I'm not sure what's going on but on my dataset I'm getting 4 additional ws_edges on this branch compared to main. I don't have time to investigate right now what the difference is and which is right, but I'll have a look and get back to you.

induced_graph = comp_graph.get_subgraph(
comp_graph.get_nodes_with_flag(NodeAttr.TRUE_POS)
).graph

comp_graph.set_edge_attribute(list(comp_graph.edges()), EdgeAttr.FALSE_POS, False)
comp_graph.set_edge_attribute(list(comp_graph.edges()), EdgeAttr.TRUE_POS, False)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@msschwartz21 I don't think I fully understand why we are not annotating true positive edges? You mention in the description that we can't rely on the assumption that TP and WS edges are mutually exclusive, but I think we can? I don't think a TP edge should ever be annotated with WS.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My stab at explaining this, that Morgan can elaborate on at her leisure: I admit that I am always confused byWS edges; however, it is my understanding that if there is a division and we correctly detect one of the edges to a daughter but not the other, the one we correctly detected would be labeled WS - correct? I would consider that a TP - we correctly identified the edge! Just because we missed the other daughter edge (a FN edge), that doesn't make the correctly recovered edge incorrect. In that way, something that is a WS edge in the CTC metric could be considered a TP elsewhere, making them not mutually exclusive.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ Caroline's description captures my thoughts perfectly

@DragaDoncila
Copy link
Collaborator

Hmm I'm not sure what's going on but on my dataset I'm getting 4 additional ws_edges on this branch compared to main.

I think it was a bug on my end, I don't see anything wrong with what we're doing here and the additional edges (in main, not here) shouldn't have been intertrack edges anyway. So just ignore this hehe

@cmalinmayor
Copy link
Collaborator

@msschwartz21 Are we good to merge now?

@msschwartz21
Copy link
Collaborator Author

I want to respond to Draga's question about true positive edges at some point, but it will take some additional thought on my part and shouldn't be a blocker to merging.

@cmalinmayor
Copy link
Collaborator

I want to respond to Draga's question about true positive edges at some point, but it will take some additional thought on my part and shouldn't be a blocker to merging.

I took a stab at it, and you can follow up whenever you have a chance. I'll go ahead and merge then! Thanks :)

@cmalinmayor cmalinmayor merged commit a910bc6 into main Oct 25, 2023
13 checks passed
@cmalinmayor cmalinmayor deleted the intertrack_edges branch October 25, 2023 19:49
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.

"is_intertrack_edge" is used but not annotated on graphs in CTC errors
3 participants