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 Newick tree support #3695

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Add Newick tree support #3695

wants to merge 10 commits into from

Conversation

chrisvanrun
Copy link
Contributor

Part of the pitch:

This PR adds support for Newick files.

  • Validates content by attempting to parse the trees.
  • It forces .newick suffix in the relative path.
  • Uploader (Uppy) allows selection of:
    • *.nwk, used by the test files in the parser library.
    • *.tree, defined by Wikipedia.
    • *.newick, provided in the example files.

At this point, it runs on acks-late-micro-short. As the Newick are not very hard to parse or very big.

Copy link
Member

@jmsmkn jmsmkn left a comment

Choose a reason for hiding this comment

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

acks-late-micro-short really doesn't have much memory available, so don't be surprised when we get memory errors from that validation.

@chrisvanrun
Copy link
Contributor Author

acks-late-micro-short really doesn't have much memory available, so don't be surprised when we get memory errors from that validation.

Would you agree that for a first implementation, it is OK? They should be around the same size as the multiple annotation JSON types. I'll be looking at re-routing file-to-object task to larger workers when implementing BIOM.

@jmsmkn
Copy link
Member

jmsmkn commented Nov 13, 2024

Yes totally fine, was just a heads up.

@chrisvanrun
Copy link
Contributor Author

Summary of updates:

The mime-types were not being really used as MIME-types but rather as input to Uppy. At the same time the need to support .newick as file extension and uploads caused several other properties. This added complexity.

Since we don't need to actually map to mime types I've refactored things to a allowed_file_types map and lookup, combining both MIME and the other file type definitions Uppy supports: https://uppy.io/docs/uppy/#restrictions.

Newick validator now also handles time-out errors, memory errors. It also no longer exposes generic exceptions.

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