# HG changeset patch # User mvdbeek # Date 1473871376 14400 # Node ID b4102b1634885f919b00744d09777aae0ec18212 # Parent 11627baf830ef793858277a2169ca5fadb0349d2 planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/scatterplot commit 1b68ca3d083c5879e996a9df5e22963dfc9c3f90-dirty diff -r 11627baf830e -r b4102b163488 scatterplot.py --- a/scatterplot.py Wed Sep 14 12:40:20 2016 -0400 +++ b/scatterplot.py Wed Sep 14 12:42:56 2016 -0400 @@ -4,7 +4,12 @@ import sys from numpy import array -from rpy import r +import rpy2.rpy_classic as rpy +from rpy2.robjects.numpy2ri import numpy2ri + + +rpy.set_default_mode(rpy.NO_CONVERSION) +r = rpy.r def stop_err(msg): @@ -65,8 +70,9 @@ if skipped_lines < i: try: + a = numpy2ri(array( matrix )) r.pdf( out_fname, 8, 8 ) - r.plot( array( matrix ), type="p", main=title, xlab=xlab, ylab=ylab, col="blue", pch=19 ) + r.plot( a, type="p", main=title, xlab=xlab, ylab=ylab, col="blue", pch=19 ) r.dev_off() except Exception, exc: stop_err( "%s" % str( exc ) ) @@ -77,7 +83,5 @@ if skipped_lines > 0: print "Skipped %d lines starting with line #%d, value '%s' in column %d is not numeric." % ( skipped_lines, first_invalid_line, invalid_value, invalid_column ) - r.quit( save="no" ) - if __name__ == "__main__": main() diff -r 11627baf830e -r b4102b163488 scatterplot.xml --- a/scatterplot.xml Wed Sep 14 12:40:20 2016 -0400 +++ b/scatterplot.xml Wed Sep 14 12:42:56 2016 -0400 @@ -1,8 +1,8 @@ - + of two numeric columns numpy - rpy + rpy2 scatterplot.py $input $out_file1 $col1 $col2 "$title" "$xlab" "$ylab" @@ -16,8 +16,6 @@ - .. class:: infomark diff -r 11627baf830e -r b4102b163488 tool_dependencies.xml --- a/tool_dependencies.xml Wed Sep 14 12:40:20 2016 -0400 +++ b/tool_dependencies.xml Wed Sep 14 12:42:56 2016 -0400 @@ -3,7 +3,7 @@ - - + +