sate-dev / sate-core

3 stars 3 forks source link

Problem while executing $ python2 run_sate.py incompatibility with current version of dendropy #38

Closed kibet-gilbert closed 5 years ago

kibet-gilbert commented 6 years ago

I running on Ubuntu 18.04 lts on 64 bit desktop Did as follows:

$ python2 run_sate.py Traceback (most recent call last): File "run_sate.py", line 27, in from sate.mainsate import sate_main File "/home/kibet/Downloads/satesrc-v2.2.7-2013Feb15/sate-core/sate/mainsate.py", line 37, in from sate.satejob import * File "/home/kibet/Downloads/satesrc-v2.2.7-2013Feb15/sate-core/sate/satejob.py", line 34, in from sate.treeholder import TreeHolder, resolve_polytomies File "/home/kibet/Downloads/satesrc-v2.2.7-2013Feb15/sate-core/sate/treeholder.py", line 26, in from sate.tree import PhylogeneticTree File "/home/kibet/Downloads/satesrc-v2.2.7-2013Feb15/sate-core/sate/tree.py", line 25, in from dendropy import convert_node_to_root_polytomy ImportError: cannot import name convert_node_to_root_polytomy

So I applied this fix on /satesrc-v2.2.7-2013Feb15/sate-core/sate/tree.py: Hacks to move to dendropy 4 #13 But got this error:

$ python2 run_sate.py Traceback (most recent call last): File "run_sate.py", line 27, in from sate.mainsate import sate_main File "/home/kibet/Downloads/satesrc-v2.2.7-2013Feb15/sate-core/sate/mainsate.py", line 37, in from sate.satejob import * File "/home/kibet/Downloads/satesrc-v2.2.7-2013Feb15/sate-core/sate/satejob.py", line 34, in from sate.treeholder import TreeHolder, resolve_polytomies File "/home/kibet/Downloads/satesrc-v2.2.7-2013Feb15/sate-core/sate/treeholder.py", line 35, in from dendropy.treesplit import delete_outdegree_one ImportError: No module named treesplit

my enviroment looks like:

$ conda list # packages in environment at /home/kibet/bioinformatics/anaconda3/envs/sate_env: # # Name Version Build Channel ca-certificates 2018.10.15 ha4d7672_0 conda-forge certifi 2018.10.15 py27_1000 conda-forge dendropy 3.12.3 py_1 bioconda libffi 3.2.1 hfc679d8_5 conda-forge libgcc-ng 7.2.0 hdf63c60_3 conda-forge libstdcxx-ng 7.2.0 hdf63c60_3 conda-forge ncurses 6.1 hfc679d8_1 conda-forge openssl 1.0.2p h470a237_1 conda-forge pip 18.1 py27_1000 conda-forge python 2.7.15 h33da82c_4 conda-forge readline 7.0 haf1bffa_1 conda-forge setuptools 40.6.2 py27_0 conda-forge sqlite 3.25.3 hb1c47c0_0 conda-forge tk 8.6.8 ha92aebf_0 conda-forge wheel 0.32.2 py27_0 conda-forge zlib 1.2.11 h470a237_3 conda-forge

This looks like the only solution I can pursue is: Install SATe locally that suggests i use an older version, probably Release 3.12.0 of 17 Jul 2012 in Releases

But I don't how to do this given that i am installing SATe from source code satesrc-v2.2.7-2013Feb15.tar.gz in Archived bundles of SATé

Can i install dendropy Release 3.12.0 in my conda environment sate_env? if so and how can i do this? (Release 3.12.0 is not available in any anaconda channels.) Eitherway, I need SATe and how else can i install it?

smirarab commented 5 years ago

Hi Kibet,

Any luck with this yet? If not, I can take another look. For PASTA, there are several changes that can be seen here:

https://github.com/smirarab/sepp/commit/e4b47531ed5b57fd875c90f08d4a434b7cce1cb5

Similar changes need to happen for SATe.

smirarab commented 5 years ago

Sorry, wrong references. Here are the right ones for PASTA:

https://github.com/smirarab/pasta/commit/08e11e5cf125286ed54e6730f322746b788f7f92

and

https://github.com/smirarab/pasta/commit/57b80e0d99c2bf66bbf3585b38e012e18acd0e30

and

https://github.com/smirarab/pasta/commit/30a0cccad95c9298e6ed3389d2e908380a8ba30d

kibet-gilbert commented 5 years ago

Thank you so much....adapted the suggested changes to the sate/tree.py and sate/treeholder.py and it seems to work now. Just a format issue about input files:

$ python2 run_sate.py ~/bioinformatics/github/co1_metaanalysis/Data/COI_test_data.fasta SATe ERROR: SATe is exiting because of an error: The file "/home/kibet/bioinformatics/github/co1_metaanalysis/Data/COI_test_data.fasta" does not appear to be a valid configuration file format. It lacks section headers.

Truly thank you and sorry for the late reply,....I was unwell for some time.

mtholder commented 5 years ago

Hi I'm sorry that I haven't had time to look into this issue (and I hope that your health has improved). I'm glad that the issue got sorted out. I think the last error that you seen is the result of needing the -i flag before the filename:

python2 run_sate.py -i ~/bioinformatics/github/co1_metaanalysis/Data/COI_test_data.fasta
lalalagartija commented 4 years ago

Hi, I had the same issue and resolved it with https://github.com/smirarab/pasta/commit/57b80e0d99c2bf66bbf3585b38e012e18acd0e30 But now I get another error :

python2 ../run_sate.py -i test/data/small.fasta

SATe INFO: Configuration written to "/.../satesrc-v2.2.7-2013Feb15/sate-core/sate/test/data/satejob8_temp_sate_config.txt".

SATe INFO: Reading input sequences from 'test/data/small.fasta'... SATe ERROR: SATe is exiting because of an error: Error reading file: read() takes exactly 1 argument (4 given)

And I don't know where it comes from

Edit : I actually opened a separate issue : https://github.com/sate-dev/sate-core/issues/39