Question: Accessing files created from the history
1
gravatar for ali
4.2 years ago by
ali • 20
Canada
ali • 20 wrote:

I would like to write a tool that will get the abs path, or relative path to the galaxy folder of the files created/added/imported in the user's history

How can i do that? I'm reading a ton of documentation, but most of it points to manipulating datasets in the galaxy interface, which is not what i would like

tool galaxy tools datasets • 1.3k views
ADD COMMENT • link • modified 4.2 years ago by jmchilton ♦ 1.1k • written 4.2 years ago by ali • 20
4
gravatar for jmchilton
4.2 years ago by
jmchilton ♦ 1.1k
United States
jmchilton ♦ 1.1k wrote:

A user's history does not correspond to a directory on the disk - the files in a history could be in many different directories. The tool will only be given file paths for those datasets selected by a user - so for instance if your tool has a `data` input with `multiple="true"` - a user could then select many files and your tool could iterate over them (e.g. https://bitbucket.org/galaxy/galaxy-central/src/tip/test/functional/tools/multi_data_param.xml). In general though - tools do not have direct access to histories.

ADD COMMENT • link written 4.2 years ago by jmchilton ♦ 1.1k

when iterating over the name, how can I get the filename? or the attribute:name
Im using ${f.metadata.name}
but this does not work

 

ADD REPLY • link written 4.2 years ago by ali • 20

The file name or the name of the dataset? The former - the path to the file - is just ${f}. The latter - the name of the item as it appears in the history is ${f.name}.

ADD REPLY • link modified 4.2 years ago • written 4.2 years ago by jmchilton ♦ 1.1k
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: 167 users visited in the last hour