Closed Thomieh73 closed 5 years ago
Hey Thomas,
Thanks for pointing everything out.
As for the readme.
1) Thanks for spotting that. It should be *Codeml*.pl. Looks like the symbols are used for styling text and therefore need an escape character to be visible.
2) I'll check on that. If possible I'll update the metAl link, if that is not possible (which looks to be the case) I'll edit the repository to make the software easier to find. As for the inclusion of the executables in the tutorial, that was for a class module that used the tutorials. I'll address that after I address the link issue.
As for your issue.
What version of Dendropy are you using?
Sorry for the delay.
Andrew
Hi Andrew,
I installed on 20171107 dendropy with the following command: pip install --user -U dendropy
Checking the version with :
pip show dendropy
---
Metadata-Version: 1.1
Name: DendroPy
Version: 4.3.0
Summary: A Python library for phylogenetics and phylogenetic computing: reading, writing, simulation, processing and manipulation of phylogenetic trees (phylogenies) and characters.
Home-page: http://packages.python.org/DendroPy/
Author: Jeet Sukumaran and Mark T. Holder
Author-email: jeetsukumaran@gmail.com and mtholder@ku.edu
License: BSD
Location: /cluster/home/thhaverk/.local/lib/python2.7/site-packages
Requires: setuptools
Entry-points:
[distutils.commands]
Hey Thomas,
I was unable to replicate the error with that version Dendropy.
Could you run the following code and paste the output.
import sys
print sys.version_info
Hi Andrew,
I am running Vespa on HCP platform. So I have set-it up using the procedure to aquire a compute node, and then I loaded a module to set-up vespa with all the required software.
Next I rean the commands you requested in the python2 terminal (version 2.7.10) [GCC Intel(R) C++ gcc 4.4 mode] on linux2
import sys
print sys.version_info
Output :
sys.version_info(major=2, minor=7, micro=10, releaselevel='final', serial=0)
Hey Thomas,
From what I can tell. The error appears to occur when vespa imports Dendropy.
Dendropy then appears to check which version of python is being used:
if sys.version_info.major == 2
Which results in the following error:
AttributeError: 'tuple' object has no attribute 'major'
Major is used to define python 2 vs. python 3.
Reading over your last message, I'm not sure why Dendropy is returning an error, as your sys.version_info has the major attribute.
sys.version_info(major=2, minor=7, micro=10, releaselevel='final', serial=0)
Things that might be worth checking.
Open a python terminal and import dendropy. This is mostly to confirm the error.
Have you tried installing a python locally? For instance, downloading the newest version of python https://www.python.org/downloads/release/python-2714/ and try with that install. I often run python locally on HPC systems.
Hi Andrew I opened python and then did : import dendropy Results:
Python 2.7.10 (default, Jul 1 2015, 11:02:23)
[GCC Intel(R) C++ gcc 4.4 mode] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import dendropy
>>>
Nothing happened. Then I tried:
>>> from dendropy import Tree, TreeList
>>> tree1=Tree()
>>>
So next I tried something out of the back of the dendropy manual https://media.readthedocs.org/pdf/dendropy/latest/dendropy.pdf page 428 and 429.
At the normal bash prompt:
sumtrees.py
> that works.
Next in the vespa folder: VESPA_Tutorials/Section_1_9_2_infer_genetree/
sumtrees.py --min-clade-freq=0.95 --output-tree-filepath=results.tre MammalSpeciesTree.tre
output:
/==========================================================================\
| SumTrees |
| Phylogenetic Tree Summarization |
| Version 4.3.0 |
| By Jeet Sukumaran and Mark T. Holder |
| Using: DendroPy 4.3.0 |
+--------------------------------------------------------------------------+
| Citation |
| ~~~~~~~~ |
| If any stage of your work or analyses relies on code or programs from |
| this library, either directly or indirectly (e.g., through usage of your |
| own or third-party programs, pipelines, or toolkits which use, rely on, |
| incorporate, or are otherwise primarily derivative of code/programs in |
| this library), please cite: |
| |
| Sukumaran, J and MT Holder. 2010. DendroPy: a Python library for |
| phylogenetic computing. Bioinformatics 26: 1569-1571. |
| |
| Sukumaran, J and MT Holder. SumTrees: Phylogenetic Tree Summarization. |
| 4.3.0. Available at https://github.com/jeetsukumaran/DendroPy. |
| |
| Note that, in the interests of scientific reproducibility, you should |
| describe in the text of your publications not only the specific |
| version of the SumTrees program, but also the DendroPy library used in |
| your analysis. For your information, you are running DendroPy 4.3.0. |
\==========================================================================/
SumTrees: Trees to be read from 1 source(s):
SumTrees: - 'MammalSpeciesTree.tre'
Output file already exists: "results.tre"
Overwrite (y/N)? y
SumTrees: Running in serial mode
SumTrees: Analyzing: 'MammalSpeciesTree.tre'
SumTrees: 'MammalSpeciesTree.tre': tree at offset 0 (analyzing)
SumTrees: Analysis of source trees completed in: 0.005174 seconds
SumTrees: Total of 1 trees analyzed for summarization:
SumTrees: - All trees were treated as unweighted
SumTrees: - All trees were unrooted
SumTrees: - 22 unique taxa across all trees
SumTrees: - 42 unique splits out of a total of 42 splits
SumTrees: - 19 unique non-trivial splits counted out of a total of non-trivial
19 splits
SumTrees: Summarized onto consensus tree with minimum clade frequency
threshold of 0.95:
SumTrees: - Support values expressed as proportions or probabilities
SumTrees: - Edge lengths on target trees set to mean of edge lengths in
sources
SumTrees: - Support and other summarization annotations added to target trees
as metadata
SumTrees: Writing primary results to: 'results.tre'
SumTrees: Summarization completed
SumTrees: Started at: 2017-11-24 11:25:03.000735
SumTrees: Ended at: 2017-11-24 11:25:05.304592
SumTrees: Total elapsed time: 2.303857 seconds
SumTrees: Actual analysis time: 0.005174 seconds
This output suggests to me that dendropy is working on my system. I tried it both at the login node and after requiring a compute node at our cluster. Both worked fine.
I will check out it a local installation of python could work. with vespa
Hi Andrew, I should have come back earlier to solve this issue, but I could not. Now I am no longer working on this project so I here to close this issue.
Hi, I have set up VESPA on our HCP platform and by cloning the repository and now I have a few points I thought I should mention, but it may sound like I am nagging. And at the end of this comment I have one issue to overcome.
The points
1) In your readme you mention the file: Codeml.pl.
When I check the files, I see that Codeml.pl is absent from the repository. Is that correct? Has it been replaced or is it no longer needed?
2) Furthermore, in the manual 3rd party software is indicated but not all software is available online. metAL : Website is not accesible any longer, and original author is not reponsive on twitter.
So I tried to go through the tutorial without all software in place. Then Section_1_81 surprised me. There I find that metAl is part of the package. It is not clear from the manual that metAl is part of the package and that it is there. Deliberate choice?
The same with normD, also in the folder where metal was located. Nonetheless, I found a copy online, here: http://www.bork.embl.de/Docu/AQUA/latest/norMD1_3.tar.gz
The issue
It is great you made a tutorial to work through. Without it, this would be a lot harder to do and figure out. So I followed the tutorial step by step and started to understand the first bit of the pipeline.
I continued the tutorial until Phase 4: Section_1_9_2_infer_genetree and then got stuck.
I had checked that dendropy was correctly installed with the command:
python -m dendropy.test
That finished without any problems.When I run the command:
vespa.py infer_genetree -input=Map_Gaps_Reduced -species_tree=MammalSpeciesTree.tre
I get an error message:Traceback (most recent call last): File "/usit/abel/u1/thhaverk/tools/VESPA-master/vespa.py", line 2731, in <module> command_line() File "/usit/abel/u1/thhaverk/tools/VESPA-master/vespa.py", line 2714, in command_line vespa_infer_genetree(command_input) File "/usit/abel/u1/thhaverk/tools/VESPA-master/vespa.py", line 1024, in vespa_infer_genetree import dendropy, re, os, shutil File "/usit/abel/u1/thhaverk/.local/lib/python2.7/site-packages/dendropy/__init__.py", line 24, in <module> from dendropy.dataio.nexusprocessing import get_rooting_argument File "/usit/abel/u1/thhaverk/.local/lib/python2.7/site-packages/dendropy/dataio/__init__.py", line 20, in <module> from dendropy.dataio import newickreader File "/usit/abel/u1/thhaverk/.local/lib/python2.7/site-packages/dendropy/dataio/newickreader.py", line 27, in <module> from dendropy.utility.textprocessing import StringIO File "/usit/abel/u1/thhaverk/.local/lib/python2.7/site-packages/dendropy/utility/textprocessing.py", line 72, in <module> if sys.version_info.major == 2: AttributeError: 'tuple' object has no attribute 'major'
Seems like something is not going right here. I am running this on python2.7.10Any idea on how to solve this issue? Thomas