As I started the Topic here, I have been redirected to Galaxy Help.
In short, I need to know if it’s possible to inject in the command tag, the directory path used for tool input !
With $corpus I get the full path including processed file name.
Something like $corpus.directory (without file name at the end) would be great
The error triggered by my Tool => Caused by: java.lang.IllegalArgumentException: Not a directory: [/home/user/projects/galaxy/database/files/000/dataset_82.dat]
I gave this answer ones to someone else and maybe it can also apply for you. Move your java command to a bash file. In the bash file create a temporary folder, move the input file to that folder and execute the java command. Then move the output files to the galaxy output location variables en remove the temp folder.
As expected according to Docs, we have no other choice but to use a wrapper in order to be able to give a dir path param to the tool (a Directory input type or a property such as $input.directory_path would be nice to add to Galaxy).
So as @gbbio proposed, we’ll have to add in a bash file which interprets the arguments and plays around with $input’s path => It seems do-able and I’ll give it a shot and tell what…
Also, I was wondering about
This is a batch mode input field. Separate jobs will be triggered for each dataset selection.
With symlinking processed files (say 3 files) to my temp folder,my tool will process redudantly 2 files among 3 (as all the files foud in the temp folder are processed by the Tool) , whose purpose is to process many files at a time to generate a whole Terminology…
This workaround is not a good one (or I don’t fully understand it and corrent me if I am wrong). If you use the input variable or a fixed “input” name to create the folder is will go wrong if the user executes the tool twice while the first time is still running.
Lets say you run the tool twice at the same time with the same input but with a different language setting. Then the temp files of both processes will be written to the same folder, and it can be that those files even have the same file name. So the output of the different parameters will be mixed together. You need something that gives the folder a unique name per process.