darren.culle...@csiro.au wrote:
> Hi All,
> 
> Sorry for the delay, I have had a couple of other projects on the go.
> 
> Still no good. I have made the data type unsniffable and added what I thought 
> was the correct information. I have also added the extension (sfx) to the 
> list of unsniffable binary formats in binary.py but it does not make a 
> difference.

Hi Darren,

Please have a look in tools/data_source/upload.py, you'll need to bypass
the binary test for your new datatype.  Eventually this test should be
moved up to the datatype code, but for now this extra step is required.

--nate

> 
> Code is as follows:
> 
> ./datatypes_conf.xml
> <datatype extension="sfx" type="galaxy.datatypes.binary:Sfx" 
> display_in_upload="true"/>
> 
> ./lib/galaxy/datatypes/binary.py
> class Sfx( Binary ):
>     """ Kanga and uAssembler Suffix Array """
>     file_ext = "sfx"
> 
>     def __init__( self, **kwd ):
>         Binary.__init__( self, **kwd )
> 
>     def set_peek( self, dataset, is_multi_byte=False ):
>         if not dataset.dataset.purged:
>             dataset.peek  = 'Suffix Array sfx'
>             dataset.blurb = 'binary data'
>         else:
>             dataset.peek = 'file does not exist'
>             dataset.blurb = 'file purged from disk'
> 
> 
> My gut feeling is that this is related to the fact that Galaxy wants to look 
> in the file, but as soon as its opened, it can't recognise the characters and 
> it reports "The uploaded binary file contains inappropriate content". I 
> thought the set_peek method I have above would override the one described in 
> the Class Binary. I have tried adding a sniffer tag into datatypes_conf.xml, 
> but I get the same result whether the sniffer tag is there or not.
> 
> I am sure I have missed a step or piece of content but I have no idea what I 
> am missing...
> 
> Thanks again for your time,
> 
> 
> Darren Cullerne
> Computational Biology
> CSIRO Plant Industry
> 
> x5042
> +61 2 62465042
> 
> darren.culle...@csiro.au<mailto:darren.culle...@csiro.au>
> 

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

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

Reply via email to