[hg] galaxy 2744: prepare for new trackster
details: http://www.bx.psu.edu/hg/galaxy/rev/97381671a8e7 changeset: 2744:97381671a8e7 user: Kanwei Li <kanwei@gmail.com> date: Mon Sep 21 20:13:20 2009 -0400 description: prepare for new trackster 5 file(s) affected in this change: .hgignore lib/galaxy/datatypes/converters/wiggle_to_array_tree_converter.py lib/galaxy/datatypes/data.py lib/galaxy/datatypes/registry.py lib/galaxy/web/controllers/tracks.py diffs (115 lines): diff -r ce15d5e5b6ad -r 97381671a8e7 .hgignore --- a/.hgignore Mon Sep 21 17:02:26 2009 -0400 +++ b/.hgignore Mon Sep 21 20:13:20 2009 -0400 @@ -27,3 +27,6 @@ # Project files *.kpf + +# Chrom len files +*.len diff -r ce15d5e5b6ad -r 97381671a8e7 lib/galaxy/datatypes/converters/wiggle_to_array_tree_converter.py --- a/lib/galaxy/datatypes/converters/wiggle_to_array_tree_converter.py Mon Sep 21 17:02:26 2009 -0400 +++ b/lib/galaxy/datatypes/converters/wiggle_to_array_tree_converter.py Mon Sep 21 20:13:20 2009 -0400 @@ -3,7 +3,7 @@ from __future__ import division import sys - +from galaxy import eggs import pkg_resources; pkg_resources.require( "bx-python" ) from bx.arrays.array_tree import * from bx.arrays.wiggle import IntervalReader diff -r ce15d5e5b6ad -r 97381671a8e7 lib/galaxy/datatypes/data.py --- a/lib/galaxy/datatypes/data.py Mon Sep 21 17:02:26 2009 -0400 +++ b/lib/galaxy/datatypes/data.py Mon Sep 21 20:13:20 2009 -0400 @@ -223,7 +223,7 @@ """Returns available converters by type for this dataset""" return datatypes_registry.get_converters_by_datatype(original_dataset.ext) def find_conversion_destination( self, dataset, accepted_formats, datatypes_registry, **kwd ): - """Returns ( target_ext, exisiting converted dataset )""" + """Returns ( target_ext, existing converted dataset )""" return datatypes_registry.find_conversion_destination_for_dataset_by_extensions( dataset, accepted_formats, **kwd ) def convert_dataset(self, trans, original_dataset, target_type, return_output = False, visible = True ): """This function adds a job to the queue to convert a dataset to another type. Returns a message about success/failure.""" diff -r ce15d5e5b6ad -r 97381671a8e7 lib/galaxy/datatypes/registry.py --- a/lib/galaxy/datatypes/registry.py Mon Sep 21 17:02:26 2009 -0400 +++ b/lib/galaxy/datatypes/registry.py Mon Sep 21 20:13:20 2009 -0400 @@ -211,7 +211,7 @@ except KeyError: #datatype was never declared mimetype = 'application/octet-stream' - self.log.warning('unkown mimetype in data factory %s' % ext) + self.log.warning('unknown mimetype in data factory %s' % ext) return mimetype def get_datatype_by_extension(self, ext ): @@ -265,10 +265,10 @@ tool_xml_text = """ <tool id="__SET_METADATA__" name="Set External Metadata" version="1.0.0" tool_type="set_metadata"> <type class="SetMetadataTool" module="galaxy.tools"/> - <action module="galaxy.tools.actions.metadata" class="SetMetadataToolAction"/> - <command>$__SET_EXTERNAL_METADATA_COMMAND_LINE__</command> + <action module="galaxy.tools.actions.metadata" class="SetMetadataToolAction"/> + <command>$__SET_EXTERNAL_METADATA_COMMAND_LINE__</command> <inputs> - <param format="data" name="input1" type="data" label="File to set metadata on."/> + <param format="data" name="input1" type="data" label="File to set metadata on."/> <param name="__ORIGINAL_DATASET_STATE__" type="hidden" value=""/> <param name="__SET_EXTERNAL_METADATA_COMMAND_LINE__" type="hidden" value=""/> </inputs> @@ -326,7 +326,7 @@ return None def find_conversion_destination_for_dataset_by_extensions( self, dataset, accepted_formats, converter_safe = True ): - """Returns ( target_ext, exisiting converted dataset )""" + """Returns ( target_ext, existing converted dataset )""" for convert_ext in self.get_converters_by_datatype( dataset.ext ): if isinstance( self.get_datatype_by_extension( convert_ext ), accepted_formats ): datasets = dataset.get_converted_files_by_type( convert_ext ) @@ -347,12 +347,12 @@ rval = {} for ext, d_type in self.datatypes_by_extension.iteritems(): inputs = [] - for meta_name, meta_spec in d_type.metadata_spec.iteritems(): - if meta_spec.set_in_upload: + for meta_name, meta_spec in d_type.metadata_spec.iteritems(): + if meta_spec.set_in_upload: help_txt = meta_spec.desc if not help_txt or help_txt == meta_name: help_txt = "" - inputs.append( '<param type="text" name="%s" label="Set metadata value for "%s"" value="%s" help="%s"/>' % ( meta_name, meta_name, meta_spec.default, help_txt ) ) + inputs.append( '<param type="text" name="%s" label="Set metadata value for "%s"" value="%s" help="%s"/>' % ( meta_name, meta_name, meta_spec.default, help_txt ) ) rval[ ext ] = "\n".join( inputs ) if 'auto' not in rval and 'txt' in rval: #need to manually add 'auto' datatype rval[ 'auto' ] = rval[ 'txt' ] diff -r ce15d5e5b6ad -r 97381671a8e7 lib/galaxy/web/controllers/tracks.py --- a/lib/galaxy/web/controllers/tracks.py Mon Sep 21 17:02:26 2009 -0400 +++ b/lib/galaxy/web/controllers/tracks.py Mon Sep 21 20:13:20 2009 -0400 @@ -33,7 +33,7 @@ ) # Dataset type required for each track type. This needs to be more flexible, -# there might be mutliple types of indexes that suffice for a given track type. +# there might be multiple types of indexes that suffice for a given track type. track_type_to_dataset_type = { "line": "array_tree" } @@ -158,7 +158,7 @@ converted_dataset_type = track_type_to_dataset_type[track_type] converted_dataset = self.__dataset_as_type( trans, dataset, converted_dataset_type ) # If at this point we still don't have an `array_tree_dataset`, there - # is now way we can display this data as an array tree + # is no way we can display this data as an array tree if converted_dataset is None: return messages.NO_DATA # Need to check states again for the converted version @@ -186,7 +186,7 @@ return dataset # See if we can convert the dataset if type not in dataset.get_converter_types(): - log.debug( "Conversion from '%s' to '%d' not possible", dataset.extension, type ) + log.debug( "Conversion from '%s' to '%s' not possible", dataset.extension, type ) return None # See if converted dataset already exists converted_datasets = dataset.get_converted_files_by_type( type )
participants (1)
-
Nate Coraor