Jeremy,
I followed all steps in the galaxy tutorial, but I didn't have success.
I'm trying to create a datatype for megabase chromatograms (.esd) very
similar to the Ab1 ones.
Here is my configurations.
1 - Creating datatypes in datatypes_conf.xml
<datatype extension="zip" type="galaxy.datatypes.binary:Esd"
mimetype="application/zip" display_in_upload="true"/>
<datatype extension="esd" type="galaxy.datatypes.binary:Esd"
mimetype="application/octet-stream" display_in_upload="true"/>
2 - Defining types in lib/galaxy/datatypes/binary.py
class Esd( Binary ):
"""Class describing an ab1 binary sequence file"""
file_ext = "esd"
def set_peek( self, dataset, is_multi_byte=False ):
if not dataset.dataset.purged:
dataset.peek = "Binary chromatograms sequence file"
dataset.blurb = data.nice_size( dataset.get_size() )
else:
dataset.peek = 'file does not exist'
dataset.blurb = 'file purged from disk'
def display_peek( self, dataset ):
try:
return dataset.peek
except:
return "Binary esd sequence file (%s)" % ( data.nice_size(
dataset.get_size() ) )
class Zip( Binary ):
"""Class describing a zip archive of binary sequence files"""
file_ext = "zip"
def set_peek( self, dataset, is_multi_byte=False ):
if not dataset.dataset.purged:
zip_file = zipfile.ZipFile( dataset.file_name, "r" )
num_files = len( zip_file.namelist() )
dataset.peek = "Archive of %s binary sequence files" % (
str( num_files ) )
dataset.blurb = data.nice_size( dataset.get_size() )
else:
dataset.peek = 'file does not exist'
dataset.blurb = 'file purged from disk'
def display_peek( self, dataset ):
try:
return dataset.peek
except:
return "Binary sequence file archive (%s)" % (
data.nice_size( dataset.get_size() ) )
def get_mime( self ):
"""Returns the mime type of the datatype"""
return 'application/zip'
When I'm going to send the file in zip format (.esd files
compressed),it shows me the following error:
"An error occurred running this job: Invalid
'File Format' for archive consisting of binary files - use 'Binseq.zip'"
I tried somethings, but I don't have success.
Thank you,
On 07/08/2010 05:50 PM, Jeremy Goecks wrote:
I would like to know about the use of compressed files (zip
format) in
get data app. I'm trying to send .esd files compressed but the program
shows me the following error message: "The uploaded file contains
inappropriate content".
Hi Eric,
Galaxy can accept zip files with a single compressed file but
does not recognize .esd files. You'll need to convert the esd file into
a format that Galaxy recognizes or run your own Galaxy instance and
write your own datatype for Galaxy:
Thanks,
J.
--
<eric_vcard.png>