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

feat: Add IO for DistanceMatrix in Phylip format #469

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RagnarGrootKoerkamp
Copy link
Contributor

@RagnarGrootKoerkamp RagnarGrootKoerkamp commented Nov 29, 2021

This mirrors newick.rs and adds string/file IO for the bio_types::distancematrix::DistanceMatrix type, in the Phylip distance matrix format.

It supports square and (upper/lower) triangular matrices. Triangular matrices must not contain the diagonal.

Currently this is assuming the 'relaxed' format with arbitrary long names and single space separators. The 'strict' format requires names of exactly 10 chars (padded with whitespace) and is less flexible because of this.

I didn't find an actual proper spec for this format, but the closest one is probably this.

Also fix a broken doctest.

This will need to be merged after rust-bio/rust-bio-types#35, and the version of bio-types needs to be bumped.

This mirrors `newick.rs` and adds string/file IO for the
`bio_types::distancematrix::DistanceMatrix` type, in the Phylip distance
matrix format.

It supports square and (upper/lower) triangular matrices. Triangular
matrices must not contain the diagonal.

Also fix a broken doctest.
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.

None yet

1 participant