[hg] galaxy 1644: Bug fixes for compare, Group and filter tools.
details: http://www.bx.psu.edu/hg/galaxy/rev/ab46f22b4624 changeset: 1644:ab46f22b4624 user: guru date: Tue Dec 02 11:41:25 2008 -0500 description: Bug fixes for compare, Group and filter tools. 3 file(s) affected in this change: tools/filters/compare.xml tools/stats/filtering.py tools/stats/grouping.py diffs (51 lines): diff -r 74e392ea6ae8 -r ab46f22b4624 tools/filters/compare.xml --- a/tools/filters/compare.xml Tue Dec 02 10:50:54 2008 -0500 +++ b/tools/filters/compare.xml Tue Dec 02 11:41:25 2008 -0500 @@ -3,9 +3,13 @@ <command interpreter="python">joinWrapper.py $input1 $input2 $field1 $field2 $mode $out_file1</command> <inputs> <param format="tabular" name="input1" type="data" label="Compare"/> - <param name="field1" label="Using column" type="data_column" data_ref="input1" /> + <param name="field1" label="Using column" type="data_column" data_ref="input1"> + <validator type="no_options" message="Invalid column choice. Please try again after editing metadata of your input dataset by clicking on the pencil icon next to it."/> + </param> <param format="tabular" name="input2" type="data" label="against" /> - <param name="field2" label="and column" type="data_column" data_ref="input2" /> + <param name="field2" label="and column" type="data_column" data_ref="input2"> + <validator type="no_options" message="Invalid column choice. Please try again after editing metadata of your input dataset by clicking on the pencil icon next to it."/> + </param> <param name="mode" type="select" label="To find" help="See examples below for explanation of these options"> <option value="N">Matching rows of 1st query</option> <option value="V">Non Matching rows of 1st query</option> diff -r 74e392ea6ae8 -r ab46f22b4624 tools/stats/filtering.py --- a/tools/stats/filtering.py Tue Dec 02 10:50:54 2008 -0500 +++ b/tools/stats/filtering.py Tue Dec 02 11:41:25 2008 -0500 @@ -25,6 +25,7 @@ cond_text = sys.argv[3] try: in_columns = int( sys.argv[4] ) + assert sys.argv[5] #check to see that the column types varaible isn't null in_column_types = sys.argv[5].split( ',' ) except: stop_err( "Data does not appear to be tabular. This tool can only be used with tab-delimited data." ) diff -r 74e392ea6ae8 -r ab46f22b4624 tools/stats/grouping.py --- a/tools/stats/grouping.py Tue Dec 02 10:50:54 2008 -0500 +++ b/tools/stats/grouping.py Tue Dec 02 11:41:25 2008 -0500 @@ -128,7 +128,7 @@ if op not in ['c','length','unique','random']: for j, elem in enumerate( prev_vals[i] ): prev_vals[i][j] = float( elem ) - rout = "%f" %( eval( rfunc )( prev_vals[i] )) + rout = "%g" %( eval( rfunc )( prev_vals[i] )) if rounds[i] == 'yes': rout = int(round(float(rout))) else: @@ -179,7 +179,7 @@ if op not in ['c','length','unique','random']: for j, elem in enumerate( prev_vals[i] ): prev_vals[i][j] = float( elem ) - rout = '%f' %( eval( rfunc )( prev_vals[i] )) + rout = '%g' %( eval( rfunc )( prev_vals[i] )) if rounds[i] == 'yes': rout = int(round(float(rout))) else:
participants (1)
-
Nate Coraor