Adding new interval datatype

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Adding new interval datatype

Assaf Gordon

I'd like to add a new datatype to galaxy. This datatype is just an
textual interval file, with non-default columns assignment.
For example, the chromosome is on column 4, start/end at columns 6/7.

Is there a way to achieve this without inheriting a new class in
"/lib/galaxy/datatypes/" ?

I was hoping for something along the lines of adding the following in

<datatype extension="MyNewType"
      mimetype="text/text" display_in_upload="true">
        <metadata name="chromCol" value="4" />
        <metadata name="startCol" value="6" />
        <metadata name="endCol" value="7" />

If this isn't possible yet, and if I may suggest a code fragment, then
at "/lib/galaxy/datatypes/", line 53, I'd add something like:
   for metadata in elem.findall( 'metadata ):
       name  = metadata.get( 'name', None )
       value = metadata.get( 'value', None )
       if name and value:
          self.somehow_change_metadata_value ( name, value)