On Wed, Apr 6, 2011 at 12:44 AM, Zhe Chen <z...@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

___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/

Reply via email to