[galaxy-dev] Nested conditionals

2012-04-13 Thread Joachim Jacob

Hello,

I am building a tool config, and I am looking for a way to have nested 
conditionals being automatically selected based on a previous 
conditional. Schematically it looks like this:


Choose: option 1 or option 2
if option 1: no extra parameters
if option 2: extra parameters to set

Choose: additional option A or B
if additional option A: no extra parameters
if additional option B:
set extra parameter
Choose: option 1 or option 2 (--)
if option 1: one extra parameter to set
if option 2: two other extra parameters to set

Nested options are possible (indicated by ). However, 
instead of again choosing the same option as in the first conditional, 
the outcome of the nested conditional should be the same already known. 
It is no option to reverse conditional A/B with conditional 1/2.


In Galaxy syntax it looks like: (note that the last, nested, conditional 
is the same as the first conditional)


conditional name='*condition12*'
param name=condition type=select
option value=1 selected=True1/option
option value=2 2/option
/param
when value='1'/
when value='2'
param name='extra1'  .../
param name='extra2'  .../
/when
/conditional
conditional name=conditionAB
param name=condition type=select
option value=A selected=TrueA/option
option value=BB/option
/param
when value=A/
when value=B
param name=extra4 .../
conditional name='*condition12*'
param name=condition type=select
option value=1 selected=True1/option
option value=2 2/option
/param
when value='1'
param name='extra5'  .../
/when
when value='2'
param name='extra6'  .../
param name='extra7'  .../
/when
/conditional
/conditional

The goal is to get automatically the nested conditional right 
(condition12), based on the selection the user makes in the first 
conditional.


Any hint on how to get this right?


Regards,
Joachim

--
Joachim Jacob, PhD

Rijvisschestraat 120, 9052 Zwijnaarde
Tel: +32 9 244.66.34
Bioinformatics Training and Services (BITS)
http://www.bits.vib.be
@bitsatvib


___
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/


Re: [galaxy-dev] Creating a workflow of workflows

2012-04-13 Thread Peter Cock
On Fri, Apr 13, 2012 at 1:00 AM, Aaron Gallagher agall...@fhcrc.org wrote:
 Hi again,

 I'm trying to set up a workflow for Galaxy (6799:40f1816d6857), but I can't
 seem to find a way to make a workflow that invokes another workflow. It seems
 like this wouldn't be unreasonable, since workflows have defined inputs and
 outputs.

Oft requested but not yet implemented. I can't find a specific issue open
on this on bitbucket though...

https://bitbucket.org/galaxy/galaxy-central/issues/2?q=workflowstatus=newstatus=open

Peter
___
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/


Re: [galaxy-dev] Problem with cleaning up galaxy datasets

