[galaxy-dev] errors after updating galaxy distribution

2013-11-05 Thread Dan Tenenbaum
Hi,

I updated my galaxy distribution with

hg pull -u

Then tried to re-run galaxy and got an error:

$ ./run.sh 
Traceback (most recent call last):
  File ./scripts/paster.py, line 33, in module
serve.run()
  File /home/microbeco/galaxy-dist/lib/galaxy/util/pastescript/serve.py, line 
1049, in run
invoke(command, command_name, options, args[1:])
  File /home/microbeco/galaxy-dist/lib/galaxy/util/pastescript/serve.py, line 
1055, in invoke
exit_code = runner.run(args)
  File /home/microbeco/galaxy-dist/lib/galaxy/util/pastescript/serve.py, line 
220, in run
result = self.command()
  File /home/microbeco/galaxy-dist/lib/galaxy/util/pastescript/serve.py, line 
643, in command
app = loadapp( app_spec, name=app_name, relative_to=base, global_conf=vars)
  File /home/microbeco/galaxy-dist/lib/galaxy/util/pastescript/loadwsgi.py, 
line 350, in loadapp
return loadobj(APP, uri, name=name, **kw)
  File /home/microbeco/galaxy-dist/lib/galaxy/util/pastescript/loadwsgi.py, 
line 374, in loadobj
global_conf=global_conf)
  File /home/microbeco/galaxy-dist/lib/galaxy/util/pastescript/loadwsgi.py, 
line 399, in loadcontext
global_conf=global_conf)
  File /home/microbeco/galaxy-dist/lib/galaxy/util/pastescript/loadwsgi.py, 
line 423, in _loadconfig
return loader.get_context(object_type, name, global_conf)
  File /home/microbeco/galaxy-dist/lib/galaxy/util/pastescript/loadwsgi.py, 
line 561, in get_context
section)
  File /home/microbeco/galaxy-dist/lib/galaxy/util/pastescript/loadwsgi.py, 
line 620, in _context_from_explicit
value = import_string(found_expr)
  File /home/microbeco/galaxy-dist/lib/galaxy/util/pastescript/loadwsgi.py, 
line 125, in import_string
return pkg_resources.EntryPoint.parse(x= + s).load(False)
  File /home/microbeco/galaxy-dist/lib/pkg_resources.py, line 1954, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File /home/microbeco/galaxy-dist/lib/galaxy/web/buildapp.py, line 3, in 
module
from galaxy.webapps.galaxy.buildapp import app_factory
  File /home/microbeco/galaxy-dist/lib/galaxy/webapps/galaxy/buildapp.py, 
line 16, in module
import galaxy.model.mapping
  File /home/microbeco/galaxy-dist/lib/galaxy/model/mapping.py, line 14, in 
module
from sqlalchemy.types import BigInteger
ImportError: cannot import name BigInteger

I also tried to update my database but got a different error:

$ sh manage_db.sh upgrade
114 - 115... 
Traceback (most recent call last):
  File ./scripts/manage_db.py, line 62, in module
main( repository=repo, url=db_url )
  File 
/home/microbeco/galaxy-dist/eggs/sqlalchemy_migrate-0.5.4-py2.7.egg/migrate/versioning/shell.py,
 line 150, in main
ret = command_func(**kwargs)
  File 
/home/microbeco/galaxy-dist/eggs/sqlalchemy_migrate-0.5.4-py2.7.egg/migrate/versioning/api.py,
 line 221, in upgrade
return _migrate(url, repository, version, upgrade=True, err=err, **opts)
  File 
/home/microbeco/galaxy-dist/eggs/sqlalchemy_migrate-0.5.4-py2.7.egg/migrate/versioning/api.py,
 line 349, in _migrate
schema.runchange(ver, change, changeset.step)
  File 
/home/microbeco/galaxy-dist/eggs/sqlalchemy_migrate-0.5.4-py2.7.egg/migrate/versioning/schema.py,
 line 184, in runchange
change.run(self.engine, step)
  File 
/home/microbeco/galaxy-dist/eggs/sqlalchemy_migrate-0.5.4-py2.7.egg/migrate/versioning/script/py.py,
 line 101, in run
func()
TypeError: upgrade() takes exactly 1 argument (0 given)

How can I fix this? 
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/

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


Re: [galaxy-dev] routing to a cluster or not on a per-tool basis

2013-05-08 Thread Dan Tenenbaum
On Tue, May 7, 2013 at 10:16 AM, Dan Tenenbaum dtene...@fhcrc.org wrote:
 On Tue, Apr 30, 2013 at 2:04 PM, Dannon Baker dannon.ba...@gmail.com wrote:
 Hey Dan,

 Sure, you can configure per-tool job runners.  This wiki page
 (http://wiki.galaxyproject.org/Admin/Config/Jobs) should get you started,
 but let me know if you run into any trouble.


 Thanks!

 Following up on this.

 As I mentioned before, this Galaxy instance was already configured to
 use the cluster by default. I did not set up the cluster or the Galaxy
 instance. This particular instance did not use the job_conf.xml file.
 But I updated it and set up a job_conf.xml and I was able to set it up
 so that some tools would be run on the local machine.

 However, in trying to get it set up so some jobs would run on the
 cluster (which is what happened by default before I came along) I ran
 into problems. Previously, it looked like the cluster stuff was
 configured in universe_wsgi.ini, and I guessed that these were the
 relevant lines:

 start_job_runners = drmaa
 default_cluster_job_runner = drmaa://-t 12:00 -A noaccount/

 So I tried to move that setup to job_conf.xml:

 ?xml version=1.0?
 !-- A sample job config that explicitly configures job running the
 way it is configured by default (if there is no explicit config). --
 job_conf
 plugins
 plugin id=local type=runner
 load=galaxy.jobs.runners.local:LocalJobRunner workers=4/
 plugin id=drmaa type=runner
 load=galaxy.jobs.runners.drmaa:DRMAAJobRunner/
 /plugins
 handlers
 handler id=main/
 /handlers
 destinations default=local
 destination id=local runner=local/
 destination id=cluster runner=drmaa
 param id=nativeSpecification-t 12:00 -A noaccount//param
 /destination
 /destinations
 tools
 !-- Tools can be configured to use specific destinations or handlers,
  identified by either the id or tags attribute.  If assigned to
  a tag, a handler or destination that matches that tag will be
  chosen at random.
  --
 tool id=mytesttool destination=cluster/
 /tools
 /job_conf

 When I run 'my test tool', however, it just hangs.

 Any tips?

To answer my own question...I think I have gotten this working, by
using the drmaa snippet from the job_conf.xml.sample_advanced file in
my galaxy distro:

destination id=real_user_cluster runner=drmaa
!-- TODO: The real user options should maybe not be
considered runner params. --
param
id=galaxy_external_runjob_scriptscripts/drmaa_external_runner.py/param
param
id=galaxy_external_killjob_scriptscripts/drmaa_external_killer.py/param
param
id=galaxy_external_chown_scriptscripts/external_chown_script.py/param
/destination

If I set up my test tool to run with this destination, it works.

Thanks,
Dan


 Thanks,
 Dan




 On Tue, Apr 30, 2013 at 4:47 PM, Dan Tenenbaum dtene...@fhcrc.org wrote:

 Hi,

 I have some tools that run really quickly without using any kind of
 cluster.
 I would prefer not to run these tools on a cluster, as the overhead of
 submitting these jobs makes them take much longer than they otherwise
 would.
 I have other tools that are computationally intensive and need to be
 run on a cluster.
 I would like to expose all these tools in the same Galaxy instance,
 but have some tools run on the cluster and others not.

 Is this possible?

 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/

 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:
   http://lists.bx.psu.edu/

 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:
  http://lists.bx.psu.edu/

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


Re: [galaxy-dev] routing to a cluster or not on a per-tool basis

2013-05-07 Thread Dan Tenenbaum
On Tue, Apr 30, 2013 at 2:04 PM, Dannon Baker dannon.ba...@gmail.com wrote:
 Hey Dan,

 Sure, you can configure per-tool job runners.  This wiki page
 (http://wiki.galaxyproject.org/Admin/Config/Jobs) should get you started,
 but let me know if you run into any trouble.


Thanks!

Following up on this.

As I mentioned before, this Galaxy instance was already configured to
use the cluster by default. I did not set up the cluster or the Galaxy
instance. This particular instance did not use the job_conf.xml file.
But I updated it and set up a job_conf.xml and I was able to set it up
so that some tools would be run on the local machine.

However, in trying to get it set up so some jobs would run on the
cluster (which is what happened by default before I came along) I ran
into problems. Previously, it looked like the cluster stuff was
configured in universe_wsgi.ini, and I guessed that these were the
relevant lines:

start_job_runners = drmaa
default_cluster_job_runner = drmaa://-t 12:00 -A noaccount/

So I tried to move that setup to job_conf.xml:

?xml version=1.0?
!-- A sample job config that explicitly configures job running the
way it is configured by default (if there is no explicit config). --
job_conf
plugins
plugin id=local type=runner
load=galaxy.jobs.runners.local:LocalJobRunner workers=4/
plugin id=drmaa type=runner
load=galaxy.jobs.runners.drmaa:DRMAAJobRunner/
/plugins
handlers
handler id=main/
/handlers
destinations default=local
destination id=local runner=local/
destination id=cluster runner=drmaa
param id=nativeSpecification-t 12:00 -A noaccount//param
/destination
/destinations
tools
!-- Tools can be configured to use specific destinations or handlers,
 identified by either the id or tags attribute.  If assigned to
 a tag, a handler or destination that matches that tag will be
 chosen at random.
 --
tool id=mytesttool destination=cluster/
/tools
/job_conf

When I run 'my test tool', however, it just hangs.

Any tips?
Thanks,
Dan




 On Tue, Apr 30, 2013 at 4:47 PM, Dan Tenenbaum dtene...@fhcrc.org wrote:

 Hi,

 I have some tools that run really quickly without using any kind of
 cluster.
 I would prefer not to run these tools on a cluster, as the overhead of
 submitting these jobs makes them take much longer than they otherwise
 would.
 I have other tools that are computationally intensive and need to be
 run on a cluster.
 I would like to expose all these tools in the same Galaxy instance,
 but have some tools run on the cluster and others not.

 Is this possible?

 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/

 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:
   http://lists.bx.psu.edu/

 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:
  http://lists.bx.psu.edu/

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


[galaxy-dev] routing to a cluster or not on a per-tool basis

2013-04-30 Thread Dan Tenenbaum
Hi,

I have some tools that run really quickly without using any kind of cluster.
I would prefer not to run these tools on a cluster, as the overhead of
submitting these jobs makes them take much longer than they otherwise
would.
I have other tools that are computationally intensive and need to be
run on a cluster.
I would like to expose all these tools in the same Galaxy instance,
but have some tools run on the cluster and others not.

Is this possible?

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/

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


Re: [galaxy-dev] error uploading file with fresh installation: this request returned None from get_history()

2013-02-04 Thread Dan Tenenbaum
On Mon, Feb 4, 2013 at 11:45 AM, Carlos Borroto
carlos.borr...@gmail.com wrote:
 On Mon, Feb 4, 2013 at 1:55 PM, Dan Tenenbaum dtene...@fhcrc.org wrote:
 Re: login: I believe there's a redirect in place that moves you past the
 older 'Return to the homepage' message automatically - I think you're good
 there (and logged in). Are you seeing the 'Logged in as your email' in the
 'User' menu at the top?


 No. I think I'm not actually being logged in.
 All I see under the User menu is Login and Register.

 I realize this is a long thread and my recommendation might not help
 much or was done it already. Sorry if that's the case.

 This behavior is something I have seen often with Chrome in particular
 and 99% of the time is related to an old cookie. Specially when I'm
 accessing a different galaxy instance from the same URL I accessed a
 previous one, something I see Dan did at the beginning of this thread.
 I recommend erasing any cookie related to galaxy and also trying with
 a different browser. Firefox seems to work particularly fine.


Indeed, it works with Firefox. And it works with Chrome after I delete
my cookies.

Thanks very much!
Dan


 Hope it helps,
 Carlos
___
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] File Upload doesn't generate any activity

2013-02-01 Thread Dan Tenenbaum
On Fri, Feb 1, 2013 at 8:41 AM, Stephen Groenewold
sgroenew...@idtdna.com wrote:
 We’ve  installed a local instance of Galaxy and are having trouble with the
 first step of uploading files. The only thing that will currently upload is
 text pasted into the URL/Text box.



 Any attempt to upload a file using the Browse File box not only fails, it
 never even starts. It’s as if the Execute button is disabled.



 I’ve tried changing the ajax-upload parameter to “false” in
 tools/data_source/upload.xml (as mentioned in a workaround posted to the
 list by Daniel Blankenburg in Aug 2012). I’ve also tried using different
 browsers (including Internet Explorer) and going the route of Adding Data
 Libraries as Admin. None of those attempts have worked.



 Am I missing a configuration setup? Could there be permissions issues on the
 Galaxy machine?



This sounds like the same issue I've reported to this list, which Carl
and others have been kind enough to look at. I think their look is
still in progress but hopefully there will be some news about it soon.
Here is that thread:

http://dev.list.galaxyproject.org/error-uploading-file-with-fresh-installation-this-request-returned-None-from-get-history-td4657958.html#a4657960

Dan



 Thanks.



 Steve




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

___
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] error uploading file with fresh installation: this request returned None from get_history()

2013-01-30 Thread Dan Tenenbaum
On Wed, Jan 30, 2013 at 10:36 AM, Carl Eberhard carlfeberh...@gmail.com wrote:
 Dan,
 Are you cloning from galaxy-central or galaxy-dist? Are you cloning from the
 tip or a specific revision?


I installed galaxy as recommended in the docs:

hg clone https://bitbucket.org/galaxy/galaxy-dist/


 When you see the Syntax error, does Galaxy continue to start up after and
 the upload error (AttributeError: 'NoneType' object has no attribute 'add')
 happens later?

OK, now bizarrely I am having a slightly different problem, but AFAIK
nothing has changed.
I don't get that stack trace on startup and now I can upload pasted
text, but I can't seem to upload files. I tried to upload a 3KB csv
file called sample.csv and it shows up in history with the animated up
arrow but the upload never finishes, and every 4 seconds the log
shows:

127.0.0.1 - - [30/Jan/2013:11:10:09 -0700] GET
/api/histories/8237ee2988567c1c HTTP/1.1 200 -
http://localhost:8080/history; Mozilla/5.0 (Macintosh; Intel Mac OS
X 10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56
Safari/537.17

No error message in the log though.

So I can at least get past my initial place where I was stuck, because
the tools I am developing need only text files as input (which can be
pasted).

I'd still like to know why I can't upload files (from the Choose File
button on the Upload File page).

