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

I/O utilities to facilitate TrackMate interoperability #8

Merged
merged 12 commits into from
Jun 17, 2024

Conversation

tinevez
Copy link
Contributor

@tinevez tinevez commented Jun 14, 2024

This PR adds methods to export from trackastra to facilitate its integration in other platforms.

tinevez added a commit to trackmate-sc/TrackMate that referenced this pull request Jun 14, 2024
Requires this PR to be merged:
weigertlab/trackastra#8

or the corresponding branch to be checked out.
@bentaculum
Copy link
Member

Hi @tinevez, thanks for the PR, this looks great.
I just made some tiny edits to ensure consistency with existing code.

I have one question: How would TrackMate read a node that is not connected to any edges? Could be a cell that appears for one frame, at the border, and disappears again. In the current table we would not capture this, right?

@tinevez
Copy link
Contributor Author

tinevez commented Jun 14, 2024

Humbly, I would suggest keeping the original method name (edges_to_csv): TrackMate will make something special to read this output, but it is bespoke to the trackastra integration.

For your question: yes 'lonely' spots would not appear in the table, but we do not mind. Lonely spots are added to the model at the detection part (before we call trackastra), so they will be in the final data anyway. Here the important part are the edges.

@bentaculum
Copy link
Member

bentaculum commented Jun 14, 2024

Humbly, I would suggest keeping the original method name (edges_to_csv): TrackMate will make something special to read this output, but it is bespoke to the trackastra integration.

I see, thanks for the clarification. Then I would suggest graph_to_edge_table as a name.

For your question: yes 'lonely' spots would not appear in the table, but we do not mind. Lonely spots are added to the model at the detection part (before we call trackastra), so they will be in the final data anyway. Here the important part are the edges.

I'm confused now how a tracker could prune spots that it does not want to pick. I would somehow have to mark each spot as picked or not picked, right?

Btw, I just saw the demo you made, I love it 😍

@tinevez
Copy link
Contributor Author

tinevez commented Jun 14, 2024

No need to mark them. Spots are just vertices of a graph. When they have no edges, they are not part of a track, but they are still part of the graph. Or do I not understand the question correctly?

@bentaculum
Copy link
Member

A tracker could get rid of certain spots with no edges, while keeping others, right? For example based on some intensity feature of the spot etc.

It is an edge case anyhow, might not be super important right now.

@tinevez tinevez mentioned this pull request Jun 14, 2024
@bentaculum bentaculum merged commit 4ec19dc into weigertlab:main Jun 17, 2024
8 checks passed
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.

2 participants