2012-04-13 Thread Michael Moore
Yes, you do not have a url like http://some_path or ssh://some_path
defined in your config file.  Look at the command-line options for
your routines and figure out how it is finding your config file.  It
could be looking in the wrong place or you could have an error in the
config file (missing piece or undefined variable which would default
to False (a boolean).

On 4/11/12, Klaus Metzeler m...@klaus-metzeler.de wrote:

 Dear all,

 I have a problem with the cleanup scripts on my local galaxy instance.
 I am using the updated cleanup_datasets.py, as per Nate's earlier reply
 here
 http://gmod.827538.n3.nabble.com/Problem-running-purge-datasets-sh-cleanup-scripts-td3688016.html#none.
 http://gmod.827538.n3.nabble.com/Problem-running-purge-datasets-sh-cleanup-scripts-td3688016.html#none

 This is the output I get when running cleanup_datasets.py:

   ~/ngs-bin/galaxy-dist $ scripts/cleanup_datasets/cleanup_datasets.py
 -d 2 -6 -r
 Traceback (most recent call last):
File scripts/cleanup_datasets/cleanup_datasets.py, line 524, in
 module
  if __name__ == __main__: main()
File scripts/cleanup_datasets/cleanup_datasets.py, line 82, in main
  ini_file = args[0]
 IndexError: list index out of range

 ... and this if I call it via the shell script cleanup_datasets.sh

 ~/ngs-bin/galaxy-dist $ scripts/cleanup_datasets/delete_datasets.sh
 Traceback (most recent call last):
File ./scripts/cleanup_datasets/cleanup_datasets.py, line 524, in
 module
  if __name__ == __main__: main()
File ./scripts/cleanup_datasets/cleanup_datasets.py, line 101, in main
  app = CleanupDatasetsApplication( config )
File ./scripts/cleanup_datasets/cleanup_datasets.py, line 512, in
 __init__
  self.model = galaxy.model.mapping.init( config.file_path,
 config.database_connection, engine_options={}, create_tables=False,
 object_store=self.object_store )
File
 /home/klausmetzeler/ngs-bin/galaxy-dist/lib/galaxy/model/mapping.py,
 line 1818, in init
  load_egg_for_url( url )
File
 /home/klausmetzeler/ngs-bin/galaxy-dist/lib/galaxy/model/mapping.py,
 line 1798, in load_egg_for_url
  dialect = guess_dialect_for_url( url )
File
 /home/klausmetzeler/ngs-bin/galaxy-dist/lib/galaxy/model/mapping.py,
 line 1794, in guess_dialect_for_url
  return (url.split(':', 1))[0]
 AttributeError: 'bool' object has no attribute 'split'


 Any idea what might be wrong?
 Thanks a lot for your support,
 Klaus



___
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/


[galaxy-dev] How to specify RUM output dir?

2012-04-13 Thread Dorset, Daniel C
I'm currently writing a Galaxy wrapper for RUM (RNA-seq Unified Mapper). RUM is 
a tool that generates many output files. It is run from the command line using 
the following syntax:

RUM_runner.pl config file reads file(s) output dir num chunks name 
[options]

I'm good with everything except the output dir. I can't figure out how to 
pass that directory information from Galaxy to the RUM_runner.pl in such a way 
that Galaxy will be able to subsequently capture the data. Does anybody have 
any advice, or can someone point me towards an existing wrapper that does 
something similar?

Thanks!

Dan
___
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/

[galaxy-dev] CloudMan/Galaxy wiki suggestion

2012-04-13 Thread Assaf Gordon
Hello,

Great work with the Galaxy on the Cloud - it's the first time I've used it and 
it looks very impressive (and I'm not a big cloud fan :) ).

Once I got it working it was very nice, but before it worked I encountered two 
issues (not sure if those were voodoo or not) that could be perhaps documented 
in the Wiki (under troubleshooting?):

1. the User Data is sensitive to trailing white-space, or senstive to 
copypaste in the edit box.

I accidentally had:
  access_key: XXspacespace
and it seems it completely prevent the Cloudman from starting.
when the stared, I couldn't connect to it with a web-browser.
I logged on using SSH, and saw that there was nothing running/listening on port 
80 (no nginx, no python).
Not sure exactly why it happened, but it did.
removing white-space (and also saving the user-data to a file instead of 
pasting it directly in the editbox) solved the problem.


2. If the user-data password is all numeric, there's no way to login to the 
cloudman.
I suspect the reason is that an all numeric password is treated as a number, 
not a string.
Then, the log shows:

$ cat /opt/galaxy/pkg/ec2autorun.py.log
[...]
[DEBUG] ec2autorun:337 2012-04-13 20:22:50,983: Composed user data: 
{'access_key': 'XX', 'cloudman_home': '/mnt/cm', 
'cluster_name': 'galaxy-TGAC-workshop', 'bucket_default': 'cloudman', 'role': 
'master', 'bucket_cluster': 'cm-169ca4be88c386ce8ec3078d69a6dc3a', 
'boot_script_path': '/tmp/cm', 'boot_script_name': 'cm_boot.py', 'secret_key': 
'X', 'password': 12345678}
[...]

you'll notice that the password key is a numeric value, not a string - and 
login wasn't possible (perhaps it was voodoo and I'm wrong in my guess, but 
once I changed it to alphanumeric password, with the same user data settings, 
it workd).



-gordon


___
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/


[galaxy-dev] Workflow import error

2012-04-13 Thread Robert Chase
Hello All,

I have just tried to import a workflow file and when I try to view the
workflow, I'm getting an error, global name 'self' is not defined.

Error Traceback:
View as:   
Interactivehttp://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#
(full) http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e# |
Text http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#
(full) http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e# |
XML http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#
(full) http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#
⇝ NameError: global name 'self' is not defined
 clear this clear this
 URL: http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e
 Module weberror.evalexception.middleware:*364* in respond
http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#
view http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#
  http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#
*try**:*
__traceback_supplement__ *=* errormiddleware*.*Supplement*,*
self*,* environ
app_iter *=* self*.*application*(*environ*,*
detect_start_response*)*
*try**:*
return_iter *=* list*(*app_iter*)*
http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#app_iter
*=* self*.*application*(*environ*,* detect_start_response*)*
 Module paste.debug.prints:*98* in __call__
http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#
view http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#
  http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#
*try**:*
status*,* headers*,* body *=* wsgilib*.*intercept_output*(*
environ*,* self*.*app*)*
*if* status *is* None*:*
# Some error occurred
http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#environ*,
* self*.*app*)*
 Module paste.wsgilib:*539* in intercept_output
