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

New crash when running without alignment #250

Closed
theosanderson opened this issue Jul 28, 2023 · 1 comment · Fixed by #251
Closed

New crash when running without alignment #250

theosanderson opened this issue Jul 28, 2023 · 1 comment · Fixed by #251
Assignees

Comments

@theosanderson
Copy link
Contributor

Hello,

As part of some benchmarking I run:

treetime --dates tree_dates.tsv --tree distance_tree.nwk --sequence-length 1000 --keep-root --keep-polytomies

In 0.9.6 this runs without any error messages. In 0.10.1 I think it still works, but after outputting some files it crashes with:

--- tree saved in nexus format as  
         2023-07-28-0010_treetime/timetree.nexus

Traceback (most recent call last):
  File "/opt/homebrew/Caskroom/miniconda/base/envs/new/bin/treetime", line 8, in <module>
    sys.exit(main())
  File "/opt/homebrew/Caskroom/miniconda/base/envs/new/lib/python3.10/site-packages/treetime/__main__.py", line 21, in main
    return_code = params.func(params)
  File "/opt/homebrew/Caskroom/miniconda/base/envs/new/lib/python3.10/site-packages/treetime/argument_parser.py", line 233, in toplevel
    timetree(params)
  File "/opt/homebrew/Caskroom/miniconda/base/envs/new/lib/python3.10/site-packages/treetime/wrappers.py", line 332, in timetree
    return run_timetree(myTree, params, outdir)
  File "/opt/homebrew/Caskroom/miniconda/base/envs/new/lib/python3.10/site-packages/treetime/wrappers.py", line 480, in run_timetree
    export_sequences_and_tree(myTree, basename, is_vcf, params.zero_based,
  File "/opt/homebrew/Caskroom/miniconda/base/envs/new/lib/python3.10/site-packages/treetime/CLI_io.py", line 185, in export_sequences_and_tree
    auspice = create_auspice_json(tt, timetree=timetree, confidence=confidence)
  File "/opt/homebrew/Caskroom/miniconda/base/envs/new/lib/python3.10/site-packages/treetime/CLI_io.py", line 295, in create_auspice_json
    n_json["children"].append(node_to_json(c, n_json["node_attrs"]["div"]))
  File "/opt/homebrew/Caskroom/miniconda/base/envs/new/lib/python3.10/site-packages/treetime/CLI_io.py", line 280, in node_to_json
    j["branch_attrs"]["mutations"] = {"nuc": [f"{a}{pos+1}{d}" for a,pos,d in n.mutations if d in "ACGT-"]}
  File "/opt/homebrew/Caskroom/miniconda/base/envs/new/lib/python3.10/site-packages/treetime/treeanc.py", line 33, in mutations
    elif (not node.tt.reconstructed_tip_sequences) and node.name in node.tt.data.aln:
TypeError: argument of type 'NoneType' is not iterable

No pressure from me to fix, just flagging in case helpful.

@corneliusroemer
Copy link
Member

corneliusroemer commented Jul 28, 2023

Thanks for reporting! Would it be possible to provide the input/output files for easier debugging? That'd be fab! Never mind, this should be reproducible with example/test files ;)

I can reproduce in the treetime repo running:

 treetime --dates test/treetime_examples/data/ebola/ebola.metadata.csv --tree test/treetime_examples/data/ebola/ebola.nwk --sequence-length 1000

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 a pull request may close this issue.

2 participants