Jan-15-2020, 12:59 PM
Hi all,
I am new to this forum as well as python, and would be grateful for any help. I am working with a tree for my analyses and it does not seem to be in Newick format. I am not sure if this could be the reason for the error. I have run the 1st 2 commands below without any problems:
I am new to this forum as well as python, and would be grateful for any help. I am working with a tree for my analyses and it does not seem to be in Newick format. I am not sure if this could be the reason for the error. I have run the 1st 2 commands below without any problems:
tree_dir = abspath('/home/allio/Documents/Zach_Master/Q2-all-gut-skin-oral/trees/') host_tree_fp = 'MamPhy_fullPosterior_BDvr_Completed_5911sp_topoCons_NDexp_MCC_v2_target.tre'However, when I run the command below:
host_tree = sk.TreeNode.read(join(tree_dir, host_tree_fp), convert_underscores=False)I receive the error message:
Error:Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/allio/bin/anaconda2/envs/qiime2-2019.7/lib/python3.6/site-packages/skbio/io/registry.py", line 652, in read
return registry.read(file, into=cls, format=format, **kwargs)
File "/home/allio/bin/anaconda2/envs/qiime2-2019.7/lib/python3.6/site-packages/skbio/io/registry.py", line 513, in read
return self._read_ret(file, format, into, verify, kwargs)
File "/home/allio/bin/anaconda2/envs/qiime2-2019.7/lib/python3.6/site-packages/skbio/io/registry.py", line 519, in _read_ret
io_kwargs)
File "/home/allio/bin/anaconda2/envs/qiime2-2019.7/lib/python3.6/site-packages/skbio/io/registry.py", line 539, in _init_reader
fmt, skwargs = self.sniff(file, **io_kwargs)
File "/home/allio/bin/anaconda2/envs/qiime2-2019.7/lib/python3.6/site-packages/skbio/io/registry.py", line 431, in sniff
% file)
skbio.io._exception.UnrecognizedFormatError: Could not detect the format of <_io.BufferedReader name='/home/allio/Documents/Zach_Master/Q2-all-gut-skin-oral/trees/MamPhy_fullPosterior_BDvr_Completed_5911sp_topoCons_NDexp_MCC_v2_target.tre'>
Why is this occurring, and what are the possible solutions to this? Cheers!