details: http://www.bx.psu.edu/hg/galaxy/rev/0fc19c283f78 changeset: 2424:0fc19c283f78 user: guru date: Fri May 29 11:07:18 2009 -0400 description: Bug fixes for histogram liftover and grouping tools.
6 file(s) affected in this change:
tools/extract/liftOver_wrapper.py tools/extract/liftOver_wrapper.xml tools/plotting/histogram.py tools/plotting/histogram2.xml tools/stats/grouping.py tools/stats/grouping.xml
diffs (102 lines):
diff -r 7a6f75bf4be5 -r 0fc19c283f78 tools/extract/liftOver_wrapper.py --- a/tools/extract/liftOver_wrapper.py Thu May 28 15:18:49 2009 -0400 +++ b/tools/extract/liftOver_wrapper.py Fri May 29 11:07:18 2009 -0400 @@ -29,7 +29,7 @@ if in_dbkey == "?": stop_err( "Input dataset genome build unspecified, click the pencil icon in the history item to specify it." )
-cmd_line = "liftOver -minMatch=" + minMatch + " " + infile + " " + mapfilepath + " " + outfile1 + " " + outfile2 + " > /dev/null 2>&1" +cmd_line = "liftOver -minMatch=" + str(minMatch) + " " + infile + " " + mapfilepath + " " + outfile1 + " " + outfile2 + " > /dev/null 2>&1"
if not os.path.isfile( mapfilepath ): stop_err( "%s mapping is not currently available." % ( mapfilepath.split('/')[-1].split('.')[0] ) ) diff -r 7a6f75bf4be5 -r 0fc19c283f78 tools/extract/liftOver_wrapper.xml --- a/tools/extract/liftOver_wrapper.xml Thu May 28 15:18:49 2009 -0400 +++ b/tools/extract/liftOver_wrapper.xml Fri May 29 11:07:18 2009 -0400 @@ -1,4 +1,4 @@ -<tool id="liftOver1" name="Convert genome coordinates"> +<tool id="liftOver1" name="Convert genome coordinates" version="1.0.1"> <description> between assemblies and genomes</description> <command interpreter="python">liftOver_wrapper.py $input "$out_file1" "$out_file2" $dbkey $to_dbkey $minMatch</command> <inputs> diff -r 7a6f75bf4be5 -r 0fc19c283f78 tools/plotting/histogram.py --- a/tools/plotting/histogram.py Thu May 28 15:18:49 2009 -0400 +++ b/tools/plotting/histogram.py Fri May 29 11:07:18 2009 -0400 @@ -32,7 +32,7 @@ skipped_lines = 0 first_invalid_line = 0 invalid_value = '' - + i = 0 for i, line in enumerate( file( in_fname ) ): valid = True line = line.rstrip('\r\n') @@ -79,7 +79,10 @@ except Exception, exc: stop_err( "%s" %str( exc ) ) else: - stop_err( "All values in column %s are non-numeric." %sys.argv[3] ) + if i == 0: + stop_err("Input dataset is empty.") + else: + stop_err( "All values in column %s are non-numeric." %sys.argv[3] )
print "Histogram of column %s. " %sys.argv[3] if skipped_lines > 0: diff -r 7a6f75bf4be5 -r 0fc19c283f78 tools/plotting/histogram2.xml --- a/tools/plotting/histogram2.xml Thu May 28 15:18:49 2009 -0400 +++ b/tools/plotting/histogram2.xml Fri May 29 11:07:18 2009 -0400 @@ -1,4 +1,4 @@ -<tool id="histogram_rpy" name="Histogram"> +<tool id="histogram_rpy" name="Histogram" version="1.0.1"> <description>of a numeric column</description> <command interpreter="python">histogram.py $input $out_file1 $numerical_column "$title" "$xlab" $breaks $density</command> <inputs> diff -r 7a6f75bf4be5 -r 0fc19c283f78 tools/stats/grouping.py --- a/tools/stats/grouping.py Thu May 28 15:18:49 2009 -0400 +++ b/tools/stats/grouping.py Fri May 29 11:07:18 2009 -0400 @@ -149,9 +149,15 @@ rout = eval( rfunc )( rout ) if op in ['c', 'cuniq']: if op == 'c': - out_str += "\t" + ','.join(rout) + if type(rout) == type([]): + out_str += "\t" + ','.join(rout) + else: + out_str += "\t" + str(rout) else: - out_str += "\t" + ','.join(list(set(rout))) + if type(rout) == type([]): + out_str += "\t" + ','.join(list(set(rout))) + else: + out_str += "\t" + str(rout) else: out_str += "\t" + str(rout)
@@ -211,9 +217,15 @@ rout = eval( rfunc )( rout ) if op in ['c','cuniq']: if op == 'c': - out_str += "\t" + ','.join(rout) + if type(rout) == type([]): + out_str += "\t" + ','.join(rout) + else: + out_str += "\t" + str(rout) else: - out_str += "\t" + ','.join(list(set(rout))) + if type(rout) == type([]): + out_str += "\t" + ','.join(list(set(rout))) + else: + out_str += "\t" + str(rout) else: out_str += "\t" + str( rout ) except: diff -r 7a6f75bf4be5 -r 0fc19c283f78 tools/stats/grouping.xml --- a/tools/stats/grouping.xml Thu May 28 15:18:49 2009 -0400 +++ b/tools/stats/grouping.xml Fri May 29 11:07:18 2009 -0400 @@ -1,4 +1,4 @@ -<tool id="Grouping1" name="Group" version="1.6.0"> +<tool id="Grouping1" name="Group" version="1.7.0"> <description>data by a column and perform aggregate operation on other columns.</description> <command interpreter="python"> grouping.py
galaxy-dev@lists.galaxyproject.org