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

mashtree_bootstrap.pl: saved tree has no bootstrap while tree printed to stdout does #90

Open
PCas95 opened this issue Oct 17, 2024 · 0 comments

Comments

@PCas95
Copy link

PCas95 commented Oct 17, 2024

Hello, I've noticed a strange behaviour of mashtree when running with replicates and I don't know if it's actually intended or a bug.

When running mashtree_bootstrap.pl with --reps, and the --outtree option for mashtree, the saved tree does not have bootstrap values in it. The whole process will still print the final tree with bootstrap to standard output, so it does produce it, but to save it to a specific file it requires redirection.

Here's my command:

$ mashtree_bootstrap.pl --numcpus 50 --reps 1000 --file-of-files lists/input_list_fq.txt --outmatrix output/mashtree_distance.tsv --tempdir tmp  --  --mindepth 0 --outtree output/mashtree_NJ.nwk > output/mashtree_execution.err

To get the final tree with bootstrap, I retrieved it from the standard output that I saved to a file:

$ tail -n 1 output/mashtree_execution.err > output/mashtree_NJ_with_bootstrap.nwk

As you can see from the commands below, the file produced with --outtree output/mashtree_NJ.nwk has no bootstrap values, while the one extracted from standard output does:

$ diff --brief output/mashtree_NJ.nwk output/mashtree_NJ_with_bootstrap.nwk 
Files output/mashtree_NJ.nwk and output/mashtree_NJ_with_bootstrap.nwk differ

$ grep -Eo '\)[0-9]{1,3}:' output/mashtree_NJ.nwk | wc -l
0
$ grep -Eo '\)[0-9]{1,3}:' output/mashtree_NJ_with_bootstrap.nwk | wc -l
7

Is this an intentional feature or an unreported bug?

Considering that --outtree is an option of mashtree but not of mashtree_bootstrap.pl:

  • Does each mashtree iteration save the output tree as the file passed to --outtree (which should lead to overwrite of the previous one)?
  • Does mashtree_bootstrap.pl have no built-in option to redirect just the final output tree to a file?

This behaviour does not compromise by any means the functionality of the tool, but it may lead to waste of execution time for data loss, on automated processes.

Thanks for the help!

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