Re: [galaxy-dev] Plotting tools - best output format? PDF, PNG, ... SVG!

2011-04-21 Thread Peter Cock
On Thu, Apr 21, 2011 at 10:50 AM, Pieter Neerincx
 wrote:
> Hi Peter,
>
> On Apr 20, 2011, at 5:47 PM, Peter Cock wrote:
>
>> On Wed, Apr 20, 2011 at 4:30 PM, Pieter Neerincx
>>  wrote:
>>> Hi Peter,
>>>
>>> On Apr 20, 2011, at 11:07 AM, Peter Cock wrote:
>>>
 Hi all,
>>>
>>> ..
>>>
 How about SVG? Don't most of the mainline browsers have
 reasonably good SVG support built in (possibly via a plugin)?
>>>
>>> Yep, SVG support is pretty good nowadays especially in FireFox
>>> and Opera. Safari, IE and Chrome have only partial support, but
>>> for simple charts without 3D filters it works fine. I've added SVG
>>> as a datatype to my Galaxy and this works great. You won't need
>>> a plugin; in fact the old Adobe SVG plugin is depreciated already
>>> for a few years now and no longer compatible with recent browser
>>> versions.
>>
>> I looked at SVG about a year ago, and was pretty impressed.
>> I did run into some issues, particularly with links, and opted to
>> use PNG files in the end. Since then we've finally dropped IE6,
>> so hopefully SVG would be safe now.
>>
>> Are your changes to add SVG as a datatype to Galaxy public?
>> I'd like to suggest that be merged to the trunk.
>
> I simply added this line to my datatypes_conf.xml:
>
>         mimetype="image/svg+xml"/>
>
> I didn't make a sniffer as I don't have a use case for users
> uploading SVGs, so I didn't have to create a Python class and
> SVG is just another instance of galaxy.datatypes.images:Image
> from a plain vanilla Galaxy.

That makes sense if the sniffer is only used on upload.

> To make sure the client displays the SVG you may have to add
> the SVG mimetype to your web server's config too. Where this
> is defined may differ per linux distro. I use apache as a proxy
> and had to add
>
>        image/svg+xml           svg svgz
>
> to /etc/mime.types.

Thanks for the details - it looks simple enough to add here too.
If/when any SVG producing tools are added to Galaxy or the
Galaxy Tool Shed, then it would be nice to have this done in
the main repository.

>>> The nice benefit of SVG in addition to not needing a plugin is
>>> that the image can scale with the surrounding text if you zoom
>>> in your browser (without loosing resolution).
>>>
>>> The disadvantage is that although my users know what a PDF
>>> file is and can process them for posters/manuscripts, most of
>>> them never heard of SVG and get stuck when it doesn't import
>>> into PowerPoint et al. :(
>>
>> Do they cope with PDF?
>
> Well, they know how to view and print one :). Importing them
> directly into PowerPoint and Word is just as problematic though,
> so that usually involves opening the PDF in a different program
> and copy/paste or exporting to another format. Still a hassle, but
> they manage...

Getting a PDF into PowerPoint or Word is easy on a Mac ;)
But yes, point taken - even though a PDF is easier to work with
than an SVG (or a postscript file), it can still be a hassle.

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/


Re: [galaxy-dev] Plotting tools - best output format? PDF, PNG, ... SVG!

2011-04-20 Thread Peter Cock
On Wed, Apr 20, 2011 at 4:30 PM, Pieter Neerincx
 wrote:
> Hi Peter,
>
> On Apr 20, 2011, at 11:07 AM, Peter Cock wrote:
>
>> Hi all,
>
> ..
>
>> How about SVG? Don't most of the mainline browsers have
>> reasonably good SVG support built in (possibly via a plugin)?
>
> Yep, SVG support is pretty good nowadays especially in FireFox
> and Opera. Safari, IE and Chrome have only partial support, but
> for simple charts without 3D filters it works fine. I've added SVG
> as a datatype to my Galaxy and this works great. You won't need
> a plugin; in fact the old Adobe SVG plugin is depreciated already
> for a few years now and no longer compatible with recent browser
> versions.

I looked at SVG about a year ago, and was pretty impressed.
I did run into some issues, particularly with links, and opted to
use PNG files in the end. Since then we've finally dropped IE6,
so hopefully SVG would be safe now.

Are your changes to add SVG as a datatype to Galaxy public?
I'd like to suggest that be merged to the trunk.

> The nice benefit of SVG in addition to not needing a plugin is
> that the image can scale with the surrounding text if you zoom
> in your browser (without loosing resolution).
>
> The disadvantage is that although my users know what a PDF
> file is and can process them for posters/manuscripts, most of
> them never heard of SVG and get stuck when it doesn't import
> into PowerPoint et al. :(

Do they cope with PDF?

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/


Re: [galaxy-dev] Plotting tools - best output format? PDF, PNG, ... SVG!

2011-04-20 Thread Pieter Neerincx
Hi Peter,

On Apr 20, 2011, at 11:07 AM, Peter Cock wrote:

> Hi all,

..

> How about SVG? Don't most of the mainline browsers have
> reasonably good SVG support built in (possibly via a plugin)?

Yep, SVG support is pretty good nowadays especially in FireFox and Opera. 
Safari, IE and Chrome have only partial support, but for simple charts without 
3D filters it works fine. I've added SVG as a datatype to my Galaxy and this 
works great. You won't need a plugin; in fact the old Adobe SVG plugin is 
depreciated already for a few years now and no longer compatible with recent 
browser versions.

The nice benefit of SVG in addition to not needing a plugin is that the image 
can scale with the surrounding text if you zoom in your browser (without 
loosing resolution).

The disadvantage is that although my users know what a PDF file is and can 
process them for posters/manuscripts, most of them never heard of SVG and get 
stuck when it doesn't import into PowerPoint et al. :(

Cheers,

Pi 

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

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

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


Re: [galaxy-dev] Plotting tools - best output format? PDF, PNG, ...

2011-04-20 Thread Peter Cock
On Wed, Apr 20, 2011 at 10:07 AM, Peter Cock  wrote:
> Hi all,
>
> I'm working on a simple plotting tool, and currently I am using PDF
> output since this is vector based (so it can be rescaled without loss
> of quality) and can be edited easily enough for use in publications.
>
> However, at least on my OS/Browser, Galaxy does not show the
> PDF files in situ, the "eye" button acts like a download link. Is this
> a bug?

Looks like a Firefox issue/setting - false alarm:

On our local Galaxy, with a PDF entry in the history, and as a control
http://nar.oxfordjournals.org/content/39/7/2492.full.pdf+html
which should show a PDF embedded on the left:

Windows XP, Internet Explorer 7.05730.13
- NAR shows PDF on left, good
- Clicking on the eye, shows the PDF in the central panel, good.
- Clicking on the disk, saves the PDF, good.

Windows XP, Chrome 10.0.648.204
- NAR shows PDF on left, good
- Clicking on the eye, shows the PDF in the central panel, good.
- Clicking on the disk, saves the PDF, good.

Windows XP, Firefox 3.6.13
- NAR shows PDF on left, good
- Clicking on the eye, shows the PDF in the central panel, good.
- Clicking on the disk, saves the PDF, good.

Linux CentOS, Firefox 3.6.13
- NAR downloads PDF, shows left pane empty, usable.
- Clicking on the eye, downloads the PDF, usable.
- Clicking on the disk, saves the PDF, good.

Mac OS X 10.6, Firefox 4.0
- NAR downloads PDF, shows left pane empty, usable.
- Clicking on the eye, downloads the PDF, usable.
- Clicking on the disk, saves the PDF, good.

Mac OS X 10.6, Safari 5.0.5
- NAR shows PDF on left, good
- Clicking on the eye, shows the PDF in the central panel, good.
- Clicking on the disk, saves the PDF, good.

So it looks like Firefox can (probably dependent on the user's
settings) download PDF files rather than show them in situ.
That's fine, and not specific to Galaxy.

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/