Thanks to visit codestin.com
Credit goes to github.com

Skip to content

New crash when running without alignment #250

@theosanderson

Description

@theosanderson

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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions