[galaxy-dev] DRMAA runner weirdness

2013-01-08 Thread Kyle Ellrott
I'm running a test Galaxy system on a cluster (merged galaxy-dist on
Janurary 4th). And I've noticed some odd behavior from the DRMAA job
runner.
I'm running a multithread system, one web server, one job_manager, and
three job_handlers. DRMAA is the default job runner (the command for
tophat2 is drmaa://-V -l mem_total=7G -pe smp 2/), with SGE 6.2u5 being the
engine underneath.

My test involves trying to run three different Tophat2 jobs. The first two
seem to start up (and get put on the SGE queue), but the third stays grey,
with the job manager listing it in state 'new' with command line 'None'. It
doesn't seem to leave this state. Both of the jobs that actually got onto
the queue die (reasons unknown, but much to early, probably some
tophat/bowtie problem), but one job is listed in error state with stderr as
'Job output not returned from cluster', while the other job (which is no
longer in the SGE queue) is still listed as running.

Any ideas?

Kyle
___
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] FTP and data library uploads

2013-01-08 Thread Shantanu Pavgi (Campus)

I am trying to understand how FTP and data library upload options are working 
in Galaxy. When a non-binary file is uploaded through FTP option, it goes 
through three move operations:
 1. First it is copied to a temporary namespace line-by-line converting newlines
 2. Then the temporary file is moved back to the FTP directory with the same 
name [1]
 3. Later the newline sanitized FTP file is moved to datasets directory

These move operations in Python are carried as copy and delete tasks. I don't 
see the same approach being taken with data libraries or other file-system 
import/upload options. I looked at library_common code, but I couldn't follow 
it [2]. I was wondering if someone could help in understanding how file upload 
is implemented for different upload mechanisms and datatypes.

Also, can FTP upload option reduce the number of move operations? For example, 
can the original FTP file or temporary file copied/moved directly to the 
datasets directory? This will be helpful in supporting FTP-type upload where 
'galaxy' user isn't the primary owner of user's files (move operations perform 
chmod  and it requires primary ownership).

--
Thanks,
Shantanu

1. 
https://bitbucket.org/galaxy/galaxy-central/src/530fb4f8204f2106e11f419c381fd53d2319ce24/lib/galaxy/datatypes/sniff.py?at=default#cl-83
2. 
https://bitbucket.org/galaxy/galaxy-central/src/530fb4f8204f/lib/galaxy/webapps/galaxy/controllers/library_common.py?at=default


___
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] Installing dependencies from toolshed fails and produces strange folder

2013-01-08 Thread Greg Von Kuster
Hello Joachim,

Tool dependencies are installed into the location defined by the following 
entry in your universe_wsgi.ini file.

# Path to the directory in which managed tool dependencies are placed.  To use
# the dependency system, see the documentation at:
# http://wiki.g2.bx.psu.edu/Admin/Config/Tool%20Dependencies
tool_dependency_dir = ../tool_dependencies

Greg Von Kuster

On Jan 8, 2013, at 10:45 AM, Joachim Jacob wrote:

> Hi all,
> 
> 
> Updating our Galaxy: the migration of some tools to the toolshed (let's take 
> picard as an example) and installing them back from the toolshed worked well.
> However, during the update, I forgot to install the dependencies.
> 
> So I went to the administration part of our Galaxy, and selected 'Manage 
> installed tool shed repositories 
> '. With the 
> interface, I installed the dependencies for the tool (*Tool shed repository 
> 'picard' tool dependencies*): but this failed with an error (SystemError: 1 
> or something alike).
> 
> After this error, I noticed a strange folder was created in the Galaxy root 
> called '.  Meaning, really called ', like "'"  :-)
> $GALAXY_HOME/'/apps'/picard/1.56.0/devteam/picard//jars
> 
> The installer installed all jars in this folder. I am currently looking into 
> the code, but my first reflex was to think: the path is not correctly set, so 
> heading to universe_wsgi.ini! But this seemed to be a wrong guess.  Any idea 
> what parameters are wrongly set here?
> 
> 
> Cheers and thanks,
> Joachim
> 
> -- 
> Joachim Jacob
> 
> Rijvisschestraat 120, 9052 Zwijnaarde
> Tel: +32 9 244.66.34
> Bioinformatics Training and Services (BITS)
> http://www.bits.vib.be
> @bitsatvib
> 
> ___
> Please keep all replies on the list by using "reply all"
> in your mail client.  To manage your subscriptions to this
> and other Galaxy lists, please use the interface at:
> 
> http://lists.bx.psu.edu/

___
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] backtrace when attempting to view a shared workflow

2013-01-08 Thread Daniel Blankenberg
Hi Brad,

Sorry that didn't fix your issue and I agree that your traceback hasn't changed.

I've committed another potential fix in galaxy-central changeset 
8542:530fb4f8204f, but it is hard to be certain that I have replicated your 
exact issue. Could you try that changeset to see if that resolves this issue?


Thanks for using Galaxy,

Dan


On Jan 7, 2013, at 9:17 PM, Langhorst, Brad wrote:

> Hi Dan:
> 
> After much wrestling with hg graft and gnashing of teeth I failed to cherry 
> pick that changeset and just added the code manually in 
> lib/galaxy/tools/__init__.py
> 
> However, I'm not observing any change as a result. I cannot clone, view, 
> export or edit this workflow (or the other problem workflow).
> 
> I don't know what these workflows might share in common, since I don't 
> remember and I can't tell what the steps are.
> 
> I'll try to turn around quicker in future debug loops… 
> 
> here is the current backtrace from an attempt to edit (to my eye this is 
> unchanged)
> 
> URL: 
> http://galaxy.neb.com/workflow/load_workflow?id=4280bfc7d7999071&_=1357611376884
> File 
> '/mnt/ngswork/galaxy/galaxy-dist/eggs/Paste-1.6-py2.6.egg/paste/exceptions/errormiddleware.py',
>  line 143 in __call__
>   app_iter = self.application(environ, start_response)
> File 
> '/mnt/ngswork/galaxy/galaxy-dist/eggs/Paste-1.6-py2.6.egg/paste/recursive.py',
>  line 80 in __call__
>   return self.application(environ, start_response)
> File 
> '/mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/web/framework/middleware/remoteuser.py',
>  line 91 in __call__
>   return self.app( environ, start_response )
> File 
> '/mnt/ngswork/galaxy/galaxy-dist/eggs/Paste-1.6-py2.6.egg/paste/httpexceptions.py',
>  line 632 in __call__
>   return self.application(environ, start_response)
> File '/mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/web/framework/base.py', line 
> 160 in __call__
>   body = method( trans, **kwargs )
> File '/mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/web/framework/__init__.py', 
> line 73 in decorator
>   return simplejson.dumps( func( self, trans, *args, **kwargs ) )
> File 
> '/mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/webapps/galaxy/controllers/workflow.py',
>  line 676 in load_workflow
>   module = module_factory.from_workflow_step( trans, step )
> File '/mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/workflow/modules.py', line 
> 402 in from_workflow_step
>   return self.module_types[type].from_workflow_step( trans, step )
> File '/mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/workflow/modules.py', line 
> 217 in from_workflow_step
>   module.state.inputs = module.tool.params_from_strings( step.tool_inputs, 
> trans.app, ignore_errors=True )
> File '/mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/tools/__init__.py', line 
> 2130 in params_from_strings
>   return params_from_strings( self.inputs, params, app, ignore_errors )
> File 
> '/mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/tools/parameters/__init__.py', 
> line 94 in params_from_strings
>   value = params[key].value_from_basic( value, app, ignore_errors )
> File 
> '/mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/tools/parameters/grouping.py', 
> line 444 in value_from_basic
>   current_case = rval['__current_case__'] = value['__current_case__']
> TypeError: 'NoneType' object is unsubscriptable
> 
> Brad
> 
> 
> 
> On Jan 7, 2013, at 11:21 AM, Daniel Blankenberg  wrote:
> 
>> Hi Brad,
>> 
>> Thanks for reporting this issue. I've committed what I hope is a fix for 
>> your issue in changeset 8527:eb4dac39eed5 in galaxy-central.  Once you are 
>> able to apply these changes, would you mind letting us know if this resolves 
>> your broken workflows? 
>> 
>> 
>> Thanks for using Galaxy,
>> 
>> Dan
>> 
>> 
>> On Jan 7, 2013, at 9:11 AM, Langhorst, Brad wrote:
>> 
>>> I've recently updated to the december 20th revision of galaxy and still 
>>> have a problem with a few workflows.
>>> You can find the backtraces below.
>>> 
>>> based on these I'm starting to look in 
>>> /mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/workflow/modules.py - but any 
>>> hints would be appreciated.
>>> 
>>> 
>>> thanks
>>> 
>>> Brad
>>> 
>>> here's a backtrace from an attempt to edit the problem workflow 
>>> 
>>> Error - : 'NoneType' object is unsubscriptable
>>> URL: 
>>> http://galaxy.neb.com/workflow/load_workflow?id=4280bfc7d7999071&_=1357567007122
>>> File 
>>> '/mnt/ngswork/galaxy/galaxy-dist/eggs/Paste-1.6-py2.6.egg/paste/exceptions/errormiddleware.py',
>>>  line 143 in __call__
>>>   app_iter = self.application(environ, start_response)
>>> File 
>>> '/mnt/ngswork/galaxy/galaxy-dist/eggs/Paste-1.6-py2.6.egg/paste/recursive.py',
>>>  line 80 in __call__
>>>   return self.application(environ, start_response)
>>> File 
>>> '/mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/web/framework/middleware/remoteuser.py',
>>>  line 91 in __call__
>>>   return self.app( environ, start_response )
>>> File 
>>> '/mnt/ngswork/galaxy/galaxy-dist/eggs/Paste-1.6-py2.6.egg/paste/httpexceptions.py',
>>>  line 632 in __call__
>>> 

[galaxy-dev] Installing dependencies from toolshed fails and produces strange folder

2013-01-08 Thread Joachim Jacob

Hi all,


Updating our Galaxy: the migration of some tools to the toolshed (let's 
take picard as an example) and installing them back from the toolshed 
worked well.

However, during the update, I forgot to install the dependencies.

So I went to the administration part of our Galaxy, and selected 'Manage 
installed tool shed repositories 
'. With 
the interface, I installed the dependencies for the tool (*Tool shed 
repository 'picard' tool dependencies*): but this failed with an error 
(SystemError: 1 or something alike).


After this error, I noticed a strange folder was created in the Galaxy 
root called '.  Meaning, really called ', like "'"  :-)

$GALAXY_HOME/'/apps'/picard/1.56.0/devteam/picard//jars

The installer installed all jars in this folder. I am currently looking 
into the code, but my first reflex was to think: the path is not 
correctly set, so heading to universe_wsgi.ini! But this seemed to be a 
wrong guess.  Any idea what parameters are wrongly set here?



Cheers and thanks,
Joachim

--
Joachim Jacob

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

___
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

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


[galaxy-dev] Question about content of Galaxy installation package

2013-01-08 Thread Uho Uho
Hi,

I installed Galaxy locally. I would like to check with you if its installation 
package has everything necessary.
galaxy-galaxy-dist-36ad8aa7b922.zip (checked today: 01/07/13)


My main problem is that "NGS:Mapping section" does not look similar to the main 
Galaxy page.
The downloaded package contains "Bowtie2" there but things like "Lastz", "BWA", 
"Bowtie" (bowtie1)
are absent.

I.e. there are no any XML files related to these software inside of "tools" 
folder (only bowtie2 related).
Configuration files ("tool_*") inside of the main folder contain only 
references to "bowtie2". While my friends
say that their version of files have references  to the first bowtie.

Can you please confirm that it's supposed to be like that and you removed 
things related to BWA/Bowtie/Lastz?
And if yes, can you please indicate where I could find an older version of 
Galaxy distributive with them?
If I'm doing something wrong, can you please tell me?

Thank you,
Uho.___
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] GalaxyAdmins Meetup -- January 16 at 10 AM Central

2013-01-08 Thread IIHG Galaxy Administrator
Hello,

The next GalaxyAdmins Meetup will be Wednesday, January 16, 2013 from  10 AM to 
11 AM US Central time.  John Chilton of the Minnesota Supercomputing Institute 
will cover "Deploying Production Galaxy Environments on OpenStack with 
CloudBioLinux and CloudMan".  You can join the meetup at 
https://globalcampus.uiowa.edu/join_meeting.html?meetingId=1262341808106.

We use the Blackboard Collaborate Web Conferencing system for the meetup. 
Downloading the required applets in advance and using a headphone with 
microphone to prevent audio feedback during the call is recommended.

Thank you.

--
Srinivas Maddhi
Senior Systems Administrator
Iowa Institute for Human Genetics
The University of Iowa
BEGIN:VCALENDAR
PRODID:-//Blackboard Collaborate//NONSGML v1.0//EN
VERSION:2.0
METHOD:PUBLISH
BEGIN:VEVENT
DTSTART:20130116T16Z
DTEND:20130116T17Z
LOCATION:Blackboard Collaborate Virtual Room
TRANSP:OPAQUE
DTSTAMP:20130107T184757Z
SUMMARY:Deploying Production Galaxy Environments on OpenStack with CloudBioLinux and CloudMan
DESCRIPTION:You have been invited to attend the following online Blackboard
  Collaborate Web Conference session.\n\nSession Name:\n  
   Deploying Production Galaxy Environments on OpenStack with CloudBioLinux
  and CloudMan\n\nSession Details:\nStarts: Jan 16\, 2013 10:00 AM\n   
  Ends: Jan 16\, 2013 11:00 AM\nJoin Session:
  https://globalcampus.uiowa.edu:443/join_meeting.html?meetingId=12623418081
 06\n\n\n\nTo join the session\, click on the Join Session link.\nEnter
  your Elluminate Live! Manager login name and password.\n\nYou may join
  the session 30 minutes prior to the start time.\nIf this is the first
  time you will be using Elluminate\, you may be prompted to download some
  software which may take anywhere from 2 to 20 minutes depending upon your
  Internet connection speed. You can pre-configure your system with the
  required software by going to the support page located at:
  http://support.blackboardcollaborate.com/\nPlease make sure your computer
  has a microphone and speakers to be able to talk and hear while you are
  in the Blackboard Collaborate Web Conference session.

PRIORITY:3
UID:20130116T16Z20130116T17Z
CLASS:PUBLIC
END:VEVENT
END:VCALENDAR___
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] backtrace when attempting to view a shared workflow

2013-01-08 Thread John Chilton
I am a little paranoid that I am the one that broke something (I guess
that is pattern matching more than paranoia), but I have looked
through that code and it is not immediately obvious to me what the
problem is. If you have some time, can you try cloning the workflow
and ripping various parts out to see what the nature of the problem
is? Is it a particular tool or combination of tools? Being able to
describe the smallest workflow that exhibits this behavior would be
very helpful. I would be happy to fix this problem, but I need help
tracking it down.

Thanks,
-John

On Mon, Jan 7, 2013 at 8:11 AM, Langhorst, Brad  wrote:
> I've recently updated to the december 20th revision of galaxy and still have
> a problem with a few workflows.
> You can find the backtraces below.
>
> based on these I'm starting to look in
> /mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/workflow/modules.py - but any
> hints would be appreciated.
>
>
> thanks
>
> Brad
>
> here's a backtrace from an attempt to edit the problem workflow
>
> Error - : 'NoneType' object is unsubscriptable
> URL:
> http://galaxy.neb.com/workflow/load_workflow?id=4280bfc7d7999071&_=1357567007122
> File
> '/mnt/ngswork/galaxy/galaxy-dist/eggs/Paste-1.6-py2.6.egg/paste/exceptions/errormiddleware.py',
> line 143 in __call__
>   app_iter = self.application(environ, start_response)
> File
> '/mnt/ngswork/galaxy/galaxy-dist/eggs/Paste-1.6-py2.6.egg/paste/recursive.py',
> line 80 in __call__
>   return self.application(environ, start_response)
> File
> '/mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/web/framework/middleware/remoteuser.py',
> line 91 in __call__
>   return self.app( environ, start_response )
> File
> '/mnt/ngswork/galaxy/galaxy-dist/eggs/Paste-1.6-py2.6.egg/paste/httpexceptions.py',
> line 632 in __call__
>   return self.application(environ, start_response)
> File '/mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/web/framework/base.py',
> line 160 in __call__
>   body = method( trans, **kwargs )
> File '/mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/web/framework/__init__.py',
> line 73 in decorator
>   return simplejson.dumps( func( self, trans, *args, **kwargs ) )
> File
> '/mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/webapps/galaxy/controllers/workflow.py',
> line 676 in load_workflow
>   module = module_factory.from_workflow_step( trans, step )
> File '/mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/workflow/modules.py', line
> 402 in from_workflow_step
>   return self.module_types[type].from_workflow_step( trans, step )
> File '/mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/workflow/modules.py', line
> 217 in from_workflow_step
>   module.state.inputs = module.tool.params_from_strings( step.tool_inputs,
> trans.app, ignore_errors=True )
> File '/mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/tools/__init__.py', line
> 2130 in params_from_strings
>   return params_from_strings( self.inputs, params, app, ignore_errors )
> File
> '/mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/tools/parameters/__init__.py',
> line 94 in params_from_strings
>   value = params[key].value_from_basic( value, app, ignore_errors )
> File
> '/mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/tools/parameters/grouping.py',
> line 444 in value_from_basic
>   current_case = rval['__current_case__'] = value['__current_case__']
> TypeError: 'NoneType' object is unsubscriptable
>
>
> here's one attempting to run it
> File
> '/mnt/ngswork/galaxy/galaxy-dist/eggs/Paste-1.6-py2.6.egg/paste/exceptions/errormiddleware.py',
> line 143 in __call__
>   app_iter = self.application(environ, start_response)
> File
> '/mnt/ngswork/galaxy/galaxy-dist/eggs/Paste-1.6-py2.6.egg/paste/recursive.py',
> line 80 in __call__
>   return self.application(environ, start_response)
> File
> '/mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/web/framework/middleware/remoteuser.py',
> line 91 in __call__
>   return self.app( environ, start_response )
> File
> '/mnt/ngswork/galaxy/galaxy-dist/eggs/Paste-1.6-py2.6.egg/paste/httpexceptions.py',
> line 632 in __call__
>   return self.application(environ, start_response)
> File '/mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/web/framework/base.py',
> line 160 in __call__
>   body = method( trans, **kwargs )
> File
> '/mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/webapps/galaxy/controllers/workflow.py',
> line 1473 in run
>   step.module = module_factory.from_workflow_step( trans, step )
> File '/mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/workflow/modules.py', line
> 402 in from_workflow_step
>   return self.module_types[type].from_workflow_step( trans, step )
> File '/mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/workflow/modules.py', line
> 217 in from_workflow_step
>   module.state.inputs = module.tool.params_from_strings( step.tool_inputs,
> trans.app, ignore_errors=True )
> File '/mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/tools/__init__.py', line
> 2130 in params_from_strings
>   return params_from_strings( self.inputs, params, app, ignore_errors )
> File
> '/mnt/ngswork/galaxy/galaxy-dist/lib/galaxy/tools/parameters

[galaxy-dev] Server stops itself

2013-01-08 Thread MONJEAUD

Hello All,

I'm trying to deploy my instance of Galaxy in production. Some tests 
we've done show that when the number of person connected is high (>20 
together), the server stops itself.


Sometimes, I have this error in the paster.log:


Exception happened during processing of request from ('127.0.0.1', 60575)
Traceback (most recent call last):
  File 
"/opt/galaxy-dist/eggs/Paste-1.6-py2.7.egg/paste/httpserver.py", line 
1053, in process_request_in_thread

self.finish_request(request, client_address)
  File "/local/python/2.7-bis/lib/python2.7/SocketServer.py", line 
323, in finish_request

self.RequestHandlerClass(request, client_address, self)
  File "/local/python/2.7-bis/lib/python2.7/SocketServer.py", line 
641, in __init__

self.finish()
  File "/local/python/2.7-bis/lib/python2.7/SocketServer.py", line 
