Re: [galaxy-dev] Creating R galaxy wrapper where a function checks file extension

2015-10-02 Thread Martin Vickers

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Peter,

That's great, worked perfectly.

Thank you very much,

Martin

On 10/02/2015 11:26 AM, Peter Cock wrote:
> If you have a wrapper script, then you can do it there.
>
> It is also possible in the XML directly by building a composite
> command with && separators (which must be escaped as
>  or using CDATA), e.g.
>
>
https://github.com/galaxyproject/tools-devteam/blob/master/tools/samtool_filter2/samtool_filter2.xml
> (nice BAM and BAI example)
>
>
https://github.com/galaxyproject/tools-devteam/blob/master/tools/freebayes/freebayes.xml
> (does a lot of symlinks)
>
>
https://github.com/galaxyproject/tools-iuc/blob/master/tools/bedtools/multiCov.xml
> (part of a for loop for multiple BAM and BAI files)
>
> Note you can't use  in this
> style as the first command is the shell command ln.
>
> Peter
>
>
> On Fri, Oct 2, 2015 at 11:17 AM, Martin Vickers  wrote:
>>
> Hi Peter,
>
> Thanks for the reply. Are there any examples of this in action? Is it done
> in the xml wrapper somewhere or do I need to write a script that does this
> and then call the Rscript?
>
> Cheers,
>
> Martin
>
> On 10/02/2015 11:13 AM, Peter Cock wrote:
> >>> Creating symlinks with normal extensions is a common
> >>> approach here where the Galaxy filenames won't work.
> >>>
> >>> Peter
> >>>
> >>> On Fri, Oct 2, 2015 at 10:57 AM, Martin Vickers 
wrote:
> 
> >>> Hi all,
> >>>
> >>> I've been tasked with getting someone's R script working in our galaxy
> >>> installation and I'm struggling to resolve an issue with an
bioconductor
> >>> function that appears to not like the galaxy naming convention (e.g.
> >>> dataset_2.dat) for the bam index file.
> >>>
> >>> The R script can run from the command line like this;
> >>>
> >>> Rscript script.R input1.xls alignment.bam alignment.bai p
> >>>
> >>> so I have created a wrapper using planemo that does this, and
that's fine.
> >>>
> >>> The problem is, when I run the script in galaxy, I get the
following error
> >>> from R;
> >>>
> >>> Error in value[[3L]](cond) :
> >>> failed to open BamFile: failed to load BAM index
> >>> file: /tmp/tmpdP2eBC/files/000/dataset_3.dat
> >>> Calls: f_oGRSeparateStrands ... tryCatch -> tryCatchList ->
tryCatchOne ->
> >>> 
> >>> In addition: Warning messages:
> >>> In doTryCatch(return(expr), name, parentenv, handler) :
> >>> [bam_index_load] fail to load BAM index.
> >>> Execution halted
> >>>
> >>> The function that reads the bam + bai file in the script is;
> >>>
> >>> bam = readGAlignments(file=bam.file, index=bai.file,
> >>> param=ScanBamParam(which=gr.signal))
> >>>
> >>>
http://www.rdocumentation.org/packages/GenomicRanges/html/GAlignments.html
> >>>
> >>> In the documentation for this function it states the following;
> >>>
> >>> "file, index, The path to the BAM file to read, and to the index
file of
> >>> the
> >>> BAM file to read, respectively. The latter is given /without/ the
'.bai'
> >>> extension. See |scanBam
> >>>
|
> >>> for more information."
> >>>
> >>> I've played around with this a little and from the command line
I've been
> >>> successfully able to run the script to completion when the input
bam file
> >>> and bai are completely different names;
> >>>
> >>> e.g.
> >>>
> >>> Rscript script.R input1.xls something.bam meh.bai p
> >>>
> >>> but I can't run it if I change the extension, e.g.
> >>>
> >>> Rscript script.R input1.xls something.dat meh.dat p
> >>> Error in value[[3L]](cond) :
> >>>
> >>> failed to open BamFile: failed to load BAM index
> >>> file: /tmp/tmpdP2eBC/files/000/dataset_3.dat
> >>> Calls: f_oGRSeparateStrands ... tryCatch -> tryCatchList ->
tryCatchOne ->
> >>> 
> >>> In addition: Warning messages:
> >>> In doTryCatch(return(expr), name, parentenv, handler) :
> >>> [bam_index_load] fail to load BAM index.
> >>> Execution halted
> >>>
> >>>
> >>> Does anyone have any experience of resolving this kind of issue?
> >>>
> >>>
> 
> 
>  ___
>  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:
>    https://lists.galaxyproject.org/
> 
>  To search Galaxy mailing lists use the unified search at:
>    http://galaxyproject.org/search/mailinglists/
>
>>

