Question: Galaxy Upload Tool - Genome Version
0
gravatar for ali
3.9 years ago by
ali • 20
Canada
ali • 20 wrote:

In the upload tool, upload.py, is it possible to determine which genome the user had selected (or the version if it can automatically determine)

specifically this code block `def __main__():`

upload genome galaxy python • 980 views
ADD COMMENT • link • modified 3.9 years ago by jmchilton ♦ 1.1k • written 3.9 years ago by ali • 20
4
gravatar for jmchilton
3.9 years ago by
jmchilton ♦ 1.1k
United States
jmchilton ♦ 1.1k wrote:

upload.py processes files one at a time - though it generally only processes one file (at least for history uploads). For each such file - the 'add_file()' method is called once and the its arguments include a "dataset" model object. You can access the specified genome selected by the user via the object in this method using the idiom 'dataset.dbkey'.

Hope this helps!

ADD COMMENT • link written 3.9 years ago by jmchilton ♦ 1.1k
0
gravatar for Bjoern Gruening
3.9 years ago by
Bjoern Gruening ♦ 5.1k
Germany
Bjoern Gruening ♦ 5.1k wrote:

I do not understand the question completely. How should Galaxy guess the genome? The correct genome is somehow crucial for Galaxy and every statistical step. So this needs to be accurate.

ADD COMMENT • link written 3.9 years ago by Bjoern Gruening ♦ 5.1k

alright, but which variable stores the genome version if specified

ADD REPLY • link written 3.9 years ago by ali • 20
1

The database metadata attribute is what is used to specify the genome. The variable $dbkey is often used. Examples can be seen in most existing tools, including upload.py. For a complete list of tool config options, please see: http://wiki.galaxyproject.org/Admin/Tools/ToolConfigSyntax

Best, Jen, Galaxy team

ADD REPLY • link written 3.9 years ago by Jennifer Hillman Jackson ♦ 25k

alright, but that is for when defining in the tool XML. when I'm looking at `upload.py`, which variable has the $dbkey stored? For example, dataset.ext has the file extension stored, and output_path has the full path stored. I'm trying to modify the upload tool to run  a script on certain types of files being uploaded. Because upload.xml is the best tool to upload files, I am directly modifying the file upload.py

 

edit: found it, dataset.file.dbkey

ADD REPLY • link modified 3.9 years ago • written 3.9 years ago by ali • 20

Hi, I am not sure how to answer your question. The xml and py function together, and you state that you are modifying the upload.xml file. Can you explain what is not clear? Thanks, Jen, Galaxy team

ADD REPLY • link written 3.9 years ago by Jennifer Hillman Jackson ♦ 25k

nopes, in the question i stated `upload.py`.

ADD REPLY • link written 3.9 years ago by ali • 20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 169 users visited in the last hour