# Is this the expected behaviour of augur tree?

**URL:** <https://nextstrain.discourse.group/t/is-this-the-expected-behaviour-of-augur-tree/1375>\
**Category:** Help and Getting Started\
**Created:** [May 4, 2023, 1:50pm UTC](https://nextstrain.discourse.group/t/is-this-the-expected-behaviour-of-augur-tree/1375 "2023-05-04T13:50:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonr](https://avatars.discourse-cdn.com/v4/letter/j/6f9a4e/32.png) [@jonr](https://nextstrain.discourse.group/u/jonr)\
**Post date:** [May 4, 2023, 1:50pm UTC](https://nextstrain.discourse.group/t/is-this-the-expected-behaviour-of-augur-tree/1375/1 "2023-05-04T13:50:02Z")

</div>

Hi all,  
I ran this command in the Nextstrain shell:

```auto
 Nextstrain ~/build $ augur tree --alignment nextstrain/geno_3_aligned.fa --output nextstrain/geno_3_tree_raw.nwk

```

And got this output:

```auto
Building a tree via:
	iqtree -ntmax 1 -s nextstrain/geno_3_aligned.fa -m GTR -ninit 2 -n 2 -me 0.05 -nt AUTO -redo > nextstrain/geno_3_aligned.fa
	Nguyen et al: IQ-TREE: A fast and effective stochastic algorithm for estimating maximum likelihood phylogenies.
	Mol. Biol. Evol., 32:268-274. https://doi.org/10.1093/molbev/msu300

```

Is it correct that the ouput of the iqtree command should be piped into the same file as the alignment file?

---

<div class="post-metadata">

**Author:** ![trs](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/trs/32/5_2.png) [@trs](https://nextstrain.discourse.group/u/trs)\
**Post date:** [May 4, 2023, 5:23pm UTC](https://nextstrain.discourse.group/t/is-this-the-expected-behaviour-of-augur-tree/1375/2 "2023-05-04T17:23:47Z")

</div>

@jonr Thanks for bringing this to our attention. You’ve indeed found a bug due to poor assumptions about filenames in Augur. We’ve been trying to excise those historical assumptions over time, but clearly still have more to fix!

As a workaround for you in the meantime, try renaming your file `nextstrain/geno_3_aligned.fa` to `nextstrain/geno_3_aligned.fasta` to get correct behaviour.

---

<div class="post-metadata">

**Author:** ![trs](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/trs/32/5_2.png) [@trs](https://nextstrain.discourse.group/u/trs)\
**Post date:** [May 4, 2023, 5:24pm UTC](https://nextstrain.discourse.group/t/is-this-the-expected-behaviour-of-augur-tree/1375/3 "2023-05-04T17:24:34Z")

</div>

For reference, the buggy code is:

> <https://github.com/nextstrain/augur/blob/631feb682c996bc5e0b69829ec242fcd5e9512f1/augur/tree.py#L249-L250>

---

<div class="post-metadata">

**Author:** ![trs](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/trs/32/5_2.png) [@trs](https://nextstrain.discourse.group/u/trs)\
**Post date:** [May 4, 2023, 6:17pm UTC](https://nextstrain.discourse.group/t/is-this-the-expected-behaviour-of-augur-tree/1375/4 "2023-05-04T18:17:46Z")

</div>

I’ve proposed a fix in [Fix alignment filename assumptions by tsibley · Pull Request #1206 · nextstrain/augur · GitHub](https://github.com/nextstrain/augur/pull/1206).

---

<div class="post-metadata">

**Author:** ![jonr](https://avatars.discourse-cdn.com/v4/letter/j/6f9a4e/32.png) [@jonr](https://nextstrain.discourse.group/u/jonr)\
**Post date:** [May 10, 2023, 8:19am UTC](https://nextstrain.discourse.group/t/is-this-the-expected-behaviour-of-augur-tree/1375/5 "2023-05-10T08:19:52Z")

</div>

Thanks a lot @trs for your help! I just renamed the file to “fasta” and it worked, but I see also your changes to the code have been implemented already.
