grenaud / gargammel

gargammel is an ancient DNA simulator
GNU General Public License v3.0
25 stars 15 forks source link

'ms2chromosomes.py' can't find 'ms' program #13

Closed baif666 closed 3 years ago

baif666 commented 3 years ago

Hi,

I install gargammel using conda as you suggested (conda env create -f environment.yml) but after I activated the environment 'ms2chromosomes.py' can't find 'ms' program :

$ python ../ms2chromosomes.py  -s 0.2 -f . -n 1000
Detecting program: ms
Cannot find program: ms please make sure it is installed

But if I run 'type ms', it gives the right result :

$ type ms
ms is /home/xxxxx/anaconda3/envs/gargammel/bin/ms

What's the problem?

baif666 commented 3 years ago

The problem is /bin/bash -i -c 'type ms' can't find the right path of 'ms' program.

$ /bin/bash -i -c 'type ms'
bash: type: ms: not found

But which ms work well. Could we modify the code of which() function to use which command?

grenaud commented 3 years ago

you use conda? could you put it as hard path in the script?

baif666 commented 3 years ago

Yes, hard path also works

baif666 commented 3 years ago

Do we need to change it or just use the hard path? I will submit a pull request to modify it later.

grenaud commented 3 years ago

I would just hardcode it in the perl script and remove the error detection.

baif666 commented 3 years ago

ok thanks!