On Mon, Feb 25, 2013 at 8:02 PM, Samuel Lampa <samuel.lampa@gmail.com> wrote:
Hi, thanks for the quick reply!
On 02/25/2013 08:39 PM, Peter Cock wrote:
I realize that when the master script ("run.R" in my case) is run, it will
not find the other files, since it is itself moved away to a temporary working directory (something like ".../galaxy/database/job_working_directory/000/165").
Is there any "standard way" of dealing with this, any special toolconfig syntax etc? ... or do I have to just hard code the absolute paths to the extra files in my script? :|
Presumably all the child R scripts will be in the same folder as your master R script (or you know the relative path if not). So all you need to do is workout the path of the master R script, and from that compute the path to the child R scripts. I guess you can do this in R using commandArgs().
True. And yes, I do keep the other scripts in the same folder. But since the main script is moved away to the job_working_directory (but not the other scripts, as far as I can tell), they will not be in the same folder anymore, ...
Are you just calling a pre-existing static R script, or doing something more complicated like generating the R script in the tool XML file? For calling pre-existing scripts or binaries, I thought it was just the current working directory which was changed to something like job_working_directory. Regards, Peter