694, in finish

self.wfile.flush()
  File "/local/python/2.7-bis/lib/python2.7/socket.py", line 301, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe


Do you have any ideas about this and how resolve it?

Cheers!!
Cyril

--

Cyril Monjeaud
Equipe Symbiose / Plate-forme GenOuest
Bureau D156
IRISA-INRIA, Campus de Beaulieu
35042 Rennes cedex, France
Tél: +33 (0) 2 99 84 74 17

___
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] user creation using API

2013-01-08 Thread Hagai Cohen
This is really helpful,
Works great.
Thanks,
Hagai


On Mon, Jan 7, 2013 at 5:13 PM, John Chilton  wrote:

> I am pretty confident there is no way to do this via the API
> currently, though I imagine it wouldn't be terribly complicated to add
> and the community would appreciate the contribution. If API-based
> access isn't a strong requirement and you have direct access to the
> Galaxy server here is a script-template I have used to automatically
> create users:
>
> https://gist.github.com/4475646
>
> The above gist is probably enough to get going, but here is the full
> context of how I create such a file if that is of interest:
>
> https://github.com/jmchilton/cloudbiolinux/blob/deploy/cloudbio/deploy/galaxy.py
>
> -John
>
> On Mon, Jan 7, 2013 at 3:37 AM, Hagai Cohen  wrote:
> > Hi,
> > I would like to auto create users on my local Galaxy instance.
> >
> > I saw that in the "create user" on the API, I should enable
> use_remote_user
> > (which as I understand means that I have to use Apache or nginx).
> > Is there another way besides using Apache to create users automatically?
> >
> > Thanks,
> > Hagai
> >
> >
> > ___
> > 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] variables not defined

2013-01-08 Thread MONJEAUD

Ok,

thanks for this information.

Cheers,
Cyril

On 01/08/2013 01:58 AM, Jeremy Goecks wrote:
These bugs have been fixed in our development repository 
(galaxy-central) and will be available in the next distribution, which 
should occur in the coming week.


Thanks,
J.


On Jan 7, 2013, at 6:23 AM, MONJEAUD wrote:


Hello all,

I am using my own Galaxy instance and I had a problem with page and 
visualization tabs.
For example, when I want to edit attributes of a page, I've got this 
error traceback :



|NameError: global name 'VALID_SLUG_RE' is not defined|


and when I want to remove or share a page or a visualization, I've 
got  this one :



|NameError: global name 'util' is not defined|


To fix these errors, I added in the 
lib/galaxy/webapps/galaxy/controllers/page.py and 
lib/galaxy/webapps/galaxy/controllers/visualization.py these lines :



from galaxy import util
import re
VALID_SLUG_RE = re.compile( "^[a-z0-9\-]+$" )


So, I want to know if you know these problems or if it's only for my 
instance of galaxy. Maybe some files (where these variables are 
defined) are not present in my own galaxy.


Cheers,
Cyril Monjeaud
--

Cyril Monjeaud
Equipe Symbiose / Plate-forme GenOuest
Bureau D156
IRISA-INRIA, Campus de Beaulieu
35042 Rennes cedex, France
Tél: +33 (0) 2 99 84 74 17
___
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/





--

Cyril Monjeaud
Equipe Symbiose / Plate-forme GenOuest
Bureau D156
IRISA-INRIA, Campus de Beaulieu
35042 Rennes cedex, France
Tél: +33 (0) 2 99 84 74 17

___
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] Stumped by GridOperation

2013-01-08 Thread Greg Von Kuster
Hi Ted,

This looks like a good solution to me.  I'll add your contributions to the 
Galaxy code base as soon as I get a chance.

Thanks for all of your efforts on this!

Greg Von Kuster


On Jan 7, 2013, at 3:22 PM, Ted Goldstein wrote:

> Hi  Greg and James,
> This has become a plumbing project.  What starts off as fixing a leaky faucet 
> ends being a $200 bill replacing the entire sink ;-).  But I don't see anyway 
> around it.
> 
> Yes, there is a lot of power in the allowed method since it uses a function 
> or a lambda. There are two problems with this: idea (1) it feels wrong to 
> have a predicate method called allowed modify the state of the object.
> and worse,(2)  the Python context that the lambda is capturing is at global 
> instantiation time.  But the data that I need captured and saved in the page 
> exist only after the user has made a set of choices. Thus it only exists in a 
> previous call to thePage.list() method.
> 
> Another problem. 
> Since this is a multi operation, the state that needs to be passed cannot go 
> into the  form URL itself of the form. I see that the call to get the URL  of 
> the form in grid_base.mako at line 702 does not take any operation arguments. 
>  Which is correct.  Normally the submit button on an HTML form does not 
> modify the form's URL  The usual solution from an HTML perspective is to have 
> hidden input fields on an HTML form.   So the solution would be to extend the 
> Grid class to generate and use hidden input fields.  This would be done on  a 
> copy of the grid object;. So there needs to be a new Grid method.
> 
> (my changes in bold)
> 
> class Grid
> ...
> def clone_with_pass_through_data(self, data_dict):
> # make a copy of myself for use in passing though data
> clone = deepcopy(self)
> clone.pass_through_data = data_dict
> return clone
> 
> 
> my  example use in Page.list()
># Clone a copy of grid to have the pageids.
> grid = 
> self._libraries_selection_grid.clone_with_pass_through_data({"pageids": 
> pageidsraw});
> return trans.fill_template( 
> "page/library_datasets_select_grid.mako", pagetitles=pagetitles, grid=grid, 
> **kwargs)
> 
> pass_through_data   has a three line implementation in grid_base.mako
>
> 
> 
>   %for pass_name, pass_value in grid.pass_through_data.items():
> 
> %endfor
>  ..
> 
> But  nothing is simple, form parameters  arguments are more complex than they 
> sem at first.
> 
> 
>   function go_to_URL() {
> // Not async request.
> url_args['async'] = false;
> 
> // Build argument string.
> var arg_str = "";
> for (var arg in url_args) {
> arg_str = arg_str + arg + "=" + url_args[arg] + "&";
> }
> 
> // add in hidden fields
> $('input[type=hidden]').each(function() {
> if (this.name == "webapp" || this.name == 
> "select_all_checkbox")
>return
> else
> arg_str = arg_str + this.name + "=" + this.value + "&";
> })
> 
> 
> // Go.
> window.location = encodeURI( "${h.url_for()}?" + arg_str );
> }
> 
> 
> What do you think of this idea?
> 
> Ted
>
> 
> 
> On Jan 7, 2013, at 7:00 AM, James Taylor wrote:
> 
>> Ted, have you considered if you can do what you need with the 'allowed' 
>> method of GridOperation? It let's you define a callable condition that 
>> determines if that operation is allowed on a given item. It does not have 
>> access to trans but it would be reasonable to add that. 
>> 
>> 
>> --
>> James Taylor, Assistant Professor, Biology/CS, Emory University
>> 
>> 
>> On Mon, Jan 7, 2013 at 2:55 AM, Ted Goldstein  wrote:
>> HI Greg,
>> I thought of this. But there is potential bug in it which has security 
>> implications.  Though it is a low probability event, I have seen this sort 
>> of leakage happen in other environments where user data was stuck into 
>> globally shared objects.   The grid object is shared by all requests.  You 
>> are storing user specific data in the GridOperation. So if there is an 
>> unfortunate context switch in the middle of the setting the ids int the grid 
>> operation but before they are used,  the user specific data of one user will 
>> be visible to the other user.   Of course the solution is to make sure the 
>> grid is not shared (e.g. it is instantiated or  deep-copied) in the function 
>> or at least in the request thread that uses it.   
>> 
>> Thanks,  I will do this with on a deepcopy of the Grid to ensure that it 
>> doesn't et shared between threads.   You might want to chsnge the code in 
>> repository.py
>> 
>> Best regards,
>> 
>> Ted
>> 
>> 
>> On Jan 6, 2013, at 4:12 PM, Greg Von Kuster wrote:
>> 
>>> Hi Ted,
>>> 
>>> If I understand what your trying to do, I believe I've implemented grid 
>>> operations simi