Thanks for your help,
Dan



 To make sure I'm understanding you correctly, you can find this error in the
 logs of both of your installations?

 Thanks,
 C


 On Tue, Jan 29, 2013 at 1:55 PM, Carl Eberhard carlfeberh...@gmail.com
 wrote:

 galaxy.jobs.handler DEBUG 2013-01-29 09:43:52,107 Loaded job runner:
 galaxy.jobs.runners.local:LocalJobRunner
 galaxy.jobs.handler ERROR 2013-01-29 09:43:52,111 Job runner is not
 loadable: galaxy.jobs.runners.lwr
 Traceback (most recent call last):
   File /Users/dtenenba/dev/galaxy-dist/lib/galaxy/jobs/handler.py,
 line 447, in _load_plugin
 module = __import__( module_name )
   File /Users/dtenenba/dev/galaxy-dist/lib/galaxy/jobs/runners/lwr.py,
 line 232
 worker = threading.Thread( ( name=LwrJobRunner.thread-%d % i ),
 target=self.run_next )
  ^
 SyntaxError: invalid syntax


 It is significant - and not normal behavior. Good catch!

 (You can disregard the 'Error: this request returned None from
 get_history()' message; it records the lack of a current history which is
 normal when you access those pages but haven't logged in yet)



 On Tue, Jan 29, 2013 at 12:49 PM, Dan Tenenbaum dtene...@fhcrc.org
 wrote:

 Hi Carl,



 On Tue, Jan 29, 2013 at 9:30 AM, Carl Eberhard carlfeberh...@gmail.com
 wrote:
  Those are both fine then.
 
  You've got us (temporarily) stumped - even the old timers here.
 
  Can you give some rough information on your system - what OS you're
  using,
  what your network set up would be?
 

 Thanks again for looking into this. It's Mac OS X 10.8.2 with Chrome
 24.0.1312.56, though I have the same problems with Safari 6.0.2
 (8536.26.17) and Firefox 17.0.
 Python 2.7.2.

  Also - if it's not too problematic - can you do a fresh clone of Galaxy
  onto
  your system and see if that installation has the same problem?
 

 I did this and it seems to have pretty much the same problem but a
 slightly different manifestation. Now I am now getting the error
 message Error: this request returned None from get_history():
 http://localhost:8080/; when I try and upload a file; instead, no
 error messages show up in the console, but the upload still fails. I
 do however get that error message when I try and log in as a user
 after registering that user.

 Another thing I notice, in the output immediately after starting run.sh:

 galaxy.jobs.handler DEBUG 2013-01-29 09:43:52,107 Loaded job runner:
 galaxy.jobs.runners.local:LocalJobRunner
 galaxy.jobs.handler ERROR 2013-01-29 09:43:52,111 Job runner is not
 loadable: galaxy.jobs.runners.lwr
 Traceback (most recent call last):
   File /Users/dtenenba/dev/galaxy-dist/lib/galaxy/jobs/handler.py,
 line 447, in _load_plugin
 module = __import__( module_name )
   File /Users/dtenenba/dev/galaxy-dist/lib/galaxy/jobs/runners/lwr.py,
 line 232
 worker = threading.Thread( ( name=LwrJobRunner.thread-%d % i ),
 target=self.run_next )
  ^
 SyntaxError: invalid syntax

 Maybe that is significant?

 Switching back to my previous distribution I get the identical
 behavior...

 Thanks,
 Dan


  C
 
 
 
 
  On Mon, Jan 28, 2013 at 5:03 PM, Dan Tenenbaum dtene...@fhcrc.org
  wrote:
 
  On Mon, Jan 28, 2013 at 1:59 PM, Carl Eberhard
  carlfeberh...@gmail.com
  wrote:
   If you go to your galaxy root in a terminal and then cd to eggs,
   what is
   the
   version listed for SQLAlchemy?
  
 
  SQLAlchemy-0.5.6_dev_r6498-py2.7.egg
 
 
   Do you have SQLAlchemy installed already on that machine (apart from
   the
   one
   in Galaxy's eggs)?
  
 
  I don't think so. I never knowingly installed

Re: [galaxy-dev] error uploading file with fresh installation: this request returned None from get_history()

2013-01-30 Thread Dan Tenenbaum
On Wed, Jan 30, 2013 at 11:36 AM, Carl Eberhard carlfeberh...@gmail.com wrote:
 Well - as long as those errors don't happen again - it may well be progress.

 For the next step, can you:
 1. open Galaxy in Chrome
 2. Go to the settings menu (the button with three horizontal bars on the
 right side of the address bar).
 3. Click the Tools submenu
 4. Click the Javascript Console option
 5. Try to upload your csv file again

 This will see if there are any client side errors that are happening during
 the upload process. It shouldn't take to long to see them if they're there.


Nothing shows up in the javascript console.

 You may also want to post some of the server log information. Specifically,
 (around the time you start the failing upload) any lines you see that start
 with galaxy.jobs (e.g. galaxy.jobs.manager, galaxy.jobs.runners,
 etc.).

I don't see any such lines, just this:
127.0.0.1 - - [30/Jan/2013:11:46:21 -0700] POST
/tool_runner/upload_async_create HTTP/1.1 200 -
http://localhost:8080/; Mozilla/5.0 (Macintosh; Intel Mac OS X
10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56
Safari/537.17
127.0.0.1 - - [30/Jan/2013:11:46:21 -0700] GET
/tool_runner/upload_async_message HTTP/1.1 200 -
http://localhost:8080/; Mozilla/5.0 (Macintosh; Intel Mac OS X
10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56
Safari/537.17
127.0.0.1 - - [30/Jan/2013:11:46:21 -0700] GET /history HTTP/1.1 200
- http://localhost:8080/tool_runner/upload_async_message;
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.17
(KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17
127.0.0.1 - - [30/Jan/2013:11:46:21 -0700] GET
/api/histories/8237ee2988567c1c HTTP/1.1 200 -
http://localhost:8080/history; Mozilla/5.0 (Macintosh; Intel Mac OS
X 10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56
Safari/537.17
127.0.0.1 - - [30/Jan/2013:11:46:25 -0700] GET
/api/histories/8237ee2988567c1c HTTP/1.1 200 -
http://localhost:8080/history; Mozilla/5.0 (Macintosh; Intel Mac OS
X 10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56
Safari/537.17
127.0.0.1 - - [30/Jan/2013:11:46:29 -0700] GET
/api/histories/8237ee2988567c1c HTTP/1.1 200 -
http://localhost:8080/history; Mozilla/5.0 (Macintosh; Intel Mac OS
X 10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56
Safari/537.17
127.0.0.1 - - [30/Jan/2013:11:46:33 -0700] GET
/api/histories/8237ee2988567c1c HTTP/1.1 200 -
http://localhost:8080/history; Mozilla/5.0 (Macintosh; Intel Mac OS
X 10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56
Safari/537.17
127.0.0.1 - - [30/Jan/2013:11:46:38 -0700] GET
/api/histories/8237ee2988567c1c HTTP/1.1 200 -
http://localhost:8080/history; Mozilla/5.0 (Macintosh; Intel Mac OS
X 10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56
Safari/537.17

And the last line repeats every 4 seconds (with timestamp updated).

Dan


 C





 On Wed, Jan 30, 2013 at 2:13 PM, Dan Tenenbaum dtene...@fhcrc.org wrote:

 On Wed, Jan 30, 2013 at 10:36 AM, Carl Eberhard carlfeberh...@gmail.com
 wrote:
  Dan,
  Are you cloning from galaxy-central or galaxy-dist? Are you cloning from
  the
  tip or a specific revision?
 

 I installed galaxy as recommended in the docs:

 hg clone https://bitbucket.org/galaxy/galaxy-dist/


  When you see the Syntax error, does Galaxy continue to start up after
  and
  the upload error (AttributeError: 'NoneType' object has no attribute
  'add')
  happens later?

 OK, now bizarrely I am having a slightly different problem, but AFAIK
 nothing has changed.
 I don't get that stack trace on startup and now I can upload pasted
 text, but I can't seem to upload files. I tried to upload a 3KB csv
 file called sample.csv and it shows up in history with the animated up
 arrow but the upload never finishes, and every 4 seconds the log
 shows:

 127.0.0.1 - - [30/Jan/2013:11:10:09 -0700] GET
 /api/histories/8237ee2988567c1c HTTP/1.1 200 -
 http://localhost:8080/history; Mozilla/5.0 (Macintosh; Intel Mac OS
 X 10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56
 Safari/537.17

 No error message in the log though.

 So I can at least get past my initial place where I was stuck, because
 the tools I am developing need only text files as input (which can be
 pasted).

 I'd still like to know why I can't upload files (from the Choose File
 button on the Upload File page).

 Thanks for your help,
 Dan



  To make sure I'm understanding you correctly, you can find this error in
  the
  logs of both of your installations?
 
  Thanks,
  C
 
 
  On Tue, Jan 29, 2013 at 1:55 PM, Carl Eberhard carlfeberh...@gmail.com
  wrote:
 
  galaxy.jobs.handler DEBUG 2013-01-29 09:43:52,107 Loaded job runner:
  galaxy.jobs.runners.local:LocalJobRunner
  galaxy.jobs.handler ERROR 2013-01-29 09:43:52,111 Job runner is not
  loadable: galaxy.jobs.runners.lwr
  Traceback (most recent call last):
File /Users/dtenenba/dev/galaxy-dist/lib/galaxy/jobs/handler.py

Re: [galaxy-dev] error uploading file with fresh installation: this request returned None from get_history()

2013-01-28 Thread Dan Tenenbaum
On Mon, Jan 28, 2013 at 1:40 PM, Carl Eberhard carlfeberh...@gmail.com wrote:
 I was incorrect in stating that the changes in the next galaxy-dist will
 help in this case, unfortunately. From the stack trace you posted, there is
 a deeper error with your instance that the client-side changes won't help.

 Can you post the size, type, and name of the file you're trying to upload?


I can reproduce this by just typing hello, world into the
URL/Text: box on the Upload File page. Any file of any type seems
to trigger this problem.

Thanks,
Dan



 On Thu, Jan 24, 2013 at 6:12 PM, Dan Tenenbaum dtene...@fhcrc.org wrote:

 On Wed, Jan 23, 2013 at 3:19 PM, Carl Eberhard carlfeberh...@gmail.com
 wrote:
  Another thing you might try is to upload the file to our test server:
  https://test.g2.bx.psu.edu/ and see if that works.
 

 Thanks, that does work.

 Setting up an FTP server on my local installation seems pretty
 complex. All I really want to do is work around this issue and fool
 Galaxy into thinking that I have uploaded a file using the
 uploader...since this is a local installation I can put a file
 anywhere on my system, I don't have to actually upload it, just place
 it in a directory.

 If there is no such workaround, I'll wait for the fix, I guess. Thanks
 very much for working on this!
 Dan


 
  On Wed, Jan 23, 2013 at 6:06 PM, Carl Eberhard carlfeberh...@gmail.com
  wrote:
 
  If this is happening consistently and a refresh on the history isn't
  doing
  anything, you might try ftp upload:
  http://wiki.galaxyproject.org/FTPUpload
  or if you have permissions or are an admin you can try uploading to a
  data
  library:
  http://wiki.galaxyproject.org/Admin/DataLibraries/UploadingLibraryFiles
 
 
 
  On Wed, Jan 23, 2013 at 5:44 PM, Dan Tenenbaum dtene...@fhcrc.org
  wrote:
 
  On Wed, Jan 23, 2013 at 2:42 PM, Carl Eberhard
  carlfeberh...@gmail.com
  wrote:
   What sort of database are you using on your local instance?
  
 
  The default (sqlite I guess). It's a completely vanilla instance, I
  have not touched the config files.
  Dan
 
 
  
   On Wed, Jan 23, 2013 at 5:37 PM, Dan Tenenbaum dtene...@fhcrc.org
   wrote:
  
   On Wed, Jan 23, 2013 at 2:35 PM, Carl Eberhard
   carlfeberh...@gmail.com
   wrote:
Thanks, Dan. That helps and I'll start looking into this.
   
We will be pushing out a new galaxy-dist revision sometime this
week
if
all
goes well. This revision includes some code for the history panel
that
may
help handle this situation a bit better. I'd recommend updating
to
that
revision when it comes out.
   
  
   Thanks! Is there a workaround to upload a file or add it to my
   history
   in the meantime? Command-line is ok. If there isn't one, that's ok
   too
   Dan
  
  
  
I'll let you know what I can find.
Carl
   
   
   
On Wed, Jan 23, 2013 at 5:18 PM, Dan Tenenbaum
dtene...@fhcrc.org
wrote:
   
Hi Carl,
   
On Wed, Jan 23, 2013 at 2:14 PM, Carl Eberhard
carlfeberh...@gmail.com
wrote:
 Heya, Dan.

 Sorry for the trouble.
 When you get that error again look for a line like you have
 above:
 Debug at: http://localhost:8080/_debug/view/1358978130

 If you open a new tab or window in your browser and go to the
 address
 ('http://localhost:8080/_debug ...'), you should see a more
 informative
 error message - complete with a list of function calls that
 led
 to
 the
 error
 (a stack trace).

 Can you post that stack trace when you see it?

   
Thanks for the quick response. Here it is:
   
URL: http://localhost:8080/tool_runner/upload_async_create
File
   
   
   
'/Users/dtenenba/dev/galaxy-dist/eggs/WebError-0.8a-py2.7.egg/weberror/evalexception/middleware.py',
line 364 in respond
  app_iter = self.application(environ, detect_start_response)
File
   
   
   
'/Users/dtenenba/dev/galaxy-dist/eggs/Paste-1.6-py2.7.egg/paste/debug/prints.py',
line 98 in __call__
  environ, self.app)
File
   
   
   
'/Users/dtenenba/dev/galaxy-dist/eggs/Paste-1.6-py2.7.egg/paste/wsgilib.py',
line 539 in intercept_output
  app_iter = application(environ, replacement_start_response)
File
   
   
   
'/Users/dtenenba/dev/galaxy-dist/eggs/Paste-1.6-py2.7.egg/paste/recursive.py',
line 80 in __call__
  return self.application(environ, start_response)
File
   
   
   
'/Users/dtenenba/dev/galaxy-dist/eggs/Paste-1.6-py2.7.egg/paste/httpexceptions.py',
line 632 in __call__
  return self.application(environ, start_response)
File
   
'/Users/dtenenba/dev/galaxy-dist/lib/galaxy/web/framework/base.py',
line 160 in __call__
  body = method( trans, **kwargs )
File
   
   
'/Users/dtenenba/dev/galaxy-dist/lib/galaxy/web/framework/__init__.py',
line 73 in decorator
  return simplejson.dumps( func( self, trans, *args, **kwargs

Re: [galaxy-dev] error uploading file with fresh installation: this request returned None from get_history()

2013-01-28 Thread Dan Tenenbaum
On Mon, Jan 28, 2013 at 1:59 PM, Carl Eberhard carlfeberh...@gmail.com wrote:
 If you go to your galaxy root in a terminal and then cd to eggs, what is the
 version listed for SQLAlchemy?


SQLAlchemy-0.5.6_dev_r6498-py2.7.egg


 Do you have SQLAlchemy installed already on that machine (apart from the one
 in Galaxy's eggs)?


I don't think so. I never knowingly installed it and in a fresh python
session, 'import sqlalchemy' returns an error that there is no such
module.

Thanks,
Dan




 On Mon, Jan 28, 2013 at 4:50 PM, Dan Tenenbaum dtene...@fhcrc.org wrote:

 On Mon, Jan 28, 2013 at 1:40 PM, Carl Eberhard carlfeberh...@gmail.com
 wrote:
  I was incorrect in stating that the changes in the next galaxy-dist will
  help in this case, unfortunately. From the stack trace you posted, there
  is
  a deeper error with your instance that the client-side changes won't
  help.
 
  Can you post the size, type, and name of the file you're trying to
  upload?
 

 I can reproduce this by just typing hello, world into the
 URL/Text: box on the Upload File page. Any file of any type seems
 to trigger this problem.

 Thanks,
 Dan


 
  On Thu, Jan 24, 2013 at 6:12 PM, Dan Tenenbaum dtene...@fhcrc.org
  wrote:
 
  On Wed, Jan 23, 2013 at 3:19 PM, Carl Eberhard
  carlfeberh...@gmail.com
  wrote:
   Another thing you might try is to upload the file to our test server:
   https://test.g2.bx.psu.edu/ and see if that works.
  
 
  Thanks, that does work.
 
  Setting up an FTP server on my local installation seems pretty
  complex. All I really want to do is work around this issue and fool
  Galaxy into thinking that I have uploaded a file using the
  uploader...since this is a local installation I can put a file
  anywhere on my system, I don't have to actually upload it, just place
  it in a directory.
 
  If there is no such workaround, I'll wait for the fix, I guess. Thanks
  very much for working on this!
  Dan
 
 
  
   On Wed, Jan 23, 2013 at 6:06 PM, Carl Eberhard
   carlfeberh...@gmail.com
   wrote:
  
   If this is happening consistently and a refresh on the history isn't
   doing
   anything, you might try ftp upload:
   http://wiki.galaxyproject.org/FTPUpload
   or if you have permissions or are an admin you can try uploading to
   a
   data
   library:
  
   http://wiki.galaxyproject.org/Admin/DataLibraries/UploadingLibraryFiles
  
  
  
   On Wed, Jan 23, 2013 at 5:44 PM, Dan Tenenbaum dtene...@fhcrc.org
   wrote:
  
   On Wed, Jan 23, 2013 at 2:42 PM, Carl Eberhard
   carlfeberh...@gmail.com
   wrote:
What sort of database are you using on your local instance?
   
  
   The default (sqlite I guess). It's a completely vanilla instance, I
   have not touched the config files.
   Dan
  
  
   
On Wed, Jan 23, 2013 at 5:37 PM, Dan Tenenbaum
dtene...@fhcrc.org
wrote:
   
On Wed, Jan 23, 2013 at 2:35 PM, Carl Eberhard
carlfeberh...@gmail.com
wrote:
 Thanks, Dan. That helps and I'll start looking into this.

 We will be pushing out a new galaxy-dist revision sometime
 this
 week
 if
 all
 goes well. This revision includes some code for the history
 panel
 that
 may
 help handle this situation a bit better. I'd recommend
 updating
 to
 that
 revision when it comes out.

   
Thanks! Is there a workaround to upload a file or add it to my
history
in the meantime? Command-line is ok. If there isn't one, that's
ok
too
Dan
   
   
   
 I'll let you know what I can find.
 Carl



 On Wed, Jan 23, 2013 at 5:18 PM, Dan Tenenbaum
 dtene...@fhcrc.org
 wrote:

 Hi Carl,

 On Wed, Jan 23, 2013 at 2:14 PM, Carl Eberhard
 carlfeberh...@gmail.com
 wrote:
  Heya, Dan.
 
  Sorry for the trouble.
  When you get that error again look for a line like you have
  above:
  Debug at: http://localhost:8080/_debug/view/1358978130
 
  If you open a new tab or window in your browser and go to
  the
  address
  ('http://localhost:8080/_debug ...'), you should see a more
  informative
  error message - complete with a list of function calls that
  led
  to
  the
  error
  (a stack trace).
 
  Can you post that stack trace when you see it?
 

 Thanks for the quick response. Here it is:

 URL: http://localhost:8080/tool_runner/upload_async_create
 File




 '/Users/dtenenba/dev/galaxy-dist/eggs/WebError-0.8a-py2.7.egg/weberror/evalexception/middleware.py',
 line 364 in respond
   app_iter = self.application(environ, detect_start_response)
 File




 '/Users/dtenenba/dev/galaxy-dist/eggs/Paste-1.6-py2.7.egg/paste/debug/prints.py',
 line 98 in __call__
   environ, self.app)
 File




 '/Users/dtenenba/dev/galaxy-dist/eggs/Paste-1.6-py2.7.egg/paste/wsgilib.py',
 line 539 in intercept_output

[galaxy-dev] error uploading file with fresh installation: this request returned None from get_history()

2013-01-23 Thread Dan Tenenbaum
Hi,

I installed galaxy completely from scratch:

rm -rf galaxy-dist   hg clone https://bitbucket.org/galaxy/galaxy-dist/

I'm not a mercurial expert but I think I have changeset
8530:a4113cc1cb5e; at least that's the first entry in hg log.

Then started galaxy like this:
cd galaxy-dist
./run.sh

I went to http://localhost:8080 and tried to upload a file. I never
saw the file in my history, and this is what printed out in the
console after I clicked Execute on the Upload File page:

galaxy.web.framework DEBUG 2013-01-23 13:56:11,573 Error: this request
returned None from get_history():
http://localhost:8080/tool_runner/upload_async_create
galaxy.web.framework DEBUG 2013-01-23 13:56:11,573 Error: this request
returned None from get_history():
http://localhost:8080/tool_runner/upload_async_create
galaxy.web.framework DEBUG 2013-01-23 13:56:11,573 Error: this request
returned None from get_history():
http://localhost:8080/tool_runner/upload_async_create
galaxy.web.framework DEBUG 2013-01-23 13:56:11,573 Error: this request
returned None from get_history():
http://localhost:8080/tool_runner/upload_async_create
galaxy.web.framework DEBUG 2013-01-23 13:56:11,573 Error: this request
returned None from get_history():
http://localhost:8080/tool_runner/upload_async_create
galaxy.web.framework DEBUG 2013-01-23 13:56:11,573 Error: this request
returned None from get_history():
http://localhost:8080/tool_runner/upload_async_create
galaxy.web.framework DEBUG 2013-01-23 13:56:11,573 Error: this request
returned None from get_history():
http://localhost:8080/tool_runner/upload_async_create
galaxy.web.framework DEBUG 2013-01-23 13:56:11,574 Error: this request
returned None from get_history():
http://localhost:8080/tool_runner/upload_async_create
galaxy.web.framework DEBUG 2013-01-23 13:56:11,574 Error: this request
returned None from get_history():
http://localhost:8080/tool_runner/upload_async_create
127.0.0.1 - - [23/Jan/2013:13:56:11 -0700] POST
/tool_runner/upload_async_create HTTP/1.1 500 -
http://localhost:8080/; Mozilla/5.0 (Macintosh; Intel Mac OS X
10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56
Safari/537.17
Debug at: http://localhost:8080/_debug/view/1358978130
127.0.0.1 - - [23/Jan/2013:13:56:11 -0700] GET
/tool_runner/upload_async_message HTTP/1.1 200 -
http://localhost:8080/; Mozilla/5.0 (Macintosh; Intel Mac OS X
10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56
Safari/537.17
127.0.0.1 - - [23/Jan/2013:13:56:11 -0700] GET /history HTTP/1.1 200
- http://localhost:8080/tool_runner/upload_async_message;
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.17
(KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17

Hope someone can help.
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/


Re: [galaxy-dev] filtering a param of type 'data' so only one type is available

2013-01-23 Thread Dan Tenenbaum
On Wed, Jan 23, 2013 at 3:51 PM, Ross ross.laza...@gmail.com wrote:
 Hi, Dan.
 Using format=rda will restrict the list to history items of the 'rda'
 datatype - but ONLY if the rda datatype has been defined!
 The easiest way to do that is to define a new datatype in datatypes_conf.xml
 and since rData is binary, you should subclass binary.
 Something like (untested - especially the mimetype !)
 datatype extension=rda type=galaxy.datatypes.binary:Binary
 mimetype=application/x-rlang-transport subclass=True /
 might work. A server restart is always required to load any new datatypes.
 Good luck!


It works! I changed the mime type to application/x-gzip, since
serialized R objects are gzipped.

Thanks,
Dan




 On Thu, Jan 24, 2013 at 10:41 AM, Dan Tenenbaum dtene...@fhcrc.org wrote:

 Hi,

 I have a tool wrapper with a param of type=data.

 Currently, this renders as a text box with a drop down list that has
 52 items in it (the number of things I have in my history, I guess).

 I'd like to filter this list so that only some items in the history
 (in my case any item whose name ends with '.rda') are shown in this
 dropdown.

 It seems like maybe the 'format' parameter to the 'param' tag is what
 I want, but:
 1) I tried format=rda and that didn't seem to change anything.
 2) rda is not in the datatypes.conf file which the documentation
 suggests is required?

 (.rda is an extension used for serialized R objects.)

 The tool I'm working on only accepts rda files as input and the reason
 I'm asking for this is that it is all too easy to accidentally feed it
 a file of some other type. If the dropdown could be filtered so that
 only items which will work with the tool are shown, that would be
 great.

 Is there a way to do that?
 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/




 --
 Ross Lazarus MBBS MPH;
 Head, Medical Bioinformatics, BakerIDI; Tel: +61 385321444
 http://scholar.google.com/citations?hl=enuser=UCUuEM4J
___
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] filtering a param of type 'data' so only one type is available

2013-01-23 Thread Dan Tenenbaum
On Wed, Jan 23, 2013 at 4:03 PM, Ross ross.laza...@gmail.com wrote:
 Hi, Dan
 Glad it worked and thanks for pointing out a more general mimetype - does
 any one else (other than me) want to vote to add
 datatype extension=rda type=galaxy.datatypes.binary:Binary
 mimetype=application/x-gzip subclass=True /
 to datatypes_conf.xml.sample permanently ?


I do. This would be great as I am automating the creation of galaxy
tools and I'd like to be able to enable this feature without requiring
(either manual or programmatic) editing of datatypes_conf.xml.

Note that serialized R objects also sometimes have the .RData
extension -- both are valid -- so it would be good to support that as
well.

But now that I think about it, serialized objects are not always gzip
files--depending on the value of the 'compression' flag used with the
save() function, it may be gzip, bzip, xz, or even ascii!

So maybe the mime type should be changed back to something different,
like application/x-rlang-transport as you suggested.

I tried this and it seemed to work; It did the filtering I wanted and
I was still able to download a history item with this type.

Dan


Thanks,
Dan



 On Thu, Jan 24, 2013 at 10:58 AM, Dan Tenenbaum dtene...@fhcrc.org wrote:

 On Wed, Jan 23, 2013 at 3:51 PM, Ross ross.laza...@gmail.com wrote:
  Hi, Dan.
  Using format=rda will restrict the list to history items of the 'rda'
  datatype - but ONLY if the rda datatype has been defined!
  The easiest way to do that is to define a new datatype in
  datatypes_conf.xml
  and since rData is binary, you should subclass binary.
  Something like (untested - especially the mimetype !)
  datatype extension=rda type=galaxy.datatypes.binary:Binary
  mimetype=application/x-rlang-transport subclass=True /
  might work. A server restart is always required to load any new
  datatypes.
  Good luck!
 

 It works! I changed the mime type to application/x-gzip, since
 serialized R objects are gzipped.

 Thanks,
 Dan


 
 
  On Thu, Jan 24, 2013 at 10:41 AM, Dan Tenenbaum dtene...@fhcrc.org
  wrote:
 
  Hi,
 
  I have a tool wrapper with a param of type=data.
 
  Currently, this renders as a text box with a drop down list that has
  52 items in it (the number of things I have in my history, I guess).
 
  I'd like to filter this list so that only some items in the history
  (in my case any item whose name ends with '.rda') are shown in this
  dropdown.
 
  It seems like maybe the 'format' parameter to the 'param' tag is what
  I want, but:
  1) I tried format=rda and that didn't seem to change anything.
  2) rda is not in the datatypes.conf file which the documentation
  suggests is required?
 
  (.rda is an extension used for serialized R objects.)
 
  The tool I'm working on only accepts rda files as input and the reason
  I'm asking for this is that it is all too easy to accidentally feed it
  a file of some other type. If the dropdown could be filtered so that
  only items which will work with the tool are shown, that would be
  great.
 
  Is there a way to do that?
  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/
 
 
___
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] Error trying to run functional tests on a single tool

2012-10-31 Thread Dan Tenenbaum
Hi,

I'm trying to test out the functional testing mechanism by running it
on an existing Galaxy tool.

First I ran
./run_functional_tests.sh -list

which produced a list of tools I can test. I chose 'vcf_annotate' and
tested it as follows:

./run_functional_tests.sh -id vcf_annotate

This produced a lot of output which included an exception trace. The
output was not conclusive as to whether the test ran or was
successful.

The output is too long for this mailing list but you can find it here:
https://gist.github.com/3988398

I am reluctant to try and excerpt the relevant bits because it's hard
for me to know what is relevant and what is not.

I am running the latest Galaxy (just did hg pull/hg update and migrated).
This is on a Mac OS X 10.7.4 machine with python 2.7.

When I run the same command on a linux machine, it works (though it
took me a while to find the test output; it was buried in a lot of
output that also contained (apparently irrelevant) stack traces).

So perhaps there is something wrong with my configuration.

Hope someone can help me out.

Also had a couple of newbie questions about the functional test framework.
1) Why does it use tool_conf.xml.sample instead of tool_conf.xml? Can
I change it to use tool_conf.xml? This way I do not need to add tools
to two places in order to test them. (Plus the name of
tool_conf.xml.sample indicates that it is just a demo file).
2) run_functional_tests.sh -list lists tools (such as 'upload1') that
do not have functional tests, so cannot (if my understanding is
correct) be tested with this script. Perhaps it would make more sense
not to list these tools?

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] Error when param has no value and type is float or integer

