request: dedicated python files for user datatypes
Hello, I'd like to request a small change: to create a dedicated python file for user customizable datatypes - something like "user_intervals.py" along side "intervals.py" (in /lib/galaxy/datatypes). The reason is that we have our own custom types, with special column assignment. So for example, I've added the following class to the bottom of "intervals.py": ========= class Foobar ( Interval ): """Foobar results""" """Add metadata elements""" MetadataElement( name="chromCol", default=2, desc="Chrom column", param=metadata.ColumnParameter ) MetadataElement( name="startCol", default=4, desc="Start column", param=metadata.ColumnParameter ) MetadataElement( name="endCol", default=5, desc="End column", param=metadata.ColumnParameter ) MetadataElement( name="strandCol", default=3, desc="Strand column", param=metadata.ColumnParameter ) MetadataElement( name="nameCol", default=1, desc="Name/Identifier column", param=metadata.ColumnParameter ) MetadataElement( name="columns", default=6, desc="Number of columns", readonly=True, visible=False ) =========== It's a simple text file containing intervals, but with different column assignment. I also updated <datatypes_conf.xml>, and this way, if my tool outputs a "foobar" format - the columns assignment works perfectly. The only problem is merging: If the "intervals.py" file is changed in the main repository - automatic merging doesn't work cleanly. It needs to merge an old intervals.py (with my custom types) together with a new intervals.py (without my custom types). Maybe I'm doing something wrong, but I always end up having to manually resolve the conflicts. My suggestion is to have an empty "user_intervals.py" (or other datatypes, too), which will be monitored in the repository, but will not contain any Galaxy official types. That will keep a clear separation between galaxy types and user types. If this is already possible somehow, please let me know. Thanks! gordon.
Hello Assaf, I think I must be missing something here, so please clarify if necessary. Wouldn't it work to just move your Foobar class from the Galaxy distributed interval.py into your own user_intervals.py with your own user customizable data types in it? Your proprietary types could still subclass from any Galaxy supported type. There is no need to have a file like this in the distribution. Greg Von Kuster Galaxy Development Team Assaf Gordon wrote:
Hello,
I'd like to request a small change:
to create a dedicated python file for user customizable datatypes - something like "user_intervals.py" along side "intervals.py" (in /lib/galaxy/datatypes).
The reason is that we have our own custom types, with special column assignment. So for example, I've added the following class to the bottom of "intervals.py":
========= class Foobar ( Interval ): """Foobar results"""
"""Add metadata elements""" MetadataElement( name="chromCol", default=2, desc="Chrom column", param=metadata.ColumnParameter ) MetadataElement( name="startCol", default=4, desc="Start column", param=metadata.ColumnParameter ) MetadataElement( name="endCol", default=5, desc="End column", param=metadata.ColumnParameter ) MetadataElement( name="strandCol", default=3, desc="Strand column", param=metadata.ColumnParameter ) MetadataElement( name="nameCol", default=1, desc="Name/Identifier column", param=metadata.ColumnParameter ) MetadataElement( name="columns", default=6, desc="Number of columns", readonly=True, visible=False ) ===========
It's a simple text file containing intervals, but with different column assignment. I also updated <datatypes_conf.xml>, and this way, if my tool outputs a "foobar" format - the columns assignment works perfectly.
The only problem is merging: If the "intervals.py" file is changed in the main repository - automatic merging doesn't work cleanly. It needs to merge an old intervals.py (with my custom types) together with a new intervals.py (without my custom types). Maybe I'm doing something wrong, but I always end up having to manually resolve the conflicts.
My suggestion is to have an empty "user_intervals.py" (or other datatypes, too), which will be monitored in the repository, but will not contain any Galaxy official types. That will keep a clear separation between galaxy types and user types.
If this is already possible somehow, please let me know.
Thanks! gordon.
_______________________________________________ galaxy-dev mailing list galaxy-dev@bx.psu.edu http://mail.bx.psu.edu/cgi-bin/mailman/listinfo/galaxy-dev
participants (2)
-
Assaf Gordon
-
Greg Von Kuster