Skip to content

Output nwk filenames are inconsistent #389

@aofarrel

Description

@aofarrel

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions