Hello John,
Thank you very much for your answer! It's sounds logical and do-able.
However, I've thought of the following and I would like your opinion about it: (this is to create a workspace for each student which is accessible only by them and their teacher) 1. create a data library for each user (student, teacher and class) 2. the data library for each student will have the following permissions: a. modify library item = student private role (email address) b. access library = student private role (email address) and teacher private role Here is where this starts to break down. I think roles do not work the way most people I talk to about them find intuitive (myself included). When determining if action X can be performed on a library item - a user must belong to an intersection of all of the roles not a union of
Hi Nicola, that is exactly what I'm looking for, however, how do I execute the script/tool? I would like to import all published workflows. What is the name of the script to run and the arguments ? Can you give an example please? Thanks again Neil ________________________________________ From: galaxy-dev-bounces@lists.bx.psu.edu [galaxy-dev-bounces@lists.bx.psu.edu] on behalf of galaxy-dev-request@lists.bx.psu.edu [galaxy-dev-request@lists.bx.psu.edu] Sent: Saturday, January 18, 2014 3:00 AM To: galaxy-dev@lists.bx.psu.edu Subject: galaxy-dev Digest, Vol 91, Issue 20 Send galaxy-dev mailing list submissions to galaxy-dev@lists.bx.psu.edu To subscribe or unsubscribe via the World Wide Web, visit http://lists.bx.psu.edu/listinfo/galaxy-dev or, via email, send a message with subject or body 'help' to galaxy-dev-request@lists.bx.psu.edu You can reach the person managing the list at galaxy-dev-owner@lists.bx.psu.edu When replying, please edit your Subject line so it is more specific than "Re: Contents of galaxy-dev digest..." HEY! This is important! If you reply to a thread in a digest, please 1. Change the subject of your response from "Galaxy-dev Digest Vol ..." to the original subject for the thread. 2. Strip out everything else in the digest that is not part of the thread you are responding to. Why? 1. This will keep the subject meaningful. People will have some idea from the subject line if they should read it or not. 2. Not doing this greatly increases the number of emails that match search queries, but that aren't actually informative. Today's Topics: 1. Re: creating a hierarchy of students teachers and courses (Fernandez Edgar) 2. Re: making tools with Galaxy (Greg Von Kuster) 3. Re: making tools with Galaxy (Bj?rn Gr?ning) 4. Import workflows via API (Neil.Burdett@csiro.au) 5. Can't view file_name in histories via API unless admin? (Neil.Burdett@csiro.au) 6. Re: moving galaxy instance to different location (Hans-Rudolf Hotz) 7. Re: Can't view file_name in histories via API unless admin? (Neil.Burdett@csiro.au) 8. Re: Can't view file_name in histories via API unless admin? (Charles Girardot) 9. Re: Pick-you-own columns in BLAST+ tabular output (Bossers, Alex) 10. Re: Pick-you-own columns in BLAST+ tabular output (Peter Cock) 11. Re: Import workflows via API (Nicola Soranzo) 12. Re: Can't view file_name in histories via API unless admin? (Neil.Burdett@csiro.au) 13. DRMAA bug in galaxy-central (Bjoern Gruening) 14. Re: moving galaxy instance to different location (John Chilton) 15. Re: Can't view file_name in histories via API unless admin? (Dannon Baker) 16. html network (Lionel Chiron) 17. Help (Pasquale Notarangelo) 18. Re: A new tool_data_table_conf.xml created under tool-data directory (Nicola Soranzo) 19. Re: DRMAA bug in galaxy-central (John Chilton) 20. Galaxy Reports link - registed users per month - does not work (Liisa Koski) ---------------------------------------------------------------------- Message: 1 Date: Thu, 16 Jan 2014 17:18:55 +0000 From: Fernandez Edgar <edgar.fernandez@umontreal.ca> To: Dannon Baker <dannon.baker@gmail.com>, John Chilton <chilton@msi.umn.edu> Cc: "galaxy-dev@bx.psu.edu" <galaxy-dev@bx.psu.edu> Subject: Re: [galaxy-dev] creating a hierarchy of students teachers and courses Message-ID: <0F2D4F593E660F4EB76FC7C8BFB6A7E343AE2C59@ashfield-cour.sim.umontreal.ca> Content-Type: text/plain; charset="iso-8859-1" Hello Dannon, You are right, I've just tried it and it is extremely lighter than my previous solution. I've successfully made a teacher share a complete history with her students and vice-versa a student sharing its history with teacher. Cordialement / Regards, Edgar Fernandez De : Dannon Baker [mailto:dannon.baker@gmail.com] Envoy? : January-16-14 8:24 AM ? : John Chilton Cc : Fernandez Edgar; galaxy-dev@bx.psu.edu Objet : Re: [galaxy-dev] creating a hierarchy of students teachers and courses Would direct-sharing histories work as a significantly lighter weight solution? Each student could just create a history named "DannonBaker_SharedResults" or the like, share it directly with their instructor, and put via dataset copy and/or perform any work to be shared in that? -Dannon On Wed, Jan 15, 2014 at 11:21 PM, John Chilton <chilton@msi.umn.edu<mailto:chilton@msi.umn.edu>> wrote: On Wed, Jan 15, 2014 at 12:03 PM, Fernandez Edgar <edgar.fernandez@umontreal.ca<mailto:edgar.fernandez@umontreal.ca>> wrote: them. Put another way - each role is restricting the universe of people that can perform action X on an item not expanding it. So I am pretty sure Galaxy will not even let you specify this. The workaround is to create a new role for each student and teacher combination. This joint role would be the access role and all of the rest would be the student private role.
c. add library item = student private role (email address) d. manage library permissions = student private role (email address) 3. the data library for each teacher will have the following permissions: a. modify library item = teacher private role (email address) b. access library = teacher private role (email address) c. add library item = teacher private role (email address) d. manage library permissions = teacher private role (email address) 4. the data library for each class will have the following permissions: a. modify library item = teacher private role (email address) b. access library = teacher private role (email address) c. add library item = teacher private role (email address) and all students privates roles
I think add library item has to be a subset of access library. So I suspect this will not work (though feel free to try). A work around here might again be to create a new data library for each combination of student and teacher. This is obviously more overhead for the teacher though :(. -John
d. manage library permissions = teacher private role (email address)
Now, here's the one million dollar questions: Will the permission 4c permit to every student to drop some work into the class workspace but not cheap by seeing the work of another student ?
Cordialement / Regards, Edgar Fernandez
-----Message d'origine----- De : jmchilton@gmail.com<mailto:jmchilton@gmail.com> [mailto:jmchilton@gmail.com<mailto:jmchilton@gmail.com>] De la part de John Chilton Envoy? : January-15-14 12:12 PM ? : Fernandez Edgar Cc : galaxy-dev@bx.psu.edu<mailto:galaxy-dev@bx.psu.edu> Objet : Re: [galaxy-dev] creating a hierarchy of students teachers and courses
Galaxy can do some these and maybe not others. This is a really big topic, and I hope you let us all know how progress on this goes - it is a really interesting use case. I can comment a little on each part of this, but they are all connected and there are different ways to approach each of these things.
On Tue, Jan 14, 2014 at 12:03 PM, Fernandez Edgar <edgar.fernandez@umontreal.ca<mailto:edgar.fernandez@umontreal.ca>> wrote:
Hello galaxy team,
First and foremost, I would like to thank you for your assistance with my galaxy installation with apache proxy.
It works very well.
Secondly, I would like your help with creating users, groups, roles and permissions that would allow me to:
1. differentiate a student from a teacher
Are you creating these accounts inside of Galaxy or using an external authentication method?
Because if your are creating these accounts yourself - I would suggest using naming scheme to distinguish these:
std_cls_lastname teach_cls_lastname
Another idea to consider is to make all teachers admins. This provides a lot of extra functionality that can cover some additional requirements below and can serve as the basis for differentiating.
2. differentiate a student in course A or in course B
You could use a naming scheme, or your could create a group and role for each course. It looks like there is an API for managing groups and roles. This can help automate some of this - it would be very laborious to do this through the UI I imagine.
3. teachers having read access to students' work
This one is why I would give the teachers admin access - I think they could impersonate the students to access their work (set allow_user_impersonation = True in universe_wsgi.ini). It would mean that every teacher would have full access to every students work - if this is a problem you might want to consider standing up a Galaxy instance per class - there is some up front overhead with this - but it would make cleaning things up really easy.
If these aren't realistic solutions, I think producing course documentation describing for students how to manually share their work with teachers is probably the best bet. Any user can share a history with any other user or produce links and e-mail these to the teacher.
4. teachers sharing with students
I would look at having the teachers setup pages for individual courses or lesson plans. These can be made public and students would be able to import histories, datasets, and workflows right in from these. If more targeted sharing is needed again I think the best bet right now might just use Galaxy's history sharing capabilities.
Right now, I just have created users. There is no group or roles or permissions or datasets.
On another note, how can I disable the account of one specific user or a whole group ?
To enable this functionality for individual users and groups in the UI you need to set allow_user_deletion to True in universe_wsgi.ini. I don't think deleting a group will delete all the users in it though. This can be automated either by extending the API to support deleting users and then writing a script to iterate over a group and delete all the users or by writing a script that talks to the database directly or using scripts/db_shell.py (which provides an external script access to the Galaxy's data connection and model classes).
Hope this helps,
-John
Cordialement / Regards,
Edgar Fernandez
System Administrator (Linux)
Direction G?n?rale des Technologies de l'Information et de la Communication
( Bur. : 1-514-343-6111<tel:1-514-343-6111> poste 16568
Universit? de Montr?al
PAVILLON ROGER-GAUDRY, bureau X-218
___________________________________________________________ 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/
Hi Neil, to import all published workflows you can use a script like this: import sys sys.path.insert(1, 'galaxy-central/scripts/api') import common api_key = 'YOUR_USER_API_KEY' workflows = common.get(api_key, 'http://YOUR_SERVER/api/workflows?show_published=True') published_workflow_ids = [str(workflow[u'id']) for workflow in workflows if bool(workflow[u'published'])] for pw_id in published_workflow_ids: data['workflow_id'] = pw_id common.post(api_key, 'http://YOUR_SERVER/api/workflows/import', data) Nicola Il 2014-01-19 03:12 Neil.Burdett@csiro.au ha scritto:
Hi Nicola, that is exactly what I'm looking for, however, how do I execute the script/tool? I would like to import all published workflows. What is the name of the script to run and the arguments ? Can you give an example please?
Thanks again Neil
Date: Fri, 17 Jan 2014 11:36:03 +0100 From: Nicola Soranzo <soranzo@crs4.it> To: <galaxy-dev@lists.bx.psu.edu> Subject: Re: [galaxy-dev] Import workflows via API Message-ID: <d834d247437269704a26e8bbf8f678c2@crs4.it> Content-Type: text/plain; charset=UTF-8; format=flowed
Il 2014-01-17 06:45 Neil.Burdett@csiro.au ha scritto:
Hi,
I execute workflows via the API. However, if I want another user to use my workflows, I can publish my workflows, but the new user then has to go on to the web browser and import this workflow.
Is there a method/script which I can call via the API which can import all available (published) workflows so the user doesn't have to click a button on the web browser "import workflow" ?
Thanks for any help
Hi Neil, you are very lucky, just yesterday my pull request implementing exactly this has been merged in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/pull-request/298/api-display-and...
and is also available in BioBlend thanks to my colleague Simone Leo:
https://github.com/afgane/bioblend/pull/51
Best, Nicola
-- Nicola Soranzo, Ph.D. Bioinformatics Program, CRS4 Loc. Piscina Manna, 09010 Pula (CA), Italy http://www.bioinformatica.crs4.it/
Hi Nicola, I've merged your changes into my version of the galaxy code (slightly older than galaxy-central) I believe, however, I get the following error when I try and execute your script: Traceback (most recent call last): File "get_wfs.py", line 13, in <module> common.post(api_key, 'http://barium-rbh:9100/extras/api/workflows/import', data) File "/home/galaxy/milxcloud/scripts/api/common.py", line 48, in post return simplejson.loads( urllib2.urlopen( req ).read() ) File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen return _opener.open(url, data, timeout) File "/usr/lib/python2.7/urllib2.py", line 406, in open response = meth(req, response) File "/usr/lib/python2.7/urllib2.py", line 519, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python2.7/urllib2.py", line 444, in error return self._call_chain(*args) File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain result = func(*args) File "/usr/lib/python2.7/urllib2.py", line 527, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 500: Internal Server Error so I printed out the some lines in common.py def post( api_key, url, data ): # Do the actual POST. url = make_url( api_key, url ) print "URL is %s" % url
URL is http://barium-rbh:9100/extras/api/workflows/import?key=34ee80757f0d03de36e33...
the script is: import sys #sys.path.insert(1, 'milxcloud/scripts/api') import common api_key = '34ee80757f0d03de36e33a1676d245e4' workflows = common.get(api_key, 'http://barium-rbh:9100/api/workflows?show_published=True') print workflows published_workflow_ids = [str(workflow[u'id']) for workflow in workflows if bool(workflow[u'published'])] print published_workflow_ids for pw_id in published_workflow_ids: data = {} data['workflow_id'] = pw_id common.post(api_key, 'http://barium-rbh:9100/extras/api/workflows/import', data) and I run it from ~/scripts/api The output from the script is : python get_wfs.py [{'name': 'SUVR', 'tags': [], 'url': '/extras/api/workflows/f2db41e1fa331b3e', 'published': True, 'model_class': 'StoredWorkflow', 'id': 'f2db41e1fa331b3e'}, {'name': 'processSUVRData', 'tags': [], 'url': '/extras/api/workflows/f597429621d6eb2b', 'published': True, 'model_class': 'StoredWorkflow', 'id': 'f597429621d6eb2b'}] ['f2db41e1fa331b3e', 'f597429621d6eb2b'] URL is http://barium-rbh:9100/extras/api/workflows/import?key=34ee80757f0d03de36e33... Any ideas why the import maybe failing? Thanks Neil ________________________________________ From: Nicola Soranzo [soranzo@crs4.it] Sent: Monday, January 20, 2014 9:03 PM To: Burdett, Neil (CCI, Herston - RBWH) Cc: galaxy-dev@lists.bx.psu.edu Subject: Re: Import workflows via API Hi Neil, to import all published workflows you can use a script like this: import sys sys.path.insert(1, 'galaxy-central/scripts/api') import common api_key = 'YOUR_USER_API_KEY' workflows = common.get(api_key, 'http://YOUR_SERVER/api/workflows?show_published=True') published_workflow_ids = [str(workflow[u'id']) for workflow in workflows if bool(workflow[u'published'])] for pw_id in published_workflow_ids: data['workflow_id'] = pw_id common.post(api_key, 'http://YOUR_SERVER/api/workflows/import', data) Nicola Il 2014-01-19 03:12 Neil.Burdett@csiro.au ha scritto:
Hi Nicola, that is exactly what I'm looking for, however, how do I execute the script/tool? I would like to import all published workflows. What is the name of the script to run and the arguments ? Can you give an example please?
Thanks again Neil
Date: Fri, 17 Jan 2014 11:36:03 +0100 From: Nicola Soranzo <soranzo@crs4.it> To: <galaxy-dev@lists.bx.psu.edu> Subject: Re: [galaxy-dev] Import workflows via API Message-ID: <d834d247437269704a26e8bbf8f678c2@crs4.it> Content-Type: text/plain; charset=UTF-8; format=flowed
Il 2014-01-17 06:45 Neil.Burdett@csiro.au ha scritto:
Hi,
I execute workflows via the API. However, if I want another user to use my workflows, I can publish my workflows, but the new user then has to go on to the web browser and import this workflow.
Is there a method/script which I can call via the API which can import all available (published) workflows so the user doesn't have to click a button on the web browser "import workflow" ?
Thanks for any help
Hi Neil, you are very lucky, just yesterday my pull request implementing exactly this has been merged in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/pull-request/298/api-display-and...
and is also available in BioBlend thanks to my colleague Simone Leo:
https://github.com/afgane/bioblend/pull/51
Best, Nicola
-- Nicola Soranzo, Ph.D. Bioinformatics Program, CRS4 Loc. Piscina Manna, 09010 Pula (CA), Italy http://www.bioinformatica.crs4.it/
participants (2)
-
Neil.Burdett@csiro.au
-
Nicola Soranzo