Hello all,
I am getting started with the Augur and currently building a phylogenetic tree on ncov. According to tutorial web Augur: A bioinformatics toolkit for phylogenetic analysis — Augur documentation, I have built a tree newick file and am going to refine it and acquire the time tree file. However, many times as I tried there is an Error always accured that is " AttributeError: ‘NoneType’ object has no attribute ‘shape’ ".
The following lines are the augur command line be input and the specific of the error:
$ augur refine -a gisaid_hcov-19_2021_02_26_02_rename_edit_filted_align.fasta
-t gisaid_hcov-19_2021_02_26_02_rename_edit_filted_align.tree
–metadata gisaid_hcov-19_2021_02_26_02_matadata_sorted.tsv
–output-tree gisaid_hcov-19_2021_02_26_02_rename_edit_filted_align_refine.tree
–output-node-data gisaid_hcov-19_2021_02_26_02_rename_edit_filted_align_nodedata
–timetree
–coalescent float
–date-confidence
–vcf-reference EPI_ISL_402125.fasta
augur refine is using TreeTime version 0.8.1
13.20 ***WARNING: TreeAnc._attach_sequences_to_nodes: NO SEQUENCE FOR LEAF:
hCoV-19/Lu_an/101/2020
15.32 ***WARNING: TreeAnc._attach_sequences_to_nodes: NO SEQUENCE FOR LEAF:
hCoV-19/Lu_an/339/2020
15.33 ***WARNING: TreeAnc._attach_sequences_to_nodes: NO SEQUENCE FOR LEAF:
hCoV-19/Lu_an/226/2020
15.34 ***WARNING: TreeAnc._attach_sequences_to_nodes: NO SEQUENCE FOR LEAF:
hCoV-19/Lu_an/98/2020
15.36 ***WARNING: TreeAnc._attach_sequences_to_nodes: NO SEQUENCE FOR LEAF:
hCoV-19/Lu_an/295/2020
15.37 ***WARNING: TreeAnc._attach_sequences_to_nodes: NO SEQUENCE FOR LEAF:
hCoV-19/Lu_an/29/2020
15.38 ***WARNING: TreeAnc._attach_sequences_to_nodes: NO SEQUENCE FOR LEAF:
hCoV-19/Lu_an/30/2020
15.39 ***WARNING: TreeAnc._attach_sequences_to_nodes: NO SEQUENCE FOR LEAF:
hCoV-19/Lu_an/99/2020
15.40 ***WARNING: TreeAnc._attach_sequences_to_nodes: NO SEQUENCE FOR LEAF:
hCoV-19/Lu_an/08/2020
15.41 ***WARNING: TreeAnc._attach_sequences_to_nodes: NO SEQUENCE FOR LEAF:
hCoV-19/Lu_an/32/2020
15.43 ***WARNING: TreeAnc._attach_sequences_to_nodes: NO SEQUENCE FOR LEAF:
hCoV-19/Lu_an/68/2020
15.44 ***WARNING: TreeAnc._attach_sequences_to_nodes: NO SEQUENCE FOR LEAF:
hCoV-19/Lu_an/33/2020
15.45 ***WARNING: TreeAnc._attach_sequences_to_nodes: NO SEQUENCE FOR LEAF:
hCoV-19/Lu_an/03/2020
15.46 ***WARNING: TreeAnc._attach_sequences_to_nodes: NO SEQUENCE FOR LEAF:
hCoV-19/Lu_an/319/2020
15.47 ***WARNING: TreeAnc._attach_sequences_to_nodes: NO SEQUENCE FOR LEAF:
hCoV-19/Lu_an/49/2020
15.49 ***WARNING: TreeAnc: 15 nodes don’t have a matching sequence in the
alignment. POSSIBLE ERROR.
17.06 WARNING: Previous versions of TreeTime (<0.7.0) RECONSTRUCTED sequences of
tips at positions with AMBIGUOUS bases. This resulted in unexpected
behavior is some cases and is no longer done by default. If you want to
replace those ambiguous sites with their most likely state, rerun with
reconstruct_tip_states=True
or --reconstruct-tip-states
.
Traceback (most recent call last):
File “/home/yt5266/miniconda3/envs/nextstrain/bin/augur”, line 8, in
sys.exit(main())
File “/home/yt5266/miniconda3/envs/nextstrain/lib/python3.6/site-packages/augur/main.py”, line 10, in main
return augur.run( argv[1:] )
File “/home/yt5266/miniconda3/envs/nextstrain/lib/python3.6/site-packages/augur/init.py”, line 75, in run
return args.command.run(args)
File “/home/yt5266/miniconda3/envs/nextstrain/lib/python3.6/site-packages/augur/refine.py”, line 214, in run
covariance=args.covariance, resolve_polytomies=(not args.keep_polytomies))
File “/home/yt5266/miniconda3/envs/nextstrain/lib/python3.6/site-packages/augur/refine.py”, line 70, in refine
vary_rate=vary_rate, use_covariation=covariance, **kwarks)
File “/home/yt5266/miniconda3/envs/nextstrain/lib/python3.6/site-packages/treetime/treetime.py”, line 156, in run
max_iter=1, prune_short=True, **seq_kwargs)
File “/home/yt5266/miniconda3/envs/nextstrain/lib/python3.6/site-packages/treetime/treeanc.py”, line 1305, in optimize_tree
self.optimize_branch_len(verbose=0, store_old=False, mode=branch_length_mode)
File “/home/yt5266/miniconda3/envs/nextstrain/lib/python3.6/site-packages/treetime/treeanc.py”, line 1074, in optimize_branch_len
return self.optimize_branch_lengths_joint(**kwargs)
File “/home/yt5266/miniconda3/envs/nextstrain/lib/python3.6/site-packages/treetime/treeanc.py”, line 1117, in optimize_branch_lengths_joint
new_len = max(0,self.optimal_branch_length(node))
File “/home/yt5266/miniconda3/envs/nextstrain/lib/python3.6/site-packages/treetime/treeanc.py”, line 1158, in optimal_branch_length
self.add_branch_state(node)
File “/home/yt5266/miniconda3/envs/nextstrain/lib/python3.6/site-packages/treetime/treeanc.py”, line 1065, in add_branch_state
ignore_gaps = self.ignore_gaps)
File “/home/yt5266/miniconda3/envs/nextstrain/lib/python3.6/site-packages/treetime/gtr.py”, line 606, in state_pair
if seq_ch.shape != seq_p.shape:
AttributeError: ‘NoneType’ object has no attribute ‘shape’
I have tried to delete the input of “–treetime” and the Error doesn’t appear. However the tree file with according time is exactly what I want thus I have to run with it.
May anyone show me how to fix it out? Many appreciate and thanks!
Yuntian Bai