brentp / goleft

goleft is a collection of bioinformatics tools distributed under MIT license in a single static binary
MIT License
216 stars 25 forks source link

call to unintended version of samtools #35

Closed biocyberman closed 7 years ago

biocyberman commented 7 years ago

Testing goleft on Ubuntu 16.04 under zsh shell 5.1.1.

I was very confused with this error:

depth: invalid option -- 'd'
open: No such file or directory
depth: invalid option -- 'd'
open: No such file or directory
ERROR with command: Command('echo 'chrM:1-16571'; samtools depth -Q 1 -d 2500 -r 'chrM:1-16571' '/data/...', , stdout[:20]: '/data/', exit-code: -1, error: signal: segmentation fault (core dumped), run-time: 1.616101091s)

Some checking I found out that I have serveral versions of samtools lying around with various paths. I want to run goleft with a lastest samtools from bioconda as following:

export PATH="/path/to/bionconda/samtools:$PATH".
then call goleft. 

Goleft, however, does not know about the samtools in "/path/to/bioconda/samtools". It keeps using samtools in /usr/local/bin. When I removed the samtools in /usr/local/bin, it then uses the one in /usr/bin. I had to remove all other old version of samtools.

Should there be an option to specify full samtools path?

brentp commented 7 years ago

it will obey your $PATH. so something must be wrong with your export.