6 Apr
2011
6 Apr
'11
10:01 a.m.
On Wed, Apr 6, 2011 at 12:44 AM, Zhe Chen <zhe@lanl.gov> wrote:
Hi,
My tool has a script reads a file in the same directory as the script. When I try to use relative path to read the file, it works by directly run it, but does not work when calling from Galaxy. Absolute path will work, but I want to know is there a way to do it using relative path.
Can you give me some suggestion?
myTool.pl use the following code the read the file in the same directory
my $genusfiles = "genus.txt"; open (GENUSGP, "$genusfiles") or die "$genusfiles: $! \n"; close(GENUSGP);
Thanks
I would expect that you can look at the first entry in argv which should give you the path to the script being run, myTool.pl, then use that to construct the path to genus.txt Peter