katholt / srst2

Short Read Sequence Typing for Bacterial Pathogens
Other
125 stars 65 forks source link

SRST2 installation problem with multiple Bowtie versions #53

Open patms opened 8 years ago

patms commented 8 years ago

Hi,

I saw your paper and I'm really interested in what SRST2 can do. I've just installed srsts2 following the installation instructions on https://github.com/katholt/srst2.

By default, install all programs in /usr/local. I already had samtools v1.2 and bowtie 2.2.5 in this directory before installing srst2. So, I downloaded and installed bowtie2 2.2.4 and samtools 0.1.18 in the same directory (/usr/local/) before installing srst2. During srst2 installation i did the test if the programs were installed properly and it was OK. I established the export SRST2_SAMTOOLS=/usr/local/samtools-0.1.18/ export SRST2_BOWTIE2=/usr/local/bowti2-2.2.4/bowtie2 export SRST2_BOWTIE2_BUILD=/usr/local/bowti2-2.2.4/bowtie2-build

I then tried to do a test of the tool using the example.txt. When i run the command sudo /usr/local/bin/srst2 --input_pe ERR024070_1.fastq.gz ERR024070_2.fastq.gz --output shigella1 --log --save_scores --mlst_db Escherichia_coli#1.fasta --mlst_definitions ecoli.txt --gene_db ARGannot.fasta

I only get the shigella1.log and when I look at the log this is what I see ($ gedit shigella1.log):

01/15/2016 12:21:15 program started 01/15/2016 12:21:15 command line: /usr/local/bin/srst2 --input_pe ERR024070_1.fastq.gz ERR024070_2.fastq.gz --output shigella1 --log --save_scores --mlst_db Escherichia_coli#1.fasta --mlst_definitions ecoli.txt --gene_db ARGannot.fasta 01/15/2016 12:21:15 Total paired readsets found:1 01/15/2016 12:21:15 Failed command: bowtie2 --version 01/15/2016 12:21:15 [Errno 2] No such file or directory 01/15/2016 12:21:15 Could not determine the version of bowtie. 01/15/2016 12:21:15 Do you have bowtie installed in your PATH?

I'm a newbie in bioinformatics (using the command line) so the "bug" must be very simple but I don't see how to solve it...

Perhaps this info is also useful : when I installed bowtie2 2.2.5 I also defined it on my PATH : export BT2_HOME=/usr/local/bowtie2-2.2.5/

Could this create a conflict?

Any help will be welcomed !:-)

Thanks in advance for you answer/advices.

Sincerely, P

jb2cool commented 6 years ago

Try dropping the sudo from your command.

I believe sudo runs as root so if something is in your $PATH then it may not be in the sudo $PATH. A way I get about things like this is to put a symbolic link to botwtie and bowtie-build in something like /usr/bin where the sudo user will be looking.