I have an application that needs to return a zip file.

I attempted to follow the instructions to add a "zip" datatype, with no success. It appears to me that Galaxy insists on generating the output file name and I can't get it to generate one with a ".zip" extension.
The documentation on the wiki is missing a lot of details.

Can you please point me to a working example of some code returning a zip file?

Below are snippets of my code.

Bill Martin


<section name="test" id="test_section_1">
<tool file="test/my_test.xml"/>


use strict;

my ($output_1) = @ARGV;

system("zip ${output_1} /home/bill/.* in.csv");


<tool id="my_test_1" name="my_test">
<description> the descr </description>
<command interpreter="perl">
my_test.pl $output_1
<param format="tabular" name="input" type="data" label="inp"
    help="Dataset missing? See TIP below."/>

<data format="zip" name="output_1"/>



<registration converters_path="lib/galaxy/datatypes/converters" display_path="display_applications">
{ some lines omitted here }
<datatype extension="zip" type="galaxy.datatypes.binary:Zip" mimetype="application/zip" display_in_upload="true"/>
{ ... }


{ many lines omitted here }

class Binary( data.Data ):
    """Binary data"""
    def set_peek( self, dataset, is_multi_byte=False ):
        """Set the peek and blurb text"""
        if not dataset.dataset.purged:
            dataset.peek = 'binary data'
            dataset.blurb = 'data'
            dataset.peek = 'file does not exist'
            dataset.blurb = 'file purged from disk'
    def get_mime( self ):
        """Returns the mime type of the datatype"""
        return 'application/octet-stream'

class Zip( Binary ):
    """Zip File"""
    file_ext = "zip"
    def get_mime( self ):
        """Returns the mime type of the datatype"""
        return 'application/zip'

{ many lines omitted here }
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