- -- 

- --
Dr. Martin Vickers

Data Manager/HPC Systems Administrator
Institute of Biological, Environmental and Rural Sciences
IBERS New Building
Aberystwyth University
SY23 3FG

w: http://www.martin-vickers.co.uk/
e: mj...@aber.ac.uk
t: 01970 62 2807
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.14 (GNU/Linux)

iQEcBAEBAgAGBQJWDnpKAAoJEHa0a8GkKQgIKwgH/0U7reSPcg/45xhMgoqd3XBT
kLYiIvg1zufLLw2CEYxci/LD2ZdwvqI+Df3BrsTJgpT3tQxjOWsEHzVkVZfkcS+3

Re: [galaxy-dev] Creating R galaxy wrapper where a function checks file extension

2015-10-02 Thread Peter Cock
Creating symlinks with normal extensions is a common
approach here where the Galaxy filenames won't work.

Peter

On Fri, Oct 2, 2015 at 10:57 AM, Martin Vickers  wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi all,
>
> I've been tasked with getting someone's R script working in our galaxy
> installation and I'm struggling to resolve an issue with an bioconductor
> function that appears to not like the galaxy naming convention (e.g.
> dataset_2.dat) for the bam index file.
>
> The R script can run from the command line like this;
>
> Rscript script.R input1.xls alignment.bam alignment.bai p
>
> so I have created a wrapper using planemo that does this, and that's fine.
>
> The problem is, when I run the script in galaxy, I get the following error
> from R;
>
> Error in value[[3L]](cond) :
> failed to open BamFile: failed to load BAM index
> file: /tmp/tmpdP2eBC/files/000/dataset_3.dat
> Calls: f_oGRSeparateStrands ... tryCatch -> tryCatchList -> tryCatchOne ->
> 
> In addition: Warning messages:
> In doTryCatch(return(expr), name, parentenv, handler) :
> [bam_index_load] fail to load BAM index.
> Execution halted
>
> The function that reads the bam + bai file in the script is;
>
> bam = readGAlignments(file=bam.file, index=bai.file,
> param=ScanBamParam(which=gr.signal))
>
> http://www.rdocumentation.org/packages/GenomicRanges/html/GAlignments.html
>
> In the documentation for this function it states the following;
>
> "file, index, The path to the BAM file to read, and to the index file of the
> BAM file to read, respectively. The latter is given /without/ the '.bai'
> extension. See |scanBam
> |
> for more information."
>
> I've played around with this a little and from the command line I've been
> successfully able to run the script to completion when the input bam file
> and bai are completely different names;
>
> e.g.
>
> Rscript script.R input1.xls something.bam meh.bai p
>
> but I can't run it if I change the extension, e.g.
>
> Rscript script.R input1.xls something.dat meh.dat p
> Error in value[[3L]](cond) :
>
> failed to open BamFile: failed to load BAM index
> file: /tmp/tmpdP2eBC/files/000/dataset_3.dat
> Calls: f_oGRSeparateStrands ... tryCatch -> tryCatchList -> tryCatchOne ->
> 
> In addition: Warning messages:
> In doTryCatch(return(expr), name, parentenv, handler) :
> [bam_index_load] fail to load BAM index.
> Execution halted
>
>
> Does anyone have any experience of resolving this kind of issue?
>
>
> - --
>
> - --
> Dr. Martin Vickers
>
> Data Manager/HPC Systems Administrator
> Institute of Biological, Environmental and Rural Sciences
> IBERS New Building
> Aberystwyth University
> SY23 3FG
>
> w: http://www.martin-vickers.co.uk/
> e: mj...@aber.ac.uk
> t: 01970 62 2807
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v2.0.14 (GNU/Linux)
>
> iQEcBAEBAgAGBQJWDlUgAAoJEHa0a8GkKQgIpUcIAK9OZ9402FRaROF89b6bO1CY
> d+KP/X0NCxY+AXEddU3lhXi8O9haaKRA/pmxsGyydP0VQfaCrSSlS9nzhncG6Zav
> gpXe5NjFkwe8a/qaZTVf0YjlYq0sI81S7QAJnzlKXvYSjcz1xNDE9O4qSHqdhefX
> oI6GWmR+vHi7CTqNuHwpyY9Qoafd5nls0oQoCYDh9YWrn9GZ8fe1qQ9W7iUli/oT
> dPMYwWs0OL8NfSCuIcz2Dbr1XMt+o5HpQY/afoGWaq3zz5Ie0NhCLKz34bFps3IW
> 8K0DEROmCTxsXBa54gnnkhVgCI3zkfFCfa47xp13vT2dJALdzYoT6vDj8aC/mes=
> =ijgr
> -END PGP SIGNATURE-
>
>
> ___
> 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:
>   https://lists.galaxyproject.org/
>
> To search Galaxy mailing lists use the unified search at:
>   http://galaxyproject.org/search/mailinglists/
___
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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

Re: [galaxy-dev] Creating R galaxy wrapper where a function checks file extension

2015-10-02 Thread Peter Cock
If you have a wrapper script, then you can do it there.

It is also possible in the XML directly by building a composite
command with && separators (which must be escaped as
 or using CDATA), e.g.

https://github.com/galaxyproject/tools-devteam/blob/master/tools/samtool_filter2/samtool_filter2.xml
(nice BAM and BAI example)

https://github.com/galaxyproject/tools-devteam/blob/master/tools/freebayes/freebayes.xml
(does a lot of symlinks)

https://github.com/galaxyproject/tools-iuc/blob/master/tools/bedtools/multiCov.xml
(part of a for loop for multiple BAM and BAI files)

Note you can't use  in this
style as the first command is the shell command ln.

Peter


On Fri, Oct 2, 2015 at 11:17 AM, Martin Vickers  wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi Peter,
>
> Thanks for the reply. Are there any examples of this in action? Is it done
> in the xml wrapper somewhere or do I need to write a script that does this
> and then call the Rscript?
>
> Cheers,
>
> Martin
>
> On 10/02/2015 11:13 AM, Peter Cock wrote:
>> Creating symlinks with normal extensions is a common
>> approach here where the Galaxy filenames won't work.
>>
>> Peter
>>
>> On Fri, Oct 2, 2015 at 10:57 AM, Martin Vickers  wrote:
>>>
>> Hi all,
>>
>> I've been tasked with getting someone's R script working in our galaxy
>> installation and I'm struggling to resolve an issue with an bioconductor
>> function that appears to not like the galaxy naming convention (e.g.
>> dataset_2.dat) for the bam index file.
>>
>> The R script can run from the command line like this;
>>
>> Rscript script.R input1.xls alignment.bam alignment.bai p
>>
>> so I have created a wrapper using planemo that does this, and that's fine.
>>
>> The problem is, when I run the script in galaxy, I get the following error
>> from R;
>>
>> Error in value[[3L]](cond) :
>> failed to open BamFile: failed to load BAM index
>> file: /tmp/tmpdP2eBC/files/000/dataset_3.dat
>> Calls: f_oGRSeparateStrands ... tryCatch -> tryCatchList -> tryCatchOne ->
>> 
>> In addition: Warning messages:
>> In doTryCatch(return(expr), name, parentenv, handler) :
>> [bam_index_load] fail to load BAM index.
>> Execution halted
>>
>> The function that reads the bam + bai file in the script is;
>>
>> bam = readGAlignments(file=bam.file, index=bai.file,
>> param=ScanBamParam(which=gr.signal))
>>
>> http://www.rdocumentation.org/packages/GenomicRanges/html/GAlignments.html
>>
>> In the documentation for this function it states the following;
>>
>> "file, index, The path to the BAM file to read, and to the index file of
>> the
>> BAM file to read, respectively. The latter is given /without/ the '.bai'
>> extension. See |scanBam
>> |
>> for more information."
>>
>> I've played around with this a little and from the command line I've been
>> successfully able to run the script to completion when the input bam file
>> and bai are completely different names;
>>
>> e.g.
>>
>> Rscript script.R input1.xls something.bam meh.bai p
>>
>> but I can't run it if I change the extension, e.g.
>>
>> Rscript script.R input1.xls something.dat meh.dat p
>> Error in value[[3L]](cond) :
>>
>> failed to open BamFile: failed to load BAM index
>> file: /tmp/tmpdP2eBC/files/000/dataset_3.dat
>> Calls: f_oGRSeparateStrands ... tryCatch -> tryCatchList -> tryCatchOne ->
>> 
>> In addition: Warning messages:
>> In doTryCatch(return(expr), name, parentenv, handler) :
>> [bam_index_load] fail to load BAM index.
>> Execution halted
>>
>>
>> Does anyone have any experience of resolving this kind of issue?
>>
>>
>>>
>>>
>>> ___
>>> 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:
>>>   https://lists.galaxyproject.org/
>>>
>>> To search Galaxy mailing lists use the unified search at:
>>>   http://galaxyproject.org/search/mailinglists/
>
> - --
>
> - --
> Dr. Martin Vickers
>
> Data Manager/HPC Systems Administrator
> Institute of Biological, Environmental and Rural Sciences
> IBERS New Building
> Aberystwyth University
> SY23 3FG
>
> w: http://www.martin-vickers.co.uk/
> e: mj...@aber.ac.uk
> t: 01970 62 2807
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v2.0.14 (GNU/Linux)
>
> iQEcBAEBAgAGBQJWDlmjAAoJEHa0a8GkKQgIqqkH/RwvFjF//9z3ucrAziYKbuia
> qe9fFiAUhfgMFYUxVxatdR1CqzLChcONonPDgcouxGO7i1EgGNmoRqYdEdCrHbPF
> WXpS/1txd8ieIxIp4IjrrozoXnd7x360M6MZd8yh6YxNd+LXQdZyWBAYUePwl5RQ
> x/rwaJHnfw2hiWtHLWlrqHQJESz4zo1L0Wjymy8ehyvo9zG6760/zZSInaHmFPkN
> 6YJVmr0o/k1FpQrXNaRlmxMKC9jbPoDvF6ZkpseA9y1ojmFpS0mrBBLxZyaGaru9
> iKH4TYnD2PTU5L+2bmCbAiEa7us0KXEx74Mq8WaKQ/hwsvXQiCpXXmvPj7oCFSI=
> =MVS2
> -END PGP SIGNATURE-
>
___
Please keep all replies on the list by 

[galaxy-dev] Creating R galaxy wrapper where a function checks file extension

2015-10-02 Thread Martin Vickers

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi all,

I've been tasked with getting someone's R script working in our galaxy
installation and I'm struggling to resolve an issue with an bioconductor
function that appears to not like the galaxy naming convention (e.g.
dataset_2.dat) for the bam index file.

The R script can run from the command line like this;

Rscript script.R input1.xls alignment.bam alignment.bai p

so I have created a wrapper using planemo that does this, and that's fine.

The problem is, when I run the script in galaxy, I get the following
error from R;

Error in value[[3L]](cond) :
failed to open BamFile: failed to load BAM index
file: /tmp/tmpdP2eBC/files/000/dataset_3.dat
Calls: f_oGRSeparateStrands ... tryCatch -> tryCatchList -> tryCatchOne
-> 
In addition: Warning messages:
In doTryCatch(return(expr), name, parentenv, handler) :
[bam_index_load] fail to load BAM index.
Execution halted

The function that reads the bam + bai file in the script is;

bam = readGAlignments(file=bam.file, index=bai.file,
param=ScanBamParam(which=gr.signal))

http://www.rdocumentation.org/packages/GenomicRanges/html/GAlignments.html

In the documentation for this function it states the following;

"file, index, The path to the BAM file to read, and to the index file of
the BAM file to read, respectively. The latter is given /without/ the
'.bai' extension. See |scanBam
|
for more information."

I've played around with this a little and from the command line I've
been successfully able to run the script to completion when the input
bam file and bai are completely different names;

e.g.

Rscript script.R input1.xls something.bam meh.bai p

but I can't run it if I change the extension, e.g.

Rscript script.R input1.xls something.dat meh.dat p
Error in value[[3L]](cond) :

failed to open BamFile: failed to load BAM index
file: /tmp/tmpdP2eBC/files/000/dataset_3.dat
Calls: f_oGRSeparateStrands ... tryCatch -> tryCatchList -> tryCatchOne
-> 
In addition: Warning messages:
In doTryCatch(return(expr), name, parentenv, handler) :
[bam_index_load] fail to load BAM index.
Execution halted


Does anyone have any experience of resolving this kind of issue?


- -- 

- --
Dr. Martin Vickers

Data Manager/HPC Systems Administrator
Institute of Biological, Environmental and Rural Sciences
IBERS New Building
Aberystwyth University
SY23 3FG

w: http://www.martin-vickers.co.uk/
e: mj...@aber.ac.uk
t: 01970 62 2807

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.14 (GNU/Linux)

iQEcBAEBAgAGBQJWDlUgAAoJEHa0a8GkKQgIpUcIAK9OZ9402FRaROF89b6bO1CY
d+KP/X0NCxY+AXEddU3lhXi8O9haaKRA/pmxsGyydP0VQfaCrSSlS9nzhncG6Zav
gpXe5NjFkwe8a/qaZTVf0YjlYq0sI81S7QAJnzlKXvYSjcz1xNDE9O4qSHqdhefX
oI6GWmR+vHi7CTqNuHwpyY9Qoafd5nls0oQoCYDh9YWrn9GZ8fe1qQ9W7iUli/oT
dPMYwWs0OL8NfSCuIcz2Dbr1XMt+o5HpQY/afoGWaq3zz5Ie0NhCLKz34bFps3IW
8K0DEROmCTxsXBa54gnnkhVgCI3zkfFCfa47xp13vT2dJALdzYoT6vDj8aC/mes=
=ijgr
-END PGP SIGNATURE-

___
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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

Re: [galaxy-dev] Creating R galaxy wrapper where a function checks file extension

2015-10-02 Thread Martin Vickers

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Peter,

Thanks for the reply. Are there any examples of this in action? Is it
done in the xml wrapper somewhere or do I need to write a script that
does this and then call the Rscript?

Cheers,

Martin

On 10/02/2015 11:13 AM, Peter Cock wrote:
> Creating symlinks with normal extensions is a common
> approach here where the Galaxy filenames won't work.
>
> Peter
>
> On Fri, Oct 2, 2015 at 10:57 AM, Martin Vickers  wrote:
>>
> Hi all,
>
> I've been tasked with getting someone's R script working in our galaxy
> installation and I'm struggling to resolve an issue with an bioconductor
> function that appears to not like the galaxy naming convention (e.g.
> dataset_2.dat) for the bam index file.
>
> The R script can run from the command line like this;
>
> Rscript script.R input1.xls alignment.bam alignment.bai p
>
> so I have created a wrapper using planemo that does this, and that's fine.
>
> The problem is, when I run the script in galaxy, I get the following error
> from R;
>
> Error in value[[3L]](cond) :
> failed to open BamFile: failed to load BAM index
> file: /tmp/tmpdP2eBC/files/000/dataset_3.dat
> Calls: f_oGRSeparateStrands ... tryCatch -> tryCatchList -> tryCatchOne ->
> 
> In addition: Warning messages:
> In doTryCatch(return(expr), name, parentenv, handler) :
> [bam_index_load] fail to load BAM index.
> Execution halted
>
> The function that reads the bam + bai file in the script is;
>
> bam = readGAlignments(file=bam.file, index=bai.file,
> param=ScanBamParam(which=gr.signal))
>
> http://www.rdocumentation.org/packages/GenomicRanges/html/GAlignments.html
>
> In the documentation for this function it states the following;
>
> "file, index, The path to the BAM file to read, and to the index file
of the
> BAM file to read, respectively. The latter is given /without/ the '.bai'
> extension. See |scanBam
> |
> for more information."
>
> I've played around with this a little and from the command line I've been
> successfully able to run the script to completion when the input bam file
> and bai are completely different names;
>
> e.g.
>
> Rscript script.R input1.xls something.bam meh.bai p
>
> but I can't run it if I change the extension, e.g.
>
> Rscript script.R input1.xls something.dat meh.dat p
> Error in value[[3L]](cond) :
>
> failed to open BamFile: failed to load BAM index
> file: /tmp/tmpdP2eBC/files/000/dataset_3.dat
> Calls: f_oGRSeparateStrands ... tryCatch -> tryCatchList -> tryCatchOne ->
> 
> In addition: Warning messages:
> In doTryCatch(return(expr), name, parentenv, handler) :
> [bam_index_load] fail to load BAM index.
> Execution halted
>
>
> Does anyone have any experience of resolving this kind of issue?
>
>
>>
>>
>> ___
>> 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:
>>   https://lists.galaxyproject.org/
>>
>> To search Galaxy mailing lists use the unified search at:
>>   http://galaxyproject.org/search/mailinglists/

- -- 

- --
Dr. Martin Vickers

Data Manager/HPC Systems Administrator
Institute of Biological, Environmental and Rural Sciences
IBERS New Building
Aberystwyth University
SY23 3FG

w: http://www.martin-vickers.co.uk/
e: mj...@aber.ac.uk
t: 01970 62 2807
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.14 (GNU/Linux)

iQEcBAEBAgAGBQJWDlmjAAoJEHa0a8GkKQgIqqkH/RwvFjF//9z3ucrAziYKbuia
qe9fFiAUhfgMFYUxVxatdR1CqzLChcONonPDgcouxGO7i1EgGNmoRqYdEdCrHbPF
WXpS/1txd8ieIxIp4IjrrozoXnd7x360M6MZd8yh6YxNd+LXQdZyWBAYUePwl5RQ
x/rwaJHnfw2hiWtHLWlrqHQJESz4zo1L0Wjymy8ehyvo9zG6760/zZSInaHmFPkN
6YJVmr0o/k1FpQrXNaRlmxMKC9jbPoDvF6ZkpseA9y1ojmFpS0mrBBLxZyaGaru9
iKH4TYnD2PTU5L+2bmCbAiEa7us0KXEx74Mq8WaKQ/hwsvXQiCpXXmvPj7oCFSI=
=MVS2
-END PGP SIGNATURE-

___
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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

Re: [galaxy-dev] Question about using dynamic options and refresh_on_change for rendering 2 associated select lists

2015-10-02 Thread Björn Grüning
Thanks Greg for this nice example, I guess this is useful for others as
well!
I will try to put it into the Wiki soon.

