1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/4ba34b095a79/ changeset: r5502:4ba34b095a79 user: jgoecks date: 2011-05-06 01:05:39 summary: Trackster: use GTF metadata to create dynamic filters. affected #: 1 file (448 bytes) --- a/lib/galaxy/visualization/tracks/data_providers.py Thu May 05 16:51:56 2011 -0400 +++ b/lib/galaxy/visualization/tracks/data_providers.py Thu May 05 19:05:39 2011 -0400 @@ -394,6 +394,14 @@ filters = [ { 'name': 'Score', 'type': 'int', 'index': filter_col } ] filter_col += 1 if isinstance( self.original_dataset.datatype, Gtf ): + # Create filters based on dataset metadata. + for name, a_type in self.original_dataset.metadata.attribute_types.items(): + if a_type in [ 'int', 'float' ]: + filters.append( { 'name': name, 'type': a_type, 'index': filter_col } ) + filter_col += 1 + + ''' + # Old code: use first line in dataset to find attributes. for i, line in enumerate( open(self.original_dataset.file_name) ): if not line.startswith('#'): # Look at first line for attributes and types. @@ -411,10 +419,11 @@ filters.append( { 'name': attr, 'type': attr_type, 'index': filter_col } ) filter_col += 1 break + ''' elif isinstance( self.original_dataset.datatype, Bed ): # Can filter by score column only. filters = [ { 'name': 'Score', 'type': 'int', 'index': filter_col } ] - + return filters class TabixDataProvider( FilterableMixin, TracksDataProvider ): Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.