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__():`
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.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!
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.
alright, but which variable stores the genome version if specified
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
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