[hg] galaxy 1477: Fix for dataset_metadata_in_file validator: al...
details: http://www.bx.psu.edu/hg/galaxy/rev/99e223f6a132 changeset: 1477:99e223f6a132 user: Greg Von Kuster <greg@bx.psu.edu> date: Fri Aug 22 11:22:44 2008 -0400 description: Fix for dataset_metadata_in_file validator: all locally cached data files that are columnar must have columns separated by tabs characters, not white space. I've eliminated the 'split' param from the validator as it was causing problems. Extract genomic DNA tool should now finally work correctly. 2 file(s) affected in this change: lib/galaxy/tools/parameters/validation.py tools/extract/extract_genomic_dna.xml diffs (37 lines): diff -r 77f8bf51b2ae -r 99e223f6a132 lib/galaxy/tools/parameters/validation.py --- a/lib/galaxy/tools/parameters/validation.py Fri Aug 22 10:39:58 2008 -0400 +++ b/lib/galaxy/tools/parameters/validation.py Fri Aug 22 11:22:44 2008 -0400 @@ -235,18 +235,17 @@ metadata_name = metadata_name.strip() metadata_column = int( elem.get( "metadata_column", 0 ) ) message = elem.get( "message", "Value for metadata %s was not found in %s." % ( metadata_name, filename ) ) - split = elem.get( "split", None ) line_startswith = elem.get( "line_startswith", None ) if line_startswith: line_startswith = line_startswith.strip() - return cls( filename, metadata_name, metadata_column, message, split, line_startswith ) - def __init__( self, filename, metadata_name, metadata_column, message="Value for metadata not found.", split=None, line_startswith=None ): + return cls( filename, metadata_name, metadata_column, message, line_startswith ) + def __init__( self, filename, metadata_name, metadata_column, message="Value for metadata not found.", line_startswith=None ): self.metadata_name = metadata_name self.message = message self.valid_values = [] for line in open( filename ): if line_startswith is None or line.startswith( line_startswith ): - fields = line.split( split ) + fields = line.split( '\t' ) if metadata_column < len( fields ): self.valid_values.append( fields[metadata_column] ) def validate( self, value, history = None ): diff -r 77f8bf51b2ae -r 99e223f6a132 tools/extract/extract_genomic_dna.xml --- a/tools/extract/extract_genomic_dna.xml Fri Aug 22 10:39:58 2008 -0400 +++ b/tools/extract/extract_genomic_dna.xml Fri Aug 22 11:22:44 2008 -0400 @@ -4,7 +4,7 @@ <inputs> <param format="interval" name="input" type="data" label="Fetch sequences corresponding to Query"> <validator type="unspecified_build" /> - <validator type="dataset_metadata_in_file" filename="alignseq.loc" metadata_name="dbkey" metadata_column="1" message="Sequences are not currently available for the specified build." split="\t" line_startswith="seq" /> + <validator type="dataset_metadata_in_file" filename="alignseq.loc" metadata_name="dbkey" metadata_column="1" message="Sequences are not currently available for the specified build." line_startswith="seq" /> </param> <param name="out_format" type="select" label="Output data type"> <option value="fasta">FASTA</option>
participants (1)
-
gregļ¼ scofield.bx.psu.edu