Hi Ross, Thank you for your reply. It still did not work. I think SGE knows the path of samtools. Here is a test case I added to Galaxy, and it creates the index for fasta file. I pasted the samtools faidx wrapper and xml files below: ubuntu@master:/mnt/galaxyTools/galaxy-dist/tools/samtools$ more samtools_faidx.pl #!/usr/bin/perl use strict; use warnings; if (@ARGV < 1) { die "Usage: perl $0 <input fasta file>\n"; } `samtools faidx $ARGV[0]`; `cp ${ARGV[0]}.fai $ARGV[1]`; exit; ubuntu@master:/mnt/galaxyTools/galaxy-dist/tools/samtools$ more samtools_faidx.xml <tool id="samtools_faidx" name="samtools faidx" version="1.0.3"> <requirements> <requirement type="package">samtools</requirement> </requirements> <description>creates fasta index</description> <command interpreter="perl"> samtools_faidx.pl $input1 $output1 </command> <inputs> <param name="input1" type="data" format="fasta" label="fasta file to be indexed" /> </inputs> <outputs> <data format="fai" name="output1" label="${tool.name} on ${on_string}: fasta" /> </outputs> </tool> It works, which shows that SGE knows the path of samtools. Cai --- 12年4月18日,周三, Ross <ross.lazarus@gmail.com> 写道:
发件人: Ross <ross.lazarus@gmail.com> 主题: Re: [galaxy-dev] Exception: Error Setting BAM Metadata: /bin/sh: samtools: not found 收件人: "zhengqiu cai" <caizhq2005@yahoo.com.cn> 抄送: "Jennifer Jackson" <jen@bx.psu.edu>, galaxy-dev@lists.bx.psu.edu 日期: 2012年4月18日,周三,上午5:18 Ah. Then you probably have a library path problem. Here's how we do it FWIW:
Assume your want your shared cluster apps in /data/apps/bin
To share the compiled libraries and binaries together, remember to compile apps like samtools using the --prefix /data/app flag so then you can add the /data/app/lib path to the galaxy user's path so the nodes running jobs inherit those paths because of the -V switch.
I hope this works!
Hi Ross,
Thank you for your reply. I tried it, and it was still not working. Only samtools has this problem, and the other tools works fine.
samtools was compiled from source correctly. If I install samtools using "sudo apt-get install samtools", this
On Tue, Apr 17, 2012 at 5:10 PM, zhengqiu cai <caizhq2005@yahoo.com.cn> wrote: problem is gone, but this is not a solution for since it does not work across the cluster.
Cai
--- 12年4月18日,周三, Ross <ross.lazarus@gmail.com>
写道:
发件人: Ross <ross.lazarus@gmail.com> 主题: Re: [galaxy-dev] Exception: Error Setting
收件人: "zhengqiu cai" <caizhq2005@yahoo.com.cn> 抄送: "Jennifer Jackson" <jen@bx.psu.edu>, galaxy-dev@lists.bx.psu.edu 日期: 2012年4月18日,周三,上午4:59 Cai - if you are using SGE you probably want to pass the Galaxy user's path to the job using the -V switch in the system wide (or Galaxy user's home
sge_request file
eg I have rlazarus@iaas1-int:~$ cat /var/lib/gridengine/default/common/sge_request -cwd -V
Without that switch, the job gets no path. With -V, it inherits the job submitter's full
On Tue, Apr 17, 2012 at 4:26 PM, zhengqiu cai
<caizhq2005@yahoo.com.cn>
Hi Jen,
Thank you for your quick response. I changed the env.sh file to what you seggested, and
wrote: the problem still existed.
I am pasting more details below:
I submitted a job to convert sam to bam, and
was running forever without outputing the result. I
checked the log, and it read:
Traceback (most recent call last): File
"/mnt/galaxyTools/galaxy-dist/lib/galaxy/jobs/runners/drmaa.py",
line 336, in finish_job
drm_job_state.job_wrapper.finish( stdout, stderr ) File
"/mnt/galaxyTools/galaxy-dist/lib/galaxy/jobs/__init__.py",
line 637, in finish
dataset.set_meta( overwrite = False ) File
"/mnt/galaxyTools/galaxy-dist/lib/galaxy/model/__init__.py",
line 875, in set_meta
return self.datatype.set_meta( self, **kwd ) File
"/mnt/galaxyTools/galaxy-dist/lib/galaxy/datatypes/binary.py",
line 179, in set_meta
raise Exception, "Error Setting BAM Metadata: %s" % stderr Exception: Error Setting BAM Metadata: /bin/sh: samtools: not found
It means that the samtools is not in the PATH. I tried to set the PATH in a couple of methods according
documentation:
1. put the path in the env.sh in the tool
symbolink default to the tool directory, e.g. default -> =/mnt/galaxyTools/tools/samtools/0.1.18
2. put -v PATH=/mnt/galaxyTools/tools/samtools/0.1.18 in ~/.sge_request 3. put -v PATH=/mnt/galaxyTools/tools/samtools/0.1.18 in /path/sge_request
none of them worked, and I got the above same
Then I checked the job log file in the
Samtools Version: 0.1.18 (r982:295) SAM file converted to BAM
which shows that sge knows the PATH of samtools. To double check it, I added samtools index to Galaxy, and it worked well. I am very confused why SGE knows the tool path but cannot run the job correctly.
The system I am using is ubuntu on EC2 (the image id is: ami-999d49f0, which is the one used by StarCluster). I checked out the code from galaxy-dist on bitbucket. Other tools such as bwa and bowtie worked well using the same setting method(put env.sh in the tools directory to set the tool path)
Thanks you very much,
Cai --- 12年4月18日,周三, Jennifer Jackson <jen@bx.psu.edu> 写道:
发件人: Jennifer Jackson <jen@bx.psu.edu> 主题: Re: [galaxy-dev] Exception: Error Setting BAM Metadata: /bin/sh: samtools: not found 收件人: "zhengqiu cai" <caizhq2005@yahoo.com.cn> 抄送: galaxy-dev@lists.bx.psu.edu 日期: 2012年4月18日,周三,上午2:12 Hi Cai,
Please double check that your env.sh file contains
job_working_directory, and it read: the
following:
PATH="/mnt/galaxyTools/tools/samtools/0.1.12:$PATH"
export PATH
http://wiki.g2.bx.psu.edu/Admin/Config/Tool%20Dependencies
Hopefully this helps,
Jen Galaxy team
On 4/16/12 12:43 PM, zhengqiu cai wrote:
Hi All,
I was trying to setup the Galaxy tool dependencies, and I met the following problem when running sam-to-bam in samtools: Traceback (most recent call last): File
"/mnt/galaxyTools/cai_galaxy-dist/lib/galaxy/jobs/runners/drmaa.py",
line 336, in finish_job
drm_job_state.job_wrapper.finish( stdout, stderr )
File
"/mnt/galaxyTools/cai_galaxy-dist/lib/galaxy/jobs/__init__.py",
line 637, in finish
dataset.set_meta( overwrite = False ) File
"/mnt/galaxyTools/cai_galaxy-dist/lib/galaxy/model/__init__.py",
line 875, in set_meta
return self.datatype.set_meta( self, **kwd ) File
"/mnt/galaxyTools/cai_galaxy-dist/lib/galaxy/datatypes/binary.py",
line 179, in set_meta
raise Exception, "Error Setting BAM Metadata: %s" % stderr Exception: Error Setting BAM Metadata: /bin/sh: samtools: not found
I already set the path of samtools Below I pasted how I set the path:
ubuntu@master:/mnt/galaxyTools/tools/samtools$ ll
total 8 drwxr-xr-x 4 ubuntu ubuntu 65 2012-04-16 19:09 ./ drwxr-xr-x 38 ubuntu ubuntu 4096 2012-04-16 18:41 ../ drwxr-xr-x 2 ubuntu ubuntu 53 2012-04-16 19:08 0.1.12/ drwxr-xr-x 2 ubuntu ubuntu 53 2012-04-13 20:23 0.1.7/ lrwxrwxrwx 1 ubuntu ubuntu 38 2012-04-16 19:09 default -> /mnt/galaxyTools/tools/samtools/0.1.12/
ubuntu@master:/mnt/galaxyTools/tools/samtools$ more default/env.sh
PATH=/mnt/galaxyTools/tools/samtools/0.1.12:$PATH
I used the same way to set other
BAM Metadata: /bin/sh: samtools: not found directory) path. the job then the Galaxy directory and problem. programs,
and bowtie, and they worked perfectly. Only samtools could not work.
I even used the full path of samtools in the wrapper file sam_to_bam.py, and it was not working neither.
I am wondering if any one met the same
such as bwa problem, or some
one can give me some hints.
Thank you very much.
Cai
Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at:
-- Jennifer Jackson http://galaxyproject.org
Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at:
-- Ross Lazarus MBBS MPH; Associate Professor, Harvard Medical School; Head, Medical Bioinformatics, BakerIDI; Tel: +61 385321444;
-- Ross Lazarus MBBS MPH; Associate Professor, Harvard Medical School; Head, Medical Bioinformatics, BakerIDI; Tel: +61 385321444;