Question: Galaxy Upload Tool - Genome Version
0
gravatar for ali
3.9 years ago by
ali20
Canada
ali20 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 COMMENTlink modified 3.9 years ago by jmchilton1.1k • written 3.9 years ago by ali20
4
gravatar for jmchilton
3.9 years ago by
jmchilton1.1k
United States
jmchilton1.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 COMMENTlink written 3.9 years ago by jmchilton1.1k
0
gravatar for Bjoern Gruening
3.9 years ago by
Bjoern Gruening5.1k
Germany
Bjoern Gruening5.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 COMMENTlink written 3.9 years ago by Bjoern Gruening5.1k

alright, but which variable stores the genome version if specified

ADD REPLYlink written 3.9 years ago by ali20
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 REPLYlink written 3.9 years ago by Jennifer Hillman Jackson25k

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 REPLYlink modified 3.9 years ago • written 3.9 years ago by ali20

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 REPLYlink written 3.9 years ago by Jennifer Hillman Jackson25k

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

ADD REPLYlink written 3.9 years ago by ali20
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