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 problem is gone, but this is not a solution for 
since it does not work across the cluster.


Cai

--- 12年4月18日,周三, Ross <ross.laza...@gmail.com> 写道:

> 发件人: Ross <ross.laza...@gmail.com>
> 主题: Re: [galaxy-dev] Exception: Error Setting BAM Metadata: /bin/sh: 
> samtools: not found
> 收件人: "zhengqiu cai" <caizhq2...@yahoo.com.cn>
> 抄送: "Jennifer Jackson" <j...@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 directory)
> 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 path.
> 
> On Tue, Apr 17, 2012 at 4:26 PM, zhengqiu cai <caizhq2...@yahoo.com.cn>
> wrote:
> > Hi Jen,
> >
> > Thank you for your quick response.
> > I changed the env.sh file to what you seggested, and
> the problem still existed.
> > I am pasting more details below:
> >
> > I submitted a job to convert sam to bam, and the job
> was running forever without outputing the result. I then
> 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 the Galaxy
> documentation:
> > 1. put the path in the env.sh in the tool directory and
> 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 problem.
> >
> > Then I checked the job log file in the
> job_working_directory, and it read:
> > 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 <j...@bx.psu.edu>
> 写道:
> >
> >> 发件人: Jennifer Jackson <j...@bx.psu.edu>
> >> 主题: Re: [galaxy-dev] Exception: Error Setting
> BAM Metadata: /bin/sh: samtools: not found
> >> 收件人: "zhengqiu cai" <caizhq2...@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
> 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 programs,
> such as bwa
> >> 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
> 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:
> >> >
> >> >    http://lists.bx.psu.edu/
> >>
> >> --
> >> 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:
> >
> >  http://lists.bx.psu.edu/
> 
> 
> 
> -- 
> Ross Lazarus MBBS MPH;
> Associate Professor, Harvard Medical School;
> Head, Medical Bioinformatics, BakerIDI; Tel: +61 385321444;
> 

___________________________________________________________
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:

  http://lists.bx.psu.edu/

Reply via email to