Am 30.09.2015 um 20:05 schrieb Greg Von Kuster:
> Here’s the answer to my question:
> 
> The ability to use associated dynamic select lists on Galaxy tool forms where 
> selecting an option in the first select list dynamically re-renders the 
> options in the second select list is possible after this change:
> 
> https://github.com/galaxyproject/galaxy/pull/815 
> 
> 
> In my case, I am populating both dynamic select lists from metadata elements 
> associated with my tool’s single input dataset.  The 2 metadata elements I’m 
> using look like this.
> 
> MetadataElement( name="field_names", default=[], desc="Field names",
>  readonly=True, optional=True,
>  visible=True, no_value=[] )
> # The keys in the field_components map to the list of field_names in the 
> above element
> # which ensures order for select list options that are built from it.
> MetadataElement( name="field_components", default={}, desc="Field names 
> and components",
>  readonly=True, optional=True, visible=True, no_value={} )
> 
> 
> My tool config includes a code file tag like this.
> 
> 
> 
> 
> Here are the relevant input parameters in my tool config.  The first 
> parameter is the input dataset that includes the above metadata elements.
> 
> 
>  label="Shape with uncolored surface field">
> value is not None and 
> len(value.metadata.field_names) > 0
> 
> 
> 
> The following parameter dynamically renders a select list consisting of the 
> elements in the “field_names” metadata element associated with the selected 
> input dataset.
> 
> 
>  refresh_on_change="True">
> 
> 
> 
> 
> 
> 
> 
> The following parameter calls the “get_field_components_options() method in 
> the “tool_form_utils.py” code file discussed above.  This method returns the 
> value of the input dataset’s “field_components” metadata element dictionary 
> whose key is the currently selected “field_name” from the select list 
> parameter above.
> 
> 
> 
> 
> 
> Changing the selected option in the “field_name” select list will dynamically 
> re-render the options available in the associated “field_component_index” 
> select list, which is the behavior we want.
> 
> 
> The “get_field_components_options() method looks like this.
> 
> def get_field_components_options( dataset, field_name ):
> options = []
> if dataset.metadata is None:
> return options
> if not hasattr( dataset.metadata, 'field_names' ):
> return options
> if dataset.metadata.field_names is None:
> return options
> if field_name is None:
> # The expression validator that helps populate the select list of 
> input
> # datsets in the icqsol_color_surface_field tool does not filter out
> # datasets with no field field_names, so we need this check.
> if len( dataset.metadata.field_names ) == 0:
> return options
> field_name = dataset.metadata.field_names[0]
> field_components = dataset.metadata.field_components.get( field_name, [] )
> for i, field_component in enumerate( field_components ):
> options.append( ( field_component, field_component, i == 0 ) )
> return options
> 
> 
> Greg Von Kuster
> 
> 
>> On Sep 20, 2015, at 9:51 PM, Greg Von Kuster  wrote:
>>
>> Hello all,
>>
>> I’m working on adding support to the Galaxy framework for datatypes in the 
>> constructive solid geometry (CSG) space and I have several working Galaxy 
>> tools and a visualization plugin that deal with 3d shapes in this 
>> environment.  All of this work will soon be contributed to open source.
>>
>> For one of the tools, I need to provide 2 select lists on the tool form that 
>> are associated in such a way that when an option in select list 1 is chosen, 
>> the options in select list 2 are altered and re-rendered.  This behavior 
>> would probably use a combination of dynamic options and refresh_on_change 
>> between the 2 associated select lists.
>>
>> I’ve not seen a tool that does this precisely, so I’m hoping that if it is 
>> currently possible to do this within Galaxy tools, someone will point me to 
>> an example.
>>
>> If it is not currently possible, I will contribute a PR for supporting it, 
>> but would like some input as to how it should be done.
>>
>> Dynamic options are currently rendered using 4 approaches; from_file, 
>> from_dataset, from_parameter and from_data_table.  One or more of several 
>> filters can then be applied to the options to alter them if desired.  
>>
>> Since these CSG tools involve new datatypes, I have flexibility into how the 
>> metadata elements are set up that are needed to render these 2 select lists. 
>>  A 

[galaxy-dev] Problems with Galaxy cluster using grid engine

2015-10-02 Thread Richard Polich
Hi All,

Trying to setup a Galaxy cluster using Rocks Gridengine

OS is Centos 6.5.
psql (9.1.18)
shell bash

Getting error messages in paster.log below. I can submit jobs to Gridengine 
using qsub so this is not an issue. But when trying to "Upload File from you 
computer”, history indicates jobs does not complete.

Any help would be appreciated.

galaxy.tools.actions.upload_common DEBUG 2015-10-02 09:35:02,272 Changing 
ownership of /share/apps/galaxy/database/tmp/upload_file_data_xvpaYs with: 
/usr/bin/sudo -E /share/apps/galaxy/scripts/external_chown_script.py 
/share/apps/galaxy/database/tmp/upload_file_data_xvpaYs rpolich 507
galaxy.tools.actions.upload_common WARNING 2015-10-02 09:35:02,297 Changing 
ownership of uploaded file 
/share/apps/galaxy/database/tmp/upload_file_data_xvpaYs failed: sudo: no tty 
present and no askpass program specified

galaxy.tools.actions.upload_common DEBUG 2015-10-02 09:35:02,297 Changing 
ownership of /share/apps/galaxy/database/tmp/tmplIgC3n with: /usr/bin/sudo -E 
/share/apps/galaxy/scripts/external_chown_script.py 
/share/apps/galaxy/database/tmp/tmplIgC3n rpolich 507
galaxy.tools.actions.upload_common WARNING 2015-10-02 09:35:02,323 Changing 
ownership of uploaded file /share/apps/galaxy/database/tmp/tmplIgC3n failed: 
sudo: no tty present and no askpass program specified

