Hi Jeremy,
which key does this refer to and in which table?
This refers to the id column in the HistoryDatasetAssociation table. However, as of galaxy-central changeset 3700, this ID is now encoded.
I am trying to construct a query which will return the (user generated) name of the output, the command that ran it and the path of the .dat file. Can any one give some pointers and/or point me to a schema diagram?
There's no formal schema diagram that I'm aware of (but perhaps someone generated one for personal use?), but galaxy/model/mapping.py has a list of tables that are useful for understanding the Galaxy database schema.
To get the name and .dat file is simple:
-- *create a function in the dataset controller that takes an encoded HDA id; *get the HDA object by calling get_dataset with the encoded id and other params: get_dataset( self, trans, dataset_id, check_ownership=True, check_accessible=False ): *Once you have the HDA object, I think this should work: hda.name = NAME hda.dataset.file_name = .DAT file --
Getting the command that created the HDA is more problematic due to the fact that HDA can result from copying data. See the code in tool_runner.py's rerun() function to recover the tool_id.
What's your overall goal? Perhaps we can provide a pointer to get you started?
Thanks for your reply. I'd like to be able to take an output generated in Galaxy and copy or symlink it to somewhere in the file system with a meaningful name and extension. I run a core group and a use case would be for users to run Galaxy next gen sequence analysis tools (qc/mapping/bam generation maybe peak calling). Then they can analyse the data further using non-Galaxy tools on the UNIX file system, because certain operations will be difficult to wrap into Galaxy, at least initially. Using symlinks would mean large output data files don't need to be moved around. In some cases we might copy the files, where a permanent record is required. Maybe the physical (.DAT) file path could be visible in the 'Edit properties' screen? HTH. Cheers, Steve