As discussed in https://github.com/katholt/srst2/issues/49 this PR allows you to specify the path to your samtools or bowtie executables using an environment variable. This is useful if you've got multiple versions of samtools installed on your cluster (for example).
As part of making this PR, I wrote some tests. If you would like these to me merged into master, I've made https://github.com/katholt/srst2/pull/51. It's probably not a great idea to merge both PRs, there would be conflicts.
If SRST2_SAMTOOLS is set and the path it is set to exists, it uses that executable. If not it looks for 'samtools' in your path
If SRST2_BOWTIE2 is set and the path it is set to exists, it uses that executable. If not it looks for 'bowtie2' in your path
If SRST2_BOWTIE2_BUILD is set and the path it is set to exists, it uses that executable. If SRST2_BOWTIE2 is ok, it appends '-build' to it's path and checks whether that exists. If neither of those exist then it looks for 'bowtie2-build' in your path
As discussed in https://github.com/katholt/srst2/issues/49 this PR allows you to specify the path to your samtools or bowtie executables using an environment variable. This is useful if you've got multiple versions of samtools installed on your cluster (for example).
As part of making this PR, I wrote some tests. If you would like these to me merged into master, I've made https://github.com/katholt/srst2/pull/51. It's probably not a great idea to merge both PRs, there would be conflicts.
I've tested the changes by running https://github.com/katholt/srst2/blob/master/example.txt; the output was https://gist.github.com/bewt85/70af411d276c22a53d8d
The behaviour is as follows:
Let me know if you've got any questions.
Ben