galaxy.tools.actions.upload_common INFO 2015-10-02 09:35:02,357 tool upload1 
created job id 101
galaxy.tools.execute DEBUG 2015-10-02 09:35:02,423 Tool [upload1] created job 
[101] (332.351 ms)
206.124.61.6 - - [02/Oct/2015:09:34:59 -0500] "POST /api/tools HTTP/1.1" 200 - 
"http://galaxy.txbiomedgenetics.org:8080/; "Mozilla/5.0 (Macintosh; Intel Mac 
OS X 10.9; rv:40.0) Gecko/20100101 Firefox/40.0"
206.124.61.6 - - [02/Oct/2015:09:35:02 -0500] "GET 
/api/histories/1fad1eaf5f4f1766/contents HTTP/1.1" 200 - 
"http://galaxy.txbiomedgenetics.org:8080/; "Mozilla/5.0 (Macintosh; Intel Mac 
OS X 10.9; rv:40.0) Gecko/20100101 Firefox/40.0"
galaxy.jobs DEBUG 2015-10-02 09:35:02,676 (101) Working directory for job is: 
/share/apps/galaxy/database/job_working_directory/000/101
galaxy.jobs.handler DEBUG 2015-10-02 09:35:02,682 (101) Dispatching to drmaa 
runner
galaxy.jobs DEBUG 2015-10-02 09:35:02,894 (101) Persisting job destination 
(destination id: sge_default)
galaxy.jobs.runners DEBUG 2015-10-02 09:35:02,903 Job [101] queued (220.456 ms)
galaxy.jobs.handler INFO 2015-10-02 09:35:02,958 (101) Job dispatched
galaxy.jobs.command_factory INFO 2015-10-02 09:35:03,821 Built script 
[/share/apps/galaxy/database/job_working_directory/000/101/tool_script.sh] for 
tool 
command[/share/apps/galaxy/database/job_working_directory/000/101/tool_script.sh]
galaxy.jobs.runners DEBUG 2015-10-02 09:35:04,010 (101) command is: 
/share/apps/galaxy/database/job_working_directory/000/101/tool_script.sh; 
return_code=$?; python 
"/share/apps/galaxy/database/job_working_directory/000/101/set_metadata_QaaegG.py"
 "/share/apps/galaxy/database/tmp/tmpglze54" 
"/share/apps/galaxy/database/job_working_directory/000/101/galaxy.json" 
"/share/apps/galaxy/database/job_working_directory/000/101/metadata_in_HistoryDatasetAssociation_71_7DAllZ,/share/apps/galaxy/database/job_working_directory/000/101/metadata_kwds_HistoryDatasetAssociation_71_YiPkTL,/share/apps/galaxy/database/job_working_directory/000/101/metadata_out_HistoryDatasetAssociation_71_JbkolS,/share/apps/galaxy/database/job_working_directory/000/101/metadata_results_HistoryDatasetAssociation_71_d93tKG,/share/apps/galaxy/database/job_working_directory/000/101/galaxy_dataset_71.dat,/share/apps/galaxy/database/job_working_directory/000/101/metadata_override_HistoryDatasetAssociation_71_ih81Fj"
 5242880; sh -c "exit $return_code"
galaxy.jobs.runners.drmaa DEBUG 2015-10-02 09:35:04,074 (101) submitting file 
/share/apps/galaxy/database/job_working_directory/000/101/galaxy_101.sh
galaxy.jobs.runners.drmaa DEBUG 2015-10-02 09:35:04,075 (101) native 
specification is: -q galaxy.q -V
galaxy.jobs DEBUG 2015-10-02 09:35:04,075 (101) Changing ownership of working 
directory with: /usr/bin/sudo -E 
/share/apps/galaxy/scripts/external_chown_script.py 
/share/apps/galaxy/database/job_working_directory/000/101 rpolich 507
galaxy.jobs ERROR 2015-10-02 09:35:04,102 (101) Failed to change ownership of 
/share/apps/galaxy/database/job_working_directory/000/101, making 
world-writable instead
Traceback (most recent call last):
  File "/share/apps/galaxy/lib/galaxy/jobs/__init__.py", line 1649, in 
change_ownership_for_run
self._change_ownership( self.user_system_pwent[0], str( 
self.user_system_pwent[3] ) )
  File "/share/apps/galaxy/lib/galaxy/jobs/__init__.py", line 1643, in 
_change_ownership
assert p.returncode == 0
AssertionError
galaxy.jobs.runners.drmaa DEBUG 2015-10-02 09:35:04,102 (101) submitting with 
credentials: rpolich [uid: 1006]
galaxy.jobs.runners.drmaa DEBUG 2015-10-02 09:35:04,104 (101) Job script for 
external submission is: