Definitely possible (but as Greg said, not trivial). MetaDataElements define a schema for the allowed metadata on a given datatype. You'll always need that, in your case, you will define a new metadata element containing a list of column names. Then you'll want to override set_meta to try to detect the column names. (init_meta initializes with defaults, set_meta tries to detect from the data). Finally, you'll want to modify ColumnListParameter to use the names if they are defined. (As long as this is backward compatible, you could just add it to the Tabular datatype, and I'm pretty sure we'd be happy to integrate it, I've wanted this feature for a while. It just needs to be conservative about detecting headers to not break things that work now. For example, many UCSC formats include comment lines before the header, very difficult to detect properly). (Moving to galaxy-dev) On Sep 1, 2009, at 10:32 AM, James Casbon wrote:
Thanks, Greg. So you do think it is possible? I have tried to understand the datatype by looking at: http://bitbucket.org/galaxy/galaxy-central/wiki/AddingDatatypes and reading the code. I am now very confused - when should you use init_meta and set_meta, or a MetaDataElement ?
It looks like MetaDataElements are class definitions, so to what extent can you change metadata on an instance?