# HG changeset patch # User devteam # Date 1473932211 14400 # Node ID 1dacc8aeb4526d75cd8fa3b17b685c8950a8a476 # Parent 53eb2c4127830e5c766289e24846c3c8505ec776 planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/scatterplot commit 93df3895fbf2fa44ff279303093fb89b79081687 diff -r 53eb2c412783 -r 1dacc8aeb452 scatterplot.py --- a/scatterplot.py Fri Dec 18 19:14:12 2015 -0500 +++ b/scatterplot.py Thu Sep 15 05:36:51 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 53eb2c412783 -r 1dacc8aeb452 scatterplot.xml --- a/scatterplot.xml Fri Dec 18 19:14:12 2015 -0500 +++ b/scatterplot.xml Thu Sep 15 05:36:51 2016 -0400 @@ -1,8 +1,10 @@ - + of two numeric columns numpy - rpy + + R + rpy2 scatterplot.py $input $out_file1 $col1 $col2 "$title" "$xlab" "$ylab" @@ -16,8 +18,6 @@ - .. class:: infomark diff -r 53eb2c412783 -r 1dacc8aeb452 tool_dependencies.xml --- a/tool_dependencies.xml Fri Dec 18 19:14:12 2015 -0500 +++ b/tool_dependencies.xml Thu Sep 15 05:36:51 2016 -0400 @@ -1,9 +1,12 @@ - + - - + + + + +