Re: [galaxy-dev] Special considerations for installing localinstance of Galaxy on Mac OS X (10.6.7)?

2011-04-28 Thread Whyte, Jeffrey
Assaf and Pieter,

That worked like a charm!  I installed the gsed port from MacPorts and then 
edited the shell script, "fastx_barcode_splitter_galaxy_wrapper.sh", replacing 
the two instances of "sed" with "gsed".  Ran Galaxy again, and the barcode 
splitter worked perfectly.

Thank you both for taking the time to help me troubleshoot this.  Excellent 
advice.

Jeff


On Apr 27, 2011, at 10:33 PM, Gordon, Assaf wrote:

> Regarding the fastx-splitter:
> This one is a perl+shell script, not a binary,
> 
> so try installing GNU sed (no need to override Mac's sed, the GNU sed will 
> probably be installed as "gsed"), and modify the shell script (from "sed" to 
> "gsed").
> 
> 
> On Apr 27, 2011, at 19:15, "Pieter Neerincx"  
> wrote:
> 
>> Hi Jeff,
>> 
>> On Apr 28, 2011, at 12:42 AM, Whyte, Jeffrey wrote:
>> 
>>> Hi Pieter,
>>> 
>>> Thanks to both you and Florent for the suggestion of MacPorts.  GnuPlot is 
>>> now working well in Galaxy after I installed the port.
>> 
>> :)
>> 
>>> I also appreciate the information on specifying the custom environment.  
>>> That could be related to the only other problem I am having: the FASTX 
>>> toolkit barcode splitter.  Other FASTX tools like "rename sequences" and 
>>> "trim end" work just fine, but the barcode splitter gives the following 
>>> error in Galaxy:
>>> 
>>> An error occurred running this job:sed: illegal option -- r
>>> usage: sed script [-Ealn] [-i extension] [file ...]
>>> 
>>> Unfortunately, I don't believe there is a port of the FASTX tools available 
>>> through MacPorts.  I have gone through the instructions on the Hannon Lab 
>>> webpage to try to install exactly as specified, but still get the error, 
>>> although now at least Galaxy knows where to look to find the tools.  I 
>>> don't believe this is related to the PATH, as the error in Galaxy seems to 
>>> relate to an option setting.
>> 
>> That seems correct. I just checked sed on a Mac OS X laptop and a linux 
>> server: the one distributed with Mac OS X does not have a --r option whereas 
>> the one on Linux does.
>> 
>>> From man sed on linux:
>> 
>> -r, --regexp-extended
>>use extended regular expressions in the script.
>> 
>> There is no -r in sed on Mac OS X, but from man sed:
>> 
>>-E  Interpret regular expressions as extended (modern) regular 
>> expressions rather than basic regular expressions (BRE's).  The
>>re_format(7) manual page fully describes both formats.
>> 
>> Just from the description this -E option seems extremely similar if it isn't 
>> just plain the same, so you may try to change the sed -r command into sed -E 
>> in
>> 
>>   galaxy/tools/fastx_toolkit/fastx_barcode_splitter_galaxy_wrapper.sh
>> 
>> If that doesn't work you either have to hack the code of this tool :o or try 
>> to install a compatible version of sed...
>> 
>> Cheers,
>> 
>> Pi
>> 
>>> I have run this barcode splitting on the public Galaxy server with no 
>>> problems, and I simply used the same barcode definitions and joined file in 
>>> my local instance of Galaxy, but get the error.
>>> 
>>> I'll give you a break :) and keep working on it to see if I can trace the 
>>> source of the error.
>>> 
>>> Many thanks again,
>>> Jeff
>>> 
>>> 
>>> On Apr 27, 2011, at 4:10 AM, Pieter Neerincx wrote:
>>> 
 Hi Jeff,
 
 1. As Florent wrote, probably the easiest solution is to install the 
 dependencies with MacPorts. Only if stuff is not available via MacPorts or 
 the version available is too old / incompatible with other dependencies I 
 install things manually. MacPorts will add a line like this:
 -
 export PATH=/opt/local/bin:/opt/local/sbin:$PATH
 -
 to your ~/.profile file, which is automatically sourced when you open a 
 new Terminal window. Galaxy is probably running using a different account 
 than yours. Usually a dedicated one or one used for the webserver like 
 _www or www or apache or ... This user must have the same addition to it's 
 environment in order to find gnuplot et al. To give Galaxy the same 
 environment you can either add the line above to galaxy/run.sh immediately 
 after the first line that identifies the file as a shell script 
 (#!/bin/sh) and before the code that starts Galaxy. Optionally you may 
 specify the environment in a separate file and source this file. 
 Personally I like the latter, because I can manage the environment for 
 multiple users and software packages in a single file that I can call from 
 various locations. To source a file you use the . command. Hence 
 [dot][space][path to env file]. Your galaxy/run.sh would start like this:
 -
 #!/bin/sh
 
 #
 # Source my custom environment including the path to MacPorts and other 
 stuff I installed outside the default search paths
 #
 . /path/to/our_environment.bashrc
 

Re: [galaxy-dev] Special considerations for installing localinstance of Galaxy on Mac OS X (10.6.7)?

2011-04-27 Thread Gordon, Assaf
Regarding the fastx-splitter:
This one is a perl+shell script, not a binary,

so try installing GNU sed (no need to override Mac's sed, the GNU sed will 
probably be installed as "gsed"), and modify the shell script (from "sed" to 
"gsed").


On Apr 27, 2011, at 19:15, "Pieter Neerincx"  wrote:

> Hi Jeff,
> 
> On Apr 28, 2011, at 12:42 AM, Whyte, Jeffrey wrote:
> 
>> Hi Pieter,
>> 
>> Thanks to both you and Florent for the suggestion of MacPorts.  GnuPlot is 
>> now working well in Galaxy after I installed the port.
> 
> :)
> 
>> I also appreciate the information on specifying the custom environment.  
>> That could be related to the only other problem I am having: the FASTX 
>> toolkit barcode splitter.  Other FASTX tools like "rename sequences" and 
>> "trim end" work just fine, but the barcode splitter gives the following 
>> error in Galaxy:
>> 
>> An error occurred running this job:sed: illegal option -- r
>> usage: sed script [-Ealn] [-i extension] [file ...]
>> 
>> Unfortunately, I don't believe there is a port of the FASTX tools available 
>> through MacPorts.  I have gone through the instructions on the Hannon Lab 
>> webpage to try to install exactly as specified, but still get the error, 
>> although now at least Galaxy knows where to look to find the tools.  I don't 
>> believe this is related to the PATH, as the error in Galaxy seems to relate 
>> to an option setting.
> 
> That seems correct. I just checked sed on a Mac OS X laptop and a linux 
> server: the one distributed with Mac OS X does not have a --r option whereas 
> the one on Linux does. 
> 
>> From man sed on linux:
> 
>  -r, --regexp-extended
> use extended regular expressions in the script.
> 
> There is no -r in sed on Mac OS X, but from man sed:
> 
> -E  Interpret regular expressions as extended (modern) regular 
> expressions rather than basic regular expressions (BRE's).  The
> re_format(7) manual page fully describes both formats.
> 
> Just from the description this -E option seems extremely similar if it isn't 
> just plain the same, so you may try to change the sed -r command into sed -E 
> in
> 
>galaxy/tools/fastx_toolkit/fastx_barcode_splitter_galaxy_wrapper.sh
> 
> If that doesn't work you either have to hack the code of this tool :o or try 
> to install a compatible version of sed...
> 
> Cheers,
> 
> Pi
> 
>> I have run this barcode splitting on the public Galaxy server with no 
>> problems, and I simply used the same barcode definitions and joined file in 
>> my local instance of Galaxy, but get the error.
>> 
>> I'll give you a break :) and keep working on it to see if I can trace the 
>> source of the error.
>> 
>> Many thanks again,
>> Jeff
>> 
>> 
>> On Apr 27, 2011, at 4:10 AM, Pieter Neerincx wrote:
>> 
>>> Hi Jeff,
>>> 
>>> 1. As Florent wrote, probably the easiest solution is to install the 
>>> dependencies with MacPorts. Only if stuff is not available via MacPorts or 
>>> the version available is too old / incompatible with other dependencies I 
>>> install things manually. MacPorts will add a line like this:
>>> -
>>> export PATH=/opt/local/bin:/opt/local/sbin:$PATH 
>>> -
>>> to your ~/.profile file, which is automatically sourced when you open a new 
>>> Terminal window. Galaxy is probably running using a different account than 
>>> yours. Usually a dedicated one or one used for the webserver like _www or 
>>> www or apache or ... This user must have the same addition to it's 
>>> environment in order to find gnuplot et al. To give Galaxy the same 
>>> environment you can either add the line above to galaxy/run.sh immediately 
>>> after the first line that identifies the file as a shell script (#!/bin/sh) 
>>> and before the code that starts Galaxy. Optionally you may specify the 
>>> environment in a separate file and source this file. Personally I like the 
>>> latter, because I can manage the environment for multiple users and 
>>> software packages in a single file that I can call from various locations. 
>>> To source a file you use the . command. Hence [dot][space][path to env 
>>> file]. Your galaxy/run.sh would start like this:
>>> -
>>> #!/bin/sh
>>> 
>>> #
>>> # Source my custom environment including the path to MacPorts and other 
>>> stuff I installed outside the default search paths
>>> #
>>> . /path/to/our_environment.bashrc
>>> -
>>> 
>>> In our_environment.bashrc you would than have the same line:
>>> 
>>> export PATH=/opt/local/bin:/opt/local/sbin:$PATH
>>> 
>>> and potentially other stuff to set your environment. 
>>> 
>>> 2. For the gnuplot error below "unknown or ambiguous terminal type": It 
>>> seems the gnuplot script Galaxy is calling is trying to use an unsupported 
>>> "terminal". When you save the figure to a file a "terminal" is just a file 
>>> type. In order to write jpeg, tiff, png, pdf, svg, etc. images gnuplot uses 
>>>