How to pack and save multiple output to directory

In release_18.09, I found the dataset.extra_file_path and dataset.files_path both point to the jobs_directory (eg. ../database/jobs_directory/000/..).

I am trying to implement a script into a galaxy server that I usually run on the command line. The script produces a variable number of output files and saves those into an output directory. Now I want to pack the the output directory as an final output file in my galaxy. I set my XML as follow:

<command><![CDATA[
python $__tool_directory__/myscript.py --input=${input} --outdir='$output.extra_files_path'

&& tar cf $output '$output.extra_files_path' 
    ]]></command>

but I got error: tar: Removing leading/’ from member names`, and it seems I got an empty directory ‘$output.extra_files_path’ in the jobs_directory. Could anyone know how to solve it? Thank you.

2 Likes

If the final output of your tool is the tar archive, I’d put the files in a temporary subdirectory of the current working directory instead of using $output.extra_files_path .

2 Likes