Changeset 1477:99e223f6a132
- Timestamp:
- 08/22/08 11:22:44
(3 months ago)
- Author:
- Greg Von Kuster <greg@bx.psu.edu>
- branch:
- default
- Message:
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.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1381 |
r1477 |
|
| 236 | 236 | metadata_column = int( elem.get( "metadata_column", 0 ) ) |
|---|
| 237 | 237 | message = elem.get( "message", "Value for metadata %s was not found in %s." % ( metadata_name, filename ) ) |
|---|
| 238 | | split = elem.get( "split", None ) |
|---|
| 239 | 238 | line_startswith = elem.get( "line_startswith", None ) |
|---|
| 240 | 239 | if line_startswith: |
|---|
| 241 | 240 | line_startswith = line_startswith.strip() |
|---|
| 242 | | return cls( filename, metadata_name, metadata_column, message, split, line_startswith ) |
|---|
| 243 | | def __init__( self, filename, metadata_name, metadata_column, message="Value for metadata not found.", split=None, line_startswith=None ): |
|---|
| | 241 | return cls( filename, metadata_name, metadata_column, message, line_startswith ) |
|---|
| | 242 | def __init__( self, filename, metadata_name, metadata_column, message="Value for metadata not found.", line_startswith=None ): |
|---|
| 244 | 243 | self.metadata_name = metadata_name |
|---|
| 245 | 244 | self.message = message |
|---|
| … | … | |
| 247 | 246 | for line in open( filename ): |
|---|
| 248 | 247 | if line_startswith is None or line.startswith( line_startswith ): |
|---|
| 249 | | fields = line.split( split ) |
|---|
| | 248 | fields = line.split( '\t' ) |
|---|
| 250 | 249 | if metadata_column < len( fields ): |
|---|
| 251 | 250 | self.valid_values.append( fields[metadata_column] ) |
|---|
| r1475 |
r1477 |
|
| 5 | 5 | <param format="interval" name="input" type="data" label="Fetch sequences corresponding to Query"> |
|---|
| 6 | 6 | <validator type="unspecified_build" /> |
|---|
| 7 | | <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" /> |
|---|
| | 7 | <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" /> |
|---|
| 8 | 8 | </param> |
|---|
| 9 | 9 | <param name="out_format" type="select" label="Output data type"> |
|---|