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

Output nwk filenames are inconsistent #389

Open
aofarrel opened this issue Feb 14, 2025 · 0 comments
Open

Output nwk filenames are inconsistent #389

aofarrel opened this issue Feb 14, 2025 · 0 comments

Comments

@aofarrel
Copy link
Contributor

matUtils extract -i sometimes adds a file extension to its outputs, and sometimes doesn't. Additionally, when it does add a file extension, it's not .nwk, it's .nw.

Simple example of problematic behavior

Assume samples.txt is a newline delimited text file that consists of 23 samples that are on the tree, and are reasonably close together.

matUtils extract -i tree.pb -t outfile -s samples.txt --> outfile, no extension
matUtils extract -i tree.pb -t outfile -s samples.txt -N 23 --> outfile-subtree-0.nw, outfile-subtree-1.nw, etc

matUtils extract -i tree.pb -t outfile.nwk -s samples.txt --> outfile.nwk
matUtils extract -i tree.pb -t outfile.nwk -s .samples.txt -N 23 --> outfile.nwk-subtree-0.nw, outfile-subtree-1.nw, etc

Proposed behavior

Either:
A) matUtils extract -i should always add the .nwk extension regardless of -N value
B) matUtils extract -i should never add an extension (be it .nwk or .nw) regardless of -N value

Example A

  • matUtils extract -i tree.pb -t outfile -s samples.txt --> outfile.nwk
  • matUtils extract -i tree.pb -t outfile -s samples.txt -N 23 --> outfile-subtree-0.nwk

Example B

  • matUtils extract -i tree.pb -t outfile -s samples.txt --> outfile
  • matUtils extract -i tree.pb -t outfile -s samples.txt -N 23 --> outfile-subtree-0

Affected versions

I'm using the dockerized version, yecheng/usher@sha256:sha256:2b8fa3a0c1df6844bb7dd042c9861bc6110df83b340f5b925680bdae03aee3d0 which runs v0.6.2. I don't want to be That Guy who opens an issue for an outdated version, but I can't install the latest version natively due to my setup, and it should be pretty quick to confirm if this behavior is in the latest version.

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

1 participant