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


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...



> 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 
>> several libraries. When you install gnuplot it will look which libraries are 
>> available and based on that some image file formats may be available and 
>> others will not. It seems png support is not available. When you start a 
>> gnuplot terminal and type 'set terminal' for a list, do you see png as a 
>> supported terminal? If not, you should probably install libpng first and 
>> re-compile gnuplot. If you install gnuplot via MacPorts though it will 
>> probably already take care of this dependency and install it for you... 
>> Cheers,
>> Pi
>> On Apr 24, 2011, at 3:57 AM, Whyte, Jeffrey wrote:
>>> Hi Pieter,
>>> Thanks very much for taking the time to provide the advice and explanations 
>>> - very helpful!  As you suggested, my search path was not defined properly 
>>> to locate gnuplot.  If I typed "gnuplot" in the Terminal, I would get the 
>>> message, "command not found".  Now, Gnuplot is in /usr/local/bin and this 
>>> directory is listed when I type "echo $PATH".  Now when I type "gnuplot" in 
>>> the terminal, I get:
>>> $ gnuplot
>>> G N U P L O T
>>> Version 4.4 patchlevel 3
>>> last modified March 2011
>>> System: Darwin 10.7.0
>>> Copyright (C) 1986-1993, 1998, 2004, 2007-2010
>>> Thomas Williams, Colin Kelley and many others
>>> gnuplot home:     http://www.gnuplot.info
>>> faq, bugs, etc:   type "help seeking-assistance"
>>> immediate help:   type "help"
>>> plot window:      hit 'h'
>>> Terminal type set to 'aqua'
>>> gnuplot>
>>> When I start up Galaxy, and try to run the Boxplot tool, I now get a 
>>> different error:
>>> An error occurred running this job:
>>> gnuplot> set term png size 2048,768
>>> ^
>>> line 0: unknown or ambiguous terminal type; type just 'set terminal' for a 
>>> list
>>> gnuplot> plot '/Users/JJWhyte/galaxy-dist/database/files/000/dataset_6.dat' 
>>> using 1:7:11:12:9 with candlest
>>> I think this is related to the environment, as you explained in your second 
>>> paragraph.  I tried starting gnuplot from the Terminal first, then typing 
>>> "set term xterm", and then exiting, but this didn't change the error.  
>>> Could you please explain how you set the environment in the galaxy/run.sh 
>>> script?
>>> Again, I appreciate the help.
>>> Jeff
>>> On Apr 23, 2011, at 8:11 AM, Pieter Neerincx wrote:
>>> Hi Jeff,
>>> This is indeed a dependency issue and I have seen those both on Linux and 
>>> Mac OS X. What happens if you type gnuplot in a Terminal window yourself? 
>>> If you also get "command not found". There is either still something 
>>> missing or your environment is not setup properly. If the tool works if you 
>>> execute it yourself in the Terminal, but it fails in Galaxy, you do have 
>>> all the dependencies and it's clearly an environment setup issue: your OS 
>>> will search for the binaries in a search path defined by the $PATH 
>>> environment variable. This means that if you call "gnuplot" without 
>>> specifying the path where it is installed, the OS will look in all 
>>> directories specified in $PATH to find it. If it cannot find it, it will 
>>> give you "command not found". Additionally you may have to set 
>>> $LD_LIBRARY_PATH as well if the installed tools link to libraries installed 
>>> outside "default" locations.
>>> Hence if you go to the Terminal and type:
>>> echo $PATH
>>> You will see a colon separated list of directories that should include the 
>>> location where the gnuplot binary is installed. If this is not the case, 
>>> please Google for setting $PATH on Mac OS X. If gnuplot does work if you 
>>> execute it on the commandline, but it fails in Galaxy, it most likely means 
>>> the environment for the user used to run Galaxy is different from yours 
>>> (and the location where gnuplot is installed is missing from $PATH). In 
>>> that case you can either set the environment in the galaxy/run.sh script 
>>> used to start Galaxy or if you can call a bashrc script to set the 
>>> environment from galaxy/run.sh. I use the latter where I have one bashrc 
>>> script that sets the environment for all users and by calling this one from 
>>> galaxy/run.sh I make sure the environment for Galaxy is exactly the same as 
>>> for my (command line) users.
>>> Cheers,
>>> Pi
>>> On Apr 22, 2011, at 5:25 PM, Whyte, Jeffrey wrote:
>>> Hi Everyone,
>>> I'm having trouble getting some of the tools to work on my local 
>>> installation of Galaxy on a Mac (OS X version 10.6.7).  The instructions on 
>>> the GetGalaxy wiki are clear, and I was able to download and install from 
>>> the anonymous Mercurial repository.  Galaxy starts up and runs just fine 
>>> for tools like "Get Data", "FASTQ Groomer", and "FASTQ Summary Statistics".
>>> The problems started when I try to run Graph/Data Display -> Boxplot 
>>> (GnuPlot).  I get the error:
>>> "An error occurred running this job:/bin/sh: gnuplot: command not found
>>> Error running gnuplot."
>>> The FASTX Barcode Splitter also gives me an error:
>>> "An error occurred running this 
>>> job:/Users/Me/galaxy-dist/tools/fastx_toolkit/fastx_barcode_splitter_galaxy_wrapper.sh:
>>>  line 65: fastx_barcode_splitter.pl: command not found
>>> zcat: /Users/Me/galaxy-dist/database/files/000/dataset_10.dat.Z: No such 
>>> file or directory
>>> sed: illegal opt"
>>> I'm assuming these are Tool Dependency problems, although I have tried to 
>>> install the OS X versions of GnuPlot and the FASTX Toolkit and still get 
>>> errors.
>>> Are there any suggestions from users who are successfully running Galaxy on 
>>> OS X?
>>> Thanks in advance,
>>> Jeff
>>> ___________________________________________________________
>>> 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/
>>> -------------------------------------------------------------
>>> mobile: +31 6 143 66 783
>>> e-mail: pieter.neeri...@gmail.com<mailto:pieter.neeri...@gmail.com>
>>> skype:  pieter.online
>>> -------------------------------------------------------------
>> -------------------------------------------------------------
>> mobile: +31 6 143 66 783
>> e-mail: pieter.neeri...@gmail.com
>> skype:  pieter.online
>> -------------------------------------------------------------

mobile: +31 6 143 66 783
e-mail: pieter.neeri...@gmail.com
skype:  pieter.online

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:


Reply via email to