2012-09-19 Thread Dan Tenenbaum
Hi,

If I have a tool wrapper with this:

param name=x type=integer help=the x param/

I get an error when I start Galaxy:

galaxy.tools ERROR 2012-09-19 12:09:08,056 Error reading tool from
path: RGalaxy_test_tool/foo.xml
Traceback (most recent call last):
  File /Users/dtenenba/dev/galaxy-dist/lib/galaxy/tools/__init__.py,
line 332, in load_tool_tag_set
tool = self.load_tool( os.path.join( tool_path, path ), guid=guid )
  File /Users/dtenenba/dev/galaxy-dist/lib/galaxy/tools/__init__.py,
line 450, in load_tool
return ToolClass( config_file, root, self.app, guid=guid )
  File /Users/dtenenba/dev/galaxy-dist/lib/galaxy/tools/__init__.py,
line 788, in __init__
self.parse( root, guid=guid )
  File /Users/dtenenba/dev/galaxy-dist/lib/galaxy/tools/__init__.py,
line 959, in parse
self.parse_inputs( root )
  File /Users/dtenenba/dev/galaxy-dist/lib/galaxy/tools/__init__.py,
line 1043, in parse_inputs
display, inputs = self.parse_input_page( page, enctypes )
  File /Users/dtenenba/dev/galaxy-dist/lib/galaxy/tools/__init__.py,
line 1439, in parse_input_page
inputs = self.parse_input_elem( input_elem, enctypes )
  File /Users/dtenenba/dev/galaxy-dist/lib/galaxy/tools/__init__.py,
line 1532, in parse_input_elem
param = self.parse_param_elem( elem, enctypes, context )
  File /Users/dtenenba/dev/galaxy-dist/lib/galaxy/tools/__init__.py,
line 1544, in parse_param_elem
param = ToolParameter.build( self, input_elem )
  File /Users/dtenenba/dev/galaxy-dist/lib/galaxy/tools/parameters/basic.py,
line 176, in build
return parameter_types[param_type]( tool, param )
  File /Users/dtenenba/dev/galaxy-dist/lib/galaxy/tools/parameters/basic.py,
line 228, in __init__
raise ValueError( The settings for the field named '%s' require a
'value' setting and optionally a default value which must be an
integer % self.name )
ValueError: The settings for the field named 'x' require a 'value'
setting and optionally a default value which must be an integer

However, according to the documentation:
http://wiki.g2.bx.psu.edu/Admin/Tools/Tool%20Config%20Syntax#A.3Cparam.3E_tag_set

The value attribute to the param tag is not required.

It's easy to work around this, by adding value=, but I'm wondering
if it's a bug, documentation or otherwise.

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] creating a galaxy dataset within a galaxy tool

2012-09-18 Thread Dan Tenenbaum
I'd like to have a tool that does not actually return anything (is
that possible?) but writes a file to the directory where Galaxy stores
uploaded data files, and tells Galaxy about it (perhaps that involves
writing to a database?). My tool is written in R.

Here is my scenario:
I want the user to upload a text file, then pass that text file, along
with several parameters, (in something we'll call Tool1) which I use
to create a serialized R object. That object is then used in several
other tools. I don't want the user to have to download and then
re-upload the serialized object. I want it to just be available after
the user runs Tool1.

I realize that workflows could solve my problem here, but I want to
keep the UI as simple as possible. For Tool2..ToolN, I don't want to
have to always ask the user for the parameters for Tool1 as well as
the current tool.

So, is there a way for my tool to make Galaxy aware of an additional dataset?
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/


Re: [galaxy-dev] creating a galaxy dataset within a galaxy tool

2012-09-18 Thread Dan Tenenbaum
Hi James,

I realize I didn't do a good job explaining, but your suggestion
sounds promising. How can I make something into a dataset?

Here's what I'm hoping to achieve:
User runs Tool1, uploading a text file and specifying some parameters.
Tool1 uses this to write out a serialized R object. Somehow this
object is persisted in Galaxy (made into a dataset).
Now the user can run Tool2 or Tool3, which each take the dataset
created in the previous step, plus some parameters of their own.

So I guess the only part I am missing is how to turn the output of
Tool1 into a dataset. Is there a way to do this other than downloading
it to my local computer and then uploading it to Galaxy? That seems
awkward

Thanks,
Dan




On Tue, Sep 18, 2012 at 3:41 PM, James Taylor ja...@jamestaylor.org wrote:
 Dan, I may not be following, but why not make the serialized R object
 a dataset (of its own datatype). Then the user can just pass it to the
 downstream tools just by specifying one parameter.

 -- jt


 On Tue, Sep 18, 2012 at 3:00 PM, Dan Tenenbaum dtene...@fhcrc.org wrote:
 I want the user to upload a text file, then pass that text file, along
 with several parameters, (in something we'll call Tool1) which I use
 to create a serialized R object. That object is then used in several
 other tools. I don't want the user to have to download and then
 re-upload the serialized object. I want it to just be available after
 the user runs Tool1.
___
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] select with =20 options renders as autocompleting text box

2012-09-11 Thread Dan Tenenbaum
Hi,

I notice that a param with type select renders differently
depending on how many options there
are. If there are  20 options, it appears as a normal select box. If
there are = 20 options, it looks like a text box (but it has
autocompletion and does have a dropdown menu), and Inspect Element in
Chrome reveals that it in fact is an input type=text with the
classes text-and-autocomplete-select ac_input.

Is this deliberate? If so, can the behavior be turned off?

I suppose that there is no functional impact, but it looks sort of odd
and jarring to have several select boxes one of which happens to look
different just because of the number of options it has.

Example:


param name=distance type=select help= label=Distance
Method force_select=FALSE
  option value=None1/option
/param

...renders as a normal select box.


param name=distance type=select help= label=Distance
Method force_select=FALSE
  option value=None1/option
  option value=None2/option
  option value=None3/option
  option value=None4/option
  option value=None5/option
  option value=None6/option
  option value=None7/option
  option value=None8/option
  option value=None9/option
  option value=None10/option
  option value=None11/option
  option value=None12/option
  option value=None13/option
  option value=None14/option
  option value=None15/option
  option value=None16/option
  option value=None17/option
  option value=None18/option
  option value=None19/option
  option value=None20/option
/param

...renders as a text box with autocomplete.

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/


Re: [galaxy-dev] using data_ref to refer to column names?

2012-09-04 Thread Dan Tenenbaum
So, sounds like maybe this feature does not existI'd like to
request it (given a dataset, I'd like to be able to show the column
headers of that dataset in a select box).
Thanks,
Dan


On Wed, Aug 29, 2012 at 11:09 AM, Dan Tenenbaum dtene...@fhcrc.org wrote:
 Hi,
 I have some code that makes a plot and creates a legend from a given
 column name in the user's input data, which may have arbitrary column
 names.

 I'd like to create a dropdown list that has all the column names in
 it, but I don't know the names beforehand; I won't know them until the
 user uploads their data file. So all I can do is have a freeform text
 box where I ask the user to type a column name, which seems
 error-prone and ugly.

 I notice that the XY plotting tool has something sort of like this,
 where it can tell how many columns are in your dataset and lets you
 choose them, but it calls the columns c1, c2, etc.
 My datasets have a header line with column names and I want to show
 the actual column name, not reference them by column number. Is this
 possible?

 Is there a solution to this? I have a number of use cases like this,
 so it would be great if there was.
 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/


Re: [galaxy-dev] using data_ref to refer to column names?

2012-09-04 Thread Dan Tenenbaum
On Tue, Sep 4, 2012 at 4:57 PM, Peter Cock p.j.a.c...@googlemail.com wrote:
 On Tue, Sep 4, 2012 at 4:54 PM, Dan Tenenbaum dtene...@fhcrc.org wrote:
 So, sounds like maybe this feature does not existI'd like to
 request it (given a dataset, I'd like to be able to show the column
 headers of that dataset in a select box).
 Thanks,
 Dan

 No, it doesn't, but I'd like it too:
 https://bitbucket.org/galaxy/galaxy-central/issue/554/show-column-names-headers-or-first-entry

Thanks much.

Strong +1 from me.
Dan



 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/


[galaxy-dev] using data_ref to refer to column names?

2012-08-29 Thread Dan Tenenbaum
Hi,
I have some code that makes a plot and creates a legend from a given
column name in the user's input data, which may have arbitrary column
names.

I'd like to create a dropdown list that has all the column names in
it, but I don't know the names beforehand; I won't know them until the
user uploads their data file. So all I can do is have a freeform text
box where I ask the user to type a column name, which seems
error-prone and ugly.

I notice that the XY plotting tool has something sort of like this,
where it can tell how many columns are in your dataset and lets you
choose them, but it calls the columns c1, c2, etc.
My datasets have a header line with column names and I want to show
the actual column name, not reference them by column number. Is this
possible?

Is there a solution to this? I have a number of use cases like this,
so it would be great if there was.
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] grouping/separating parameters on the page

2012-08-17 Thread Dan Tenenbaum
Hello,

Is there a way to do one or both of the following:
1) Group a set of related parameters together on a tool page
2) Put a separator in between related groups.

I have a tool with lots of parameters. It's ok to have them all on one
page but I'd like to have some space or a line between the related
groups (and maybe even a header for the group) so that users know
which parameters are related.

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/


Re: [galaxy-dev] Conditionally showing certain form elements on tool page

2012-08-16 Thread Dan Tenenbaum
Hi John,

On Thu, Aug 16, 2012 at 9:51 AM, John Patterson jmpa...@g.uky.edu wrote:
 On 08/15/2012 08:59 PM, Dan Tenenbaum wrote:

 Hi all,

 I'm trying to wrap my head around what the conditional tag does...it
 looks like it doesn't do what I would like.

 I want to create a tool that allows the user to upload a data file and
 then have it run through one or more filters. Each filter takes one or
 more parameters.

 I was thinking I could do something like this:


inputs
   conditional name=mycond
   param name=checktest type=boolean label=foo
 value=yessir
   /param
   when value=yessir
   param name=param1 type=text label=bar value=twunk
   /param
   /when
   /conditional
/inputs

 The idea being, if the user checks the box labeled foo, a text box
 labeled bar will appear.
 And I would have several such checkboxes and their accompanying
 parameters.
 But what I get is just the checkbox, and nothing happens when I click it.

 Is it possible to do what I have in mind, and if so, how?

 Also note that these conditions are not mutually exclusive. A user can
 select one *or more* filters. So I'm not sure how the body of my
 command tag should look. Is there a way I can just pass every
 possible parameter to my script like this:
 myscript.py param1=foo param2=bar
 If a parameter is not defined (because the user didn't click its
 associated checkbox), then the script will receive e.g.
 param1= param2=bar
 but it can deal with that.

 I realize I can make several tools and chain them together in a
 workflow, but that seems like overkill for this use case, and it would
 be nice if the user could set up their desired filters on one screen.

 Is this possible?
 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/

 Hello Dan,

 The easiest way to go about this, since you said that none of your
 filters are mutually exclusive, is to use the select datatype. I don't
 think you even need the conditional tags. Galaxy says that you need when
 tag sets when you use conditionals, but this is not true, as I have similar
 code as I have written below. Use type=select in your parameter. This
 gives you a button that can have a multitude of options, but most of mine
 are simply used like booleans. Something like this:

 inputs
 param name=param1 type=select label=filterName help=helpful
 tips
 option value=yesyes/option
 option value=nono/option
  /param
  param name=param2 type=select label=filter2Name help=more
 helpful tips
 option value=yesyes/option
 option value=nono/option
  /param
 /inputs

 I had certain options that WERE mutually exclusive, and required nested
 conditional statements, where I had an outer conditional for the extra
 options, and an inner conditional around each parameter.

 As for the command tag, the select type parameters make it easy because you
 can just check the string values with an if statement, like so:
 (assuming python)
 command interpreter=python
 tool.py
 #if $param1 == yes:
 --YourGetOptFlag
 #else:
 ##dont even need an else, just ignore
 #end if

 /command

 If I am not mistaken, this should be sufficient if all you need to pass is a
 flag indicating your program to use the filter. If you need to pass a flag
 AND integer values, you are going to have to wrap your parameters in
 conditional tags and use a set of when:

 inputs
   conditional name=firstConditional
 param name=param1 type=select label=filterName help=helpful
 tips
 option value=yesyes/option
 option value=nono/option
  /param
  when value=yes
param name=IntegerBox type=integer value=[default value]
 min=(optional) max=(optional) label=UseParamName help=helpful text
 /
  /when
  when value=no / !--Doesnt show integer text box when no is chosen
 in the select--
   /conditional
 /inputs

 Rinse and repeat, adding conditionals around each select. I think this is
 actually what you want to do, as you say you want a box to appear after a
 user selects whether or not to use the filter. Also, quick note, the text
 between the option tags are what appear on the select buttons, so they can
 be whatever you want. The value= is the important thing, as this is what
 you will evaluate the if/else to in the command tag. One last thing, The
 cheetah command is really no different.

 command interpreter=python
   tool.py
   #if $firstConditional.param1 == yes:
  --testGetOpt $firstConditional.IntegerBox
   #end if

 /command

 The second command tag is how I pass a few parameters into my command line
 tool.


 Anyway, I hope this helped a little bit. If you need anything else, let me
 know and I will see If I can help

Re: [galaxy-dev] Conditionally showing certain form elements on tool page

2012-08-16 Thread Dan Tenenbaum
On Thu, Aug 16, 2012 at 10:53 AM, Dan Tenenbaum dtene...@fhcrc.org wrote:
 Hi John,

 On Thu, Aug 16, 2012 at 9:51 AM, John Patterson jmpa...@g.uky.edu wrote:
 On 08/15/2012 08:59 PM, Dan Tenenbaum wrote:

 Hi all,

 I'm trying to wrap my head around what the conditional tag does...it
 looks like it doesn't do what I would like.

 I want to create a tool that allows the user to upload a data file and
 then have it run through one or more filters. Each filter takes one or
 more parameters.

 I was thinking I could do something like this:


inputs
   conditional name=mycond
   param name=checktest type=boolean label=foo
 value=yessir
   /param
   when value=yessir
   param name=param1 type=text label=bar value=twunk
   /param
   /when
   /conditional
/inputs

 The idea being, if the user checks the box labeled foo, a text box
 labeled bar will appear.
 And I would have several such checkboxes and their accompanying
 parameters.
 But what I get is just the checkbox, and nothing happens when I click it.

 Is it possible to do what I have in mind, and if so, how?

 Also note that these conditions are not mutually exclusive. A user can
 select one *or more* filters. So I'm not sure how the body of my
 command tag should look. Is there a way I can just pass every
 possible parameter to my script like this:
 myscript.py param1=foo param2=bar
 If a parameter is not defined (because the user didn't click its
 associated checkbox), then the script will receive e.g.
 param1= param2=bar
 but it can deal with that.

 I realize I can make several tools and chain them together in a
 workflow, but that seems like overkill for this use case, and it would
 be nice if the user could set up their desired filters on one screen.

 Is this possible?
 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/

 Hello Dan,

 The easiest way to go about this, since you said that none of your
 filters are mutually exclusive, is to use the select datatype. I don't
 think you even need the conditional tags. Galaxy says that you need when
 tag sets when you use conditionals, but this is not true, as I have similar
 code as I have written below. Use type=select in your parameter. This
 gives you a button that can have a multitude of options, but most of mine
 are simply used like booleans. Something like this:

 inputs
 param name=param1 type=select label=filterName help=helpful
 tips
 option value=yesyes/option
 option value=nono/option
  /param
  param name=param2 type=select label=filter2Name help=more
 helpful tips
 option value=yesyes/option
 option value=nono/option
  /param
 /inputs

 I had certain options that WERE mutually exclusive, and required nested
 conditional statements, where I had an outer conditional for the extra
 options, and an inner conditional around each parameter.

 As for the command tag, the select type parameters make it easy because you
 can just check the string values with an if statement, like so:
 (assuming python)
 command interpreter=python
 tool.py
 #if $param1 == yes:
 --YourGetOptFlag
 #else:
 ##dont even need an else, just ignore
 #end if

 /command

 If I am not mistaken, this should be sufficient if all you need to pass is a
 flag indicating your program to use the filter. If you need to pass a flag
 AND integer values, you are going to have to wrap your parameters in
 conditional tags and use a set of when:

 inputs
   conditional name=firstConditional
 param name=param1 type=select label=filterName help=helpful
 tips
 option value=yesyes/option
 option value=nono/option
  /param
  when value=yes
param name=IntegerBox type=integer value=[default value]
 min=(optional) max=(optional) label=UseParamName help=helpful text
 /
  /when
  when value=no / !--Doesnt show integer text box when no is chosen
 in the select--
   /conditional
 /inputs

 Rinse and repeat, adding conditionals around each select. I think this is
 actually what you want to do, as you say you want a box to appear after a
 user selects whether or not to use the filter. Also, quick note, the text
 between the option tags are what appear on the select buttons, so they can
 be whatever you want. The value= is the important thing, as this is what
 you will evaluate the if/else to in the command tag. One last thing, The
 cheetah command is really no different.

 command interpreter=python
   tool.py
   #if $firstConditional.param1 == yes:
  --testGetOpt $firstConditional.IntegerBox
   #end if

 /command

 The second command tag is how I pass a few parameters into my command line
 tool.


 Anyway, I hope this helped a little

Re: [galaxy-dev] Conditionally showing certain form elements on tool page

2012-08-16 Thread Dan Tenenbaum
Hi John and Peter,

On Thu, Aug 16, 2012 at 11:37 AM, Peter Cock p.j.a.c...@googlemail.com wrote:
 On Thu, Aug 16, 2012 at 6:53 PM, Dan Tenenbaum dtene...@fhcrc.org wrote:
 Hi John,

 On Thu, Aug 16, 2012 at 9:51 AM, John Patterson jmpa...@g.uky.edu wrote:

 Hello Dan,

 The easiest way to go about this, since you said that none of your
 filters are mutually exclusive, is to use the select datatype. I don't
 think you even need the conditional tags. Galaxy says that you need when
 tag sets when you use conditionals, but this is not true, as I have similar
 code as I have written below. Use type=select in your parameter. This
 gives you a button that can have a multitude of options, but most of mine
 are simply used like booleans. Something like this:
 ...

 This is extremely helpful! Thanks.
 I find the select box yes/no idiom a bit awkward. I'd prefer a
 checkbox (just a single one, not one each for yes and no) but
 doing a select box is ok too, I can live with that.

 Using a boolean checkbox should work - although early on it
 wasn't possible thus many older tools use a select instead:
 https://bitbucket.org/galaxy/galaxy-central/issue/393/cant-use-checkbox-boolean-with-conditional


I can do a checkbox like this:
param name=cbtest type=boolean label=checkbox help=some help/

But I want to have a checkbox that triggers some other params to
appear when it is checked (the way I have successfully done it with a
select). I haven't been able to figure that out.

If I do this:

conditional name=thirdConditional
  param name=param2 type=boolean value=yes label=Filter 3
help=helpful tips /
   when value=yes
 param name=IntegerBox3 type=integer value=1 min=0
max=5 label=A parameter to filter 3 help=helpful text /
   /when
   when value=no /
/conditional

...nothing happens when I click the checkbox.

I also tried using a select with multiple=true and
display=checkbox, but Galaxy doesn't like that because I provide
only one option (yes).

If you could tell me how to cause params to appear/disappear by
checking a checkbox that would be great!
Thanks,
Dan


 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/


[galaxy-dev] Conditionally showing certain form elements on tool page

2012-08-15 Thread Dan Tenenbaum
Hi all,

I'm trying to wrap my head around what the conditional tag does...it
looks like it doesn't do what I would like.

I want to create a tool that allows the user to upload a data file and
then have it run through one or more filters. Each filter takes one or
more parameters.

I was thinking I could do something like this:


  inputs
 conditional name=mycond
 param name=checktest type=boolean label=foo value=yessir
 /param
 when value=yessir
 param name=param1 type=text label=bar value=twunk
 /param
 /when
 /conditional
  /inputs

The idea being, if the user checks the box labeled foo, a text box
labeled bar will appear.
And I would have several such checkboxes and their accompanying parameters.
But what I get is just the checkbox, and nothing happens when I click it.

Is it possible to do what I have in mind, and if so, how?

Also note that these conditions are not mutually exclusive. A user can
select one *or more* filters. So I'm not sure how the body of my
command tag should look. Is there a way I can just pass every
possible parameter to my script like this:
myscript.py param1=foo param2=bar
If a parameter is not defined (because the user didn't click its
associated checkbox), then the script will receive e.g.
param1= param2=bar
but it can deal with that.

I realize I can make several tools and chain them together in a
workflow, but that seems like overkill for this use case, and it would
be nice if the user could set up their desired filters on one screen.

Is this possible?
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/


Re: [galaxy-dev] Creating a galaxy tool in R - You must not use 8-bit bytestrings

2012-04-25 Thread Dan Tenenbaum
Hello Hans-Rudolph,

On Wed, Apr 25, 2012 at 1:37 AM, Hans-Rudolf Hotz h...@fmi.ch wrote:
 Hi Dan


 There seems to be several issues connected with each other or not, I don't
 know.


 - Let's start with the 'curiosity': Do you get this problem with any
  tool?

No. And, I should be a bit more specific about what happens. When I
click execute I see this:

The following job has been successfully added to the queue:

36: RNASeq tool on data 3 and data 4
37: RNASeq tool on data 3 and data 4


Does it also happen with a 'simple' (ie not using R) tool you
  add?


No.

 - When you execute your R script on the command line, are you running
  it as the same user as Galaxy executes the job?

Yes.




 - we execute R scripts the following way:

  commandRscript --vanilla /full path to script/script.R -n $name
     -i $infile -o $outfile/command

  and in the R script we use the library 'getopt'




Good idea. Taking a closer, look, I found my R script was not
expecting arguments in the same order that the XML script provided
them in.
I fixed that and now the R script runs without warning or error, but I
still get the 8-bit bytestrings error, and the error Unable to
finish job.

However, by printing out the arguments within R, I can see the name of
the output files that are supposed to be generated, and it looks like
they are generated. So why doesn't the job finish?

I think the 8 bit bytestrings error might be because R outputs
backticks (`) and they show up escaped in the galaxy error like this:
\xe2\x80\x98.

Is there some way that I can set my LOCALE so that R uses an encoding
that galaxy is happier with? Or perhaps I can get R to stop outputting
those backticks somehow.

 I hope this get's you a little bit further.


Thanks much,
Dan




 Regards, Hans





 On 04/24/2012 11:56 PM, Dan Tenenbaum wrote:

 Apologies for originally posting this to galaxy-user; now I realize it
 belongs here.

 Hello,

 I'm a galaxy newbie and running into several issues trying to adapt an
 R script to be a galaxy tool.

 I'm looking at the XY plotting tool for guidance
 (tools/plot/xy_plot.xml), but I decided not to embed my script in XML,
 but instead have it in a separate script file, that way I can still
 run it from the command line and make sure it works as I make
 incremental changes. (So my script starts with args-
 commandArgs(TRUE)). Also, if it doesn't work, this suggests to me that
 there is a problem with my galaxy configuration.

 First, I tried using the r_wrapper.sh script that comes with the XY
 plotting tool,  but it threw away my arguments:

 An error occurred running this job: ARGUMENT
 '/Users/dtenenba/dev/galaxy-dist/database/files/000/dataset_4.dat'
 __ignored__

 ARGUMENT
 '/Users/dtenenba/dev/galaxy-dist/database/files/000/dataset_3.dat'
 __ignored__

 ARGUMENT 'Fly' __ignored__

 ARGUMENT 'Tagwise' __ignored__

 etc.

 So then I tried just switching to Rscript:

   command interpreter=bashRscript RNASeq.R $countsTsv $designTsv
 $organism $dispersion $minimumCountsPerMillion
 $minimumSamplesPerTranscript $out_file1 $out_file2/command

 (My script produces as output a csv file and a pdf file. The final two
 arguments I'm passing are the names of those files.)

 But then I get an error that Rscript can't be found.

 So I wrote a little wrapper script, Rscript_wrapper.sh:

 #!/bin/sh

 Rscript $*

 And called that:
   command interpreter=bashRscript_wrapper.sh RNASeq.R $countsTsv
 $designTsv $organism $dispersion $minimumCountsPerMillion
 $minimumSamplesPerTranscript $out_file1 $out_file2/command

 Then I got an error that RNASeq.R could not be found.

 So then I added the absolute path to my R script to thecommand  tag.
 This seemed to work (that is, it got me further, to the next error),
 but I'm not sure why I had to do this; in all the other tools I'm
 looking at, the directory to the script to run does not have to be
 specified; I assumed that the command would run in the appropriate
 directory.

 So now I've specified the full path to my R script:

   command interpreter=bashRscript_wrapper.sh
 /Users/dtenenba/dev/galaxy-dist/tools/bioc/RNASeq.R $countsTsv
 $designTsv $organism $dispersion $minimumCountsPerMillion
 $minimumSamplesPerTranscript $out_file1 $out_file2/command

 And I get the following long error, which includes all of the output
 of my R script:

 Traceback (most recent call last):
   File /Users/dtenenba/dev/galaxy-dist/lib/galaxy/jobs/runners/local.py,
 line 133, in run_job
     job_wrapper.finish( stdout, stderr )
   File /Users/dtenenba/dev/galaxy-dist/lib/galaxy/jobs/__init__.py,
 line 725, in finish
     self.sa_session.flush()
   File
 /Users/dtenenba/dev/galaxy-dist/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.7.egg/sqlalchemy/orm/scoping.py,
 line 127, in do
     return getattr(self.registry(), name)(*args, **kwargs)
   File
 /Users/dtenenba/dev/galaxy-dist/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.7.egg/sqlalchemy/orm/session.py,
 line 1356, in flush
     self._flush(objects)
   File

Re: [galaxy-dev] Creating a galaxy tool in R - You must not use 8-bit bytestrings

2012-04-25 Thread Dan Tenenbaum
On Wed, Apr 25, 2012 at 9:53 AM, Dan Tenenbaum dtene...@fhcrc.org wrote:
 Hello Hans-Rudolph,

 On Wed, Apr 25, 2012 at 1:37 AM, Hans-Rudolf Hotz h...@fmi.ch wrote:
 Hi Dan


 There seems to be several issues connected with each other or not, I don't
 know.


 - Let's start with the 'curiosity': Do you get this problem with any
  tool?

 No. And, I should be a bit more specific about what happens. When I
 click execute I see this:

 The following job has been successfully added to the queue:

 36: RNASeq tool on data 3 and data 4
 37: RNASeq tool on data 3 and data 4


 Does it also happen with a 'simple' (ie not using R) tool you
  add?


 No.

 - When you execute your R script on the command line, are you running
  it as the same user as Galaxy executes the job?

 Yes.




 - we execute R scripts the following way:

  commandRscript --vanilla /full path to script/script.R -n $name
     -i $infile -o $outfile/command

  and in the R script we use the library 'getopt'




 Good idea. Taking a closer, look, I found my R script was not
 expecting arguments in the same order that the XML script provided
 them in.
 I fixed that and now the R script runs without warning or error, but I
 still get the 8-bit bytestrings error, and the error Unable to
 finish job.

 However, by printing out the arguments within R, I can see the name of
 the output files that are supposed to be generated, and it looks like
 they are generated. So why doesn't the job finish?

 I think the 8 bit bytestrings error might be because R outputs
 backticks (`) and they show up escaped in the galaxy error like this:
 \xe2\x80\x98.

 Is there some way that I can set my LOCALE so that R uses an encoding
 that galaxy is happier with? Or perhaps I can get R to stop outputting
 those backticks somehow.

Answering my own question here (but following up with more questions).
R was ouputting not backticks but curly quotes, and I turned these off
by putting:

options(useFancyQuotes = FALSE)

in my R script.

However, my R script is still failing:

Dataset generation errors

Dataset 46: RNASeq tool on data 3 and data 4

Tool execution generated the following error message:
BiocInstaller version 1.5.7, ?biocLite for help
Loading required package: org.Dm.eg.db
Loading required package: AnnotationDbi
Loading required package: BiocGenerics

Attaching package: 'BiocGenerics'

The following object(s) are masked from 'package:stats':

xtabs

The following object(s) are masked from 'package:base':

anyDuplicated, cbind, colnames, duplicated, eval, Filter, Find,
get, intersect, lapply, Map, mapply, mget, order, paste, pmax,
pmax.int, pmin, pmin.int, Position, rbind, Reduce, rep.int,
rownames, sapply, setdiff, table, tapply, union, unique

Loading required package: Biobase
Welcome to Bioconductor

Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation(Biobase)', and for packages 'citation(pkgname)'.

Loading required package: DBI

Calculating library sizes from column totals.
Running estimateCommonDisp() on DGEList object before proceeding with
estimateTagwiseDisp().
The tool produced the following additional output:
pdf_outfile=
/Users/dtenenba/dev/galaxy-dist/database/files/000/dataset_46.dat
csv_outfile=
/Users/dtenenba/dev/galaxy-dist/database/files/000/dataset_47.dat
pdf
  2

The thing is, none of this is an error. This is the exact output the
script is supposed to produce, and it prints out the filenames of the
two output files it creates, and I can verify that those exist and
have the correct contents. So why does it say there is an error?

Could it be the return code?
I added
q(save=no, status=0)
to the end of the R script to ensure that the script exits with status
code 0, but that did not change the error I got.

So I am not sure how to solve this. The script works exactly as it's
supposed to and creates the desired output, but tells me there is an
error, and gives no way through the web interface to retrive the
created output file.

Also, I found out why two jobs were started each time I click
Execute. It's because I had two files in my outputs section:

  outputs
data format=pdf name=out_file1 /
data format=csv name=out_file2 /
  /outputs

Because my script generates two output files, a csv and a PDF. I took
out the first data line above, and stopped passing the corresponding
argument to my script, and the script no longer creates the PDF. Now
the job only runs once each time I click Execute. But I would like
the script to once again produce both output files.

So, perhaps it was doing the right thing all along...showing one
dataset in the history panel for each output file produced.

Looking through the galaxy distribution, I see at least one other tool
that does the same thing. So, sorry for the noise on this.

In any case, I still get the same error described above even when only
one output file is produced.

Thanks,
Dan



 I hope this get's you

Re: [galaxy-dev] Creating a galaxy tool in R - You must not use 8-bit bytestrings