http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#
view http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#
  http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#
data.append(headers)
return output.write
app_iter = application(environ, replacement_start_response)
if data[0] is None:
return (None, None, app_iter)
http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#app_iter
*=* application*(*environ*,* replacement_start_response*)*
 Module paste.recursive:*80* in __call__
http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#
view http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#
  http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#
environ*[*'paste.recursive.script_name'*]* *=* my_script_name
*try**:*
*return* self*.*application*(*environ*,* start_response*)*
*except* ForwardRequestException*,* e*:*
middleware *=* CheckForRecursionMiddleware*(*
http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#*return*
self*.*application*(*environ*,* start_response*)*
 Module paste.httpexceptions:*632* in __call__
http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#
view http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#
  http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#
*[**]**)**.*append*(*HTTPException*)*
*try**:*
*return* self*.*application*(*environ*,* start_response*)*
*except* HTTPException*,* exc*:*
*return* exc*(*environ*,* start_response*)*
http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#*return*
self*.*application*(*environ*,* start_response*)*
 Module galaxy.web.framework.base:*160* in __call__
http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#
view http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#
  http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#
kwargs*.*pop*(* '_'*,* None *)*
*try**:*
body *=* method*(* trans*,* kwargs *)*
*except* Exception*,* e*:*
body *=* self*.*handle_controller_exception*(* e*,* trans*,*
kwargs *)*
http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#body *=*
method*(* trans*,* kwargs *)*
 Module galaxy.web.controllers.workflow:*207* in display_by_id
http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#
view http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#
  http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#
# Get workflow.
stored_workflow = self.get_stored_workflow( trans, id )
return self.display(trans, stored_workflow)

def display(self, trans, stored_workflow):
http://127.0.0.1:8080/workflow/display_by_id?id=f2db41e1fa331b3e#*return*
self*.*display*(*trans*,* 

Re: [galaxy-dev] Workflow import error

2012-04-13 Thread Robert Chase
Hello All,

I'm pretty sure I found a bug in the main galaxy distribution. The
following code diff shows the introduction of the line

tool_version = self.__get_tool_version( trans, tool_id )

but if you look at the function definition containing that line, you see

def from_workflow_step( Class, trans, step ):

which does not half a self in it. Then we get an error.

https://bitbucket.org/galaxy/galaxy-dist/diff/lib/galaxy/workflow/modules.py?diff2=e6464387ed3fdiff1=c60760713d26

-Rob
___
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/