Hello,
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/interval.py" ?
I was hoping for something along the lines of adding the following in
"datatypes_conf.xml":
<datatype extension="MyNewType"
type="galaxy.datatypes.interval:Interval"
mimetype="text/text" display_in_upload="true">
<metadata name="chromCol" value="4" />
<metadata name="startCol" value="6" />
<metadata name="endCol" value="7" />
</datatype>
If this isn't possible yet, and if I may suggest a code fragment, then
at "/lib/galaxy/datatypes/registry.py", 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)
-------------------
Thanks,
Gordon.