Closed pilpel-lab closed 5 years ago
thanks for reaching out. regarding your issues:
running
treetime ancestral --aln aln.fasta --tree phyliptree.phy
parses both alignment and tree ok, but the taxon names don't match sequence names in the alignment:
\:> treetime ancestral --aln aln.fasta --tree phyliptree.phy
0.00 -TreeAnc: set-up
0.04 ***WARNING: TreeAnc._attach_sequences_to_nodes: NO SEQUENCE FOR LEAF: Oryctolagus cuniculus
0.04 ***WARNING: TreeAnc._attach_sequences_to_nodes: NO SEQUENCE FOR LEAF: Ochotona princeps
0.04 ***WARNING: TreeAnc._attach_sequences_to_nodes: NO SEQUENCE FOR LEAF: Nannospalax galili
0.04 ***WARNING: TreeAnc._attach_sequences_to_nodes: NO SEQUENCE FOR LEAF: Fukomys damarensis
0.04 ***WARNING: TreeAnc._attach_sequences_to_nodes: NO SEQUENCE FOR LEAF: Jaculus jaculus
0.04 ERROR: At least 30\% terminal nodes cannot be assigned with a sequence!
The same problem is encountered when using new_tree.nwk
:
\:> treetime ancestral --aln aln.fasta --tree new_tree.nwk
0.00 -TreeAnc: set-up
0.04 ***WARNING: TreeAnc._attach_sequences_to_nodes: NO SEQUENCE FOR LEAF: 9986
0.04 ***WARNING: TreeAnc._attach_sequences_to_nodes: NO SEQUENCE FOR LEAF: 9978
0.04 ***WARNING: TreeAnc._attach_sequences_to_nodes: NO SEQUENCE FOR LEAF: 10020
0.04 ***WARNING: TreeAnc._attach_sequences_to_nodes: NO SEQUENCE FOR LEAF: 43179
0.04 ***WARNING: TreeAnc._attach_sequences_to_nodes: NO SEQUENCE FOR LEAF: 885580
0.05 ERROR: At least 30\% terminal nodes cannot be assigned with a sequence!
here, the issue is that your sequence names are of the form
>10181_0:002977
where the taxon names are only 10181_0
.
You need to make sure taxon names match sequence names (colons are not admissible in nwk anyway). Your phylip
alignment is not correctly parsed by biopython:
In [1]: from Bio import AlignIO
In [2]: AlignIO.read('aln.phylip', 'phylip-relaxed')
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-2-211a42c6215e> in <module>()
----> 1 AlignIO.read('aln.phylip', 'phylip-relaxed')
Thanks for the quick reply, it worked great!
Hey, We're Trying to import a tree using treeAnc. We've encountered several issues:
We'd be happy for advice regarding the alignment file. All files are attached. treeTime_files.zip
Thanks, Omer and Alisa, Pilpel lab