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

Add possibility to Import Links #15

Closed
3 of 5 tasks
stefanhahmann opened this issue Jul 25, 2024 · 10 comments
Closed
3 of 5 tasks

Add possibility to Import Links #15

stefanhahmann opened this issue Jul 25, 2024 · 10 comments
Assignees

Comments

@stefanhahmann
Copy link
Collaborator

stefanhahmann commented Jul 25, 2024

User Story

The importer currently lets users import spots from a simple and commonly used csv file into Mastodon. This way, users can use Mastodon’s visualization and analysis tools.

The figure shows where to find the CSV importer
grafik

Currently, users can select a .csv file from the file system. The importer displays the first line (aka header) of the file and lets users choose the correct order for the columns (like x, y, z, frame, label) without having to modify the csv file.

However, the “CSV Importer” can only import spots. It can’t handle links or cell divisions, which makes it very difficult to import anything that has been tracked outside of Mastodon. It may be be beneficial, if the functionality of importing links would be implemented into the CSV importer.

The figure shows the CSV importer in action and the result (unlinked spots)

grafik

Tasks:

  • Decide
    • ~Whether the initial import dialog as extended with a second file (for the links) ~
    • Whether there will be a separate import dialog that is just for links
    • Whether the links can be contained in a "parent" column
  • Add a new dialog section, where a selection of link source (i.e. parent) can be specified, similar to the existing column choices for spots
@tinevez
Copy link
Contributor

tinevez commented Jul 25, 2024

A CSV file is not suitable for links. I would recommend relying on the GraphML format instead.

@stefanhahmann
Copy link
Collaborator Author

A CSV file is not suitable for links. I would recommend relying on the GraphML format instead.

But this is how I imported these data sets into Mastodon: https://github.com/mastodon-sc/mastodon-example-data/tree/master/astec

GraphML is also a good idea, but it is more difficult to communicate, which attributes, we expect to be set in the GraphML file.

@tinevez
Copy link
Contributor

tinevez commented Jul 26, 2024

Ok this is convincing. A good test would be to see whether we can reimport fully the CSV files generated with the CSV export of the table views.

@stefanhahmann
Copy link
Collaborator Author

stefanhahmann commented Jul 26, 2024

A good test would be to see whether we can reimport fully the CSV files generated with the CSV export of the table views.

Exactly. Johannes, who was asking for this feature, and I had the same idea.

@tinevez
Copy link
Contributor

tinevez commented Jul 29, 2024

Would you have a smallish couple of CSV files I could play with?

@stefanhahmann
Copy link
Collaborator Author

Yes. This Zip-File contains a spot.csv and a matching links.csv

Pm01.zip

If imported correctly, the result should be close to https://github.com/mastodon-sc/mastodon-example-data/blob/master/astec/Pm01.mastodon

I did the import using https://github.com/mastodon-sc/mastodon-deep-lineage/blob/master/src/test/java/org/mastodon/mamut/astec/AstecReader.java

@stefanhahmann
Copy link
Collaborator Author

Here is a 2nd example:
Pm02.zip

After import, it should be similar to https://github.com/mastodon-sc/mastodon-example-data/blob/master/astec/Pm02.mastodon

@stefanhahmann
Copy link
Collaborator Author

However, these file have not been created with the Mastodon CSV export.

@stefanhahmann
Copy link
Collaborator Author

A good test would be to see whether we can reimport fully the CSV files generated with the CSV export of the table views.

Exactly. Johannes, who was asking for this feature, and I had the same idea.

Re-importing the CSV files produced with the Mastodon CSV Export function, is actually a bit harder, since these files have 3 header lines instead of only 1.

@stefanhahmann
Copy link
Collaborator Author

Resolved via #16

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

No branches or pull requests

2 participants