2012-04-25 Thread Dan Tenenbaum
On Wed, Apr 25, 2012 at 11:48 AM, Dan Tenenbaum dtene...@fhcrc.org wrote:
 On Wed, Apr 25, 2012 at 9:53 AM, Dan Tenenbaum dtene...@fhcrc.org wrote:
 Hello Hans-Rudolph,

 On Wed, Apr 25, 2012 at 1:37 AM, Hans-Rudolf Hotz h...@fmi.ch wrote:
 Hi Dan


 There seems to be several issues connected with each other or not, I don't
 know.


 - Let's start with the 'curiosity': Do you get this problem with any
  tool?

 No. And, I should be a bit more specific about what happens. When I
 click execute I see this:

 The following job has been successfully added to the queue:

 36: RNASeq tool on data 3 and data 4
 37: RNASeq tool on data 3 and data 4


 Does it also happen with a 'simple' (ie not using R) tool you
  add?


 No.

 - When you execute your R script on the command line, are you running
  it as the same user as Galaxy executes the job?

 Yes.




 - we execute R scripts the following way:

  commandRscript --vanilla /full path to script/script.R -n $name
     -i $infile -o $outfile/command

  and in the R script we use the library 'getopt'




 Good idea. Taking a closer, look, I found my R script was not
 expecting arguments in the same order that the XML script provided
 them in.
 I fixed that and now the R script runs without warning or error, but I
 still get the 8-bit bytestrings error, and the error Unable to
 finish job.

 However, by printing out the arguments within R, I can see the name of
 the output files that are supposed to be generated, and it looks like
 they are generated. So why doesn't the job finish?


Sorry for the noise of answering my own question, which I find has
been asked and answered before, but perhaps this will help someone.

Here's the answer:
http://lists.bx.psu.edu/pipermail/galaxy-dev/2010-August/003161.html

Basically, if any output goes to STDERR, galaxy considers that the job
failed. The link above suggests to do this:

jobcommand ARGS 2/dev/null

But I changed that to:

jobcommand ARGS 21

that way, STDERR is redirected to STDOUT and any important diagnostic
information originally printed to STDERR is not lost.

I added this to my Rscript_wrapper.sh
script and all is well.

Thanks,
Dan


 I think the 8 bit bytestrings error might be because R outputs
 backticks (`) and they show up escaped in the galaxy error like this:
 \xe2\x80\x98.

 Is there some way that I can set my LOCALE so that R uses an encoding
 that galaxy is happier with? Or perhaps I can get R to stop outputting
 those backticks somehow.

 Answering my own question here (but following up with more questions).
 R was ouputting not backticks but curly quotes, and I turned these off
 by putting:

 options(useFancyQuotes = FALSE)

 in my R script.

 However, my R script is still failing:

 Dataset generation errors

 Dataset 46: RNASeq tool on data 3 and data 4

 Tool execution generated the following error message:
 BiocInstaller version 1.5.7, ?biocLite for help
 Loading required package: org.Dm.eg.db
 Loading required package: AnnotationDbi
 Loading required package: BiocGenerics

 Attaching package: 'BiocGenerics'

 The following object(s) are masked from 'package:stats':

    xtabs

 The following object(s) are masked from 'package:base':

    anyDuplicated, cbind, colnames, duplicated, eval, Filter, Find,
    get, intersect, lapply, Map, mapply, mget, order, paste, pmax,
    pmax.int, pmin, pmin.int, Position, rbind, Reduce, rep.int,
    rownames, sapply, setdiff, table, tapply, union, unique

 Loading required package: Biobase
 Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation(Biobase)', and for packages 'citation(pkgname)'.

 Loading required package: DBI

 Calculating library sizes from column totals.
 Running estimateCommonDisp() on DGEList object before proceeding with
 estimateTagwiseDisp().
 The tool produced the following additional output:
 pdf_outfile=
 /Users/dtenenba/dev/galaxy-dist/database/files/000/dataset_46.dat
 csv_outfile=
 /Users/dtenenba/dev/galaxy-dist/database/files/000/dataset_47.dat
 pdf
  2

 The thing is, none of this is an error. This is the exact output the
 script is supposed to produce, and it prints out the filenames of the
 two output files it creates, and I can verify that those exist and
 have the correct contents. So why does it say there is an error?

 Could it be the return code?
 I added
 q(save=no, status=0)
 to the end of the R script to ensure that the script exits with status
 code 0, but that did not change the error I got.

 So I am not sure how to solve this. The script works exactly as it's
 supposed to and creates the desired output, but tells me there is an
 error, and gives no way through the web interface to retrive the
 created output file.

 Also, I found out why two jobs were started each time I click
 Execute. It's because I had two files in my outputs section:

  outputs
    data format=pdf name=out_file1 /
    data format=csv name=out_file2

[galaxy-dev] Creating a galaxy tool in R - You must not use 8-bit bytestrings

2012-04-24 Thread Dan Tenenbaum
Apologies for originally posting this to galaxy-user; now I realize it
belongs here.

Hello,

I'm a galaxy newbie and running into several issues trying to adapt an
R script to be a galaxy tool.

I'm looking at the XY plotting tool for guidance
(tools/plot/xy_plot.xml), but I decided not to embed my script in XML,
but instead have it in a separate script file, that way I can still
run it from the command line and make sure it works as I make
incremental changes. (So my script starts with args -
commandArgs(TRUE)). Also, if it doesn't work, this suggests to me that
there is a problem with my galaxy configuration.

First, I tried using the r_wrapper.sh script that comes with the XY
plotting tool,  but it threw away my arguments:

An error occurred running this job: ARGUMENT
'/Users/dtenenba/dev/galaxy-dist/database/files/000/dataset_4.dat'
__ignored__

ARGUMENT '/Users/dtenenba/dev/galaxy-dist/database/files/000/dataset_3.dat'
__ignored__

ARGUMENT 'Fly' __ignored__

ARGUMENT 'Tagwise' __ignored__

etc.

So then I tried just switching to Rscript:

  command interpreter=bashRscript RNASeq.R $countsTsv $designTsv
$organism $dispersion $minimumCountsPerMillion
$minimumSamplesPerTranscript $out_file1 $out_file2/command

(My script produces as output a csv file and a pdf file. The final two
arguments I'm passing are the names of those files.)

But then I get an error that Rscript can't be found.

So I wrote a little wrapper script, Rscript_wrapper.sh:

#!/bin/sh

Rscript $*

And called that:
  command interpreter=bashRscript_wrapper.sh RNASeq.R $countsTsv
$designTsv $organism $dispersion $minimumCountsPerMillion
$minimumSamplesPerTranscript $out_file1 $out_file2/command

Then I got an error that RNASeq.R could not be found.

So then I added the absolute path to my R script to the command tag.
This seemed to work (that is, it got me further, to the next error),
but I'm not sure why I had to do this; in all the other tools I'm
looking at, the directory to the script to run does not have to be
specified; I assumed that the command would run in the appropriate
directory.

So now I've specified the full path to my R script:

  command interpreter=bashRscript_wrapper.sh
/Users/dtenenba/dev/galaxy-dist/tools/bioc/RNASeq.R $countsTsv
$designTsv $organism $dispersion $minimumCountsPerMillion
$minimumSamplesPerTranscript $out_file1 $out_file2/command

And I get the following long error, which includes all of the output
of my R script:

Traceback (most recent call last):
  File /Users/dtenenba/dev/galaxy-dist/lib/galaxy/jobs/runners/local.py,
line 133, in run_job
job_wrapper.finish( stdout, stderr )
  File /Users/dtenenba/dev/galaxy-dist/lib/galaxy/jobs/__init__.py,
line 725, in finish
self.sa_session.flush()
  File 
/Users/dtenenba/dev/galaxy-dist/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.7.egg/sqlalchemy/orm/scoping.py,
line 127, in do
return getattr(self.registry(), name)(*args, **kwargs)
  File 
/Users/dtenenba/dev/galaxy-dist/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.7.egg/sqlalchemy/orm/session.py,
line 1356, in flush
self._flush(objects)
  File 
/Users/dtenenba/dev/galaxy-dist/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.7.egg/sqlalchemy/orm/session.py,
line 1434, in _flush
flush_context.execute()
  File 
/Users/dtenenba/dev/galaxy-dist/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.7.egg/sqlalchemy/orm/unitofwork.py,
line 261, in execute
UOWExecutor().execute(self, tasks)
  File 
/Users/dtenenba/dev/galaxy-dist/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.7.egg/sqlalchemy/orm/unitofwork.py,
line 753, in execute
self.execute_save_steps(trans, task)
  File 
/Users/dtenenba/dev/galaxy-dist/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.7.egg/sqlalchemy/orm/unitofwork.py,
line 768, in execute_save_steps
self.save_objects(trans, task)
  File 
/Users/dtenenba/dev/galaxy-dist/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.7.egg/sqlalchemy/orm/unitofwork.py,
line 759, in save_objects
task.mapper._save_obj(task.polymorphic_tosave_objects, trans)
  File 
/Users/dtenenba/dev/galaxy-dist/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.7.egg/sqlalchemy/orm/mapper.py,
line 1413, in _save_obj
c = connection.execute(statement.values(value_params), params)
  File 
/Users/dtenenba/dev/galaxy-dist/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.7.egg/sqlalchemy/engine/base.py,
line 824, in execute
return Connection.executors[c](self, object, multiparams, params)
  File 
/Users/dtenenba/dev/galaxy-dist/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.7.egg/sqlalchemy/engine/base.py,
line 874, in _execute_clauseelement
return self.__execute_context(context)
  File 
/Users/dtenenba/dev/galaxy-dist/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.7.egg/sqlalchemy/engine/base.py,
line 896, in __execute_context
self._cursor_execute(context.cursor, context.statement,
context.parameters[0], context=context)
  File 
/Users/dtenenba/dev/galaxy-dist/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.7.egg/sqlalchemy/engine/base.py,
line 950, in _cursor_execute
self._handle_dbapi_exception(e, statement, parameters, 

Re: [galaxy-dev] Cloud instance connection refused

2012-04-24 Thread Dan Tenenbaum
On Tue, Apr 24, 2012 at 9:16 AM, Hui Zhao zh...@cbio.mskcc.org wrote:
 Hi,
 This is Julia from Memorial SLoan-Kettering Cancer Center. I've been using
 the galaxy Cloudman instance last year and it worked fine. But today when I
 tried to launch instance galaxy-cloudman-2011-03-22(ami-da58aab3). After the
 instance was running, it gave me tcp_error: A communication error occurred:
 Connection refused. Any ideas?


Sounds like maybe a security group problem. Did you set up your
security group as described here:
http://wiki.g2.bx.psu.edu/Admin/Cloud

Search for Add Inbound Rules.
Dan

 Thanks a lot,
 Julia




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

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