changeset 3:efda9a4a50e7 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/scatterplot commit 405b0656c97b3971605e09f77cf46ca1f4870346
author devteam
date Sat, 03 Jun 2017 09:29:30 -0400
parents 4f8b9e70fda0
children
files scatterplot.py scatterplot.xml
diffstat 2 files changed, 23 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/scatterplot.py	Thu Sep 15 11:14:37 2016 -0400
+++ b/scatterplot.py	Sat Jun 03 09:29:30 2017 -0400
@@ -1,6 +1,8 @@
 #!/usr/bin/env python
 # Greg Von Kuster
 
+from __future__ import print_function
+
 import sys
 
 from numpy import array
@@ -35,7 +37,7 @@
     invalid_value = ''
     invalid_column = 0
     i = 0
-    for i, line in enumerate( file( in_fname ) ):
+    for i, line in enumerate( open( in_fname ) ):
         valid = True
         line = line.rstrip( '\r\n' )
         if line and not line.startswith( '#' ):
@@ -74,14 +76,14 @@
             r.pdf( out_fname, 8, 8 )
             r.plot( a, type="p", main=title, xlab=xlab, ylab=ylab, col="blue", pch=19 )
             r.dev_off()
-        except Exception, exc:
+        except Exception as exc:
             stop_err( "%s" % str( exc ) )
     else:
         stop_err( "All values in both columns %s and %s are non-numeric or empty." % ( sys.argv[3], sys.argv[4] ) )
 
-    print "Scatter plot on columns %s, %s. " % ( sys.argv[3], sys.argv[4] )
+    print("Scatter plot on columns %s, %s. " % ( sys.argv[3], sys.argv[4] ))
     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 )
+        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 ))
 
 if __name__ == "__main__":
     main()
--- a/scatterplot.xml	Thu Sep 15 11:14:37 2016 -0400
+++ b/scatterplot.xml	Sat Jun 03 09:29:30 2017 -0400
@@ -1,12 +1,20 @@
-<tool id="scatterplot_rpy" name="Scatterplot" version="1.0.2">
+<tool id="scatterplot_rpy" name="Scatterplot" version="1.0.3">
   <description>of two numeric columns</description>
   <requirements>
     <requirement type="package" version="1.9">numpy</requirement>
-    <!-- explicit R requirement is necessary for toolshed package, conda rpy2 comes with R -->
-    <requirement type="package" version="3.2.1">R</requirement>
-    <requirement type="package" version="2.7.8">rpy2</requirement>
+    <requirement type="package" version="2.8.5">rpy2</requirement>
   </requirements>
-  <command interpreter="python">scatterplot.py $input $out_file1 $col1 $col2 "$title" "$xlab" "$ylab"</command>
+  <command><![CDATA[
+      python '$__tool_directory__/scatterplot.py'
+        '$input'
+        '$out_file1'
+        $col1
+        $col2
+        '$title'
+        '$xlab'
+        '$ylab'
+  ]]>
+  </command>
   <inputs>
     <param name="input" type="data" format="tabular" label="Dataset" help="Dataset missing? See TIP below"/>
     <param name="col1" type="data_column" data_ref="input" numerical="True" label="Numerical column for x axis" />
@@ -29,7 +37,7 @@
       <output name="out_file1" file="scatterplot_out1.pdf" compare="sim_size" />
     </test>
   </tests>
-  <help>
+  <help><![CDATA[
 .. class:: infomark
 
 **TIP:** If your data is not TAB delimited, use *Text Manipulation-&gt;Convert*
@@ -65,5 +73,8 @@
 - Create a simple scatterplot between the variables in column 2 and column 3 of the above dataset.
 
 .. image:: scatterplot.png
+]]>
 </help>
+<citations>
+</citations>
 </tool>