# HG changeset patch
# User devteam
# Date 1450484052 18000
# Node ID 53eb2c4127830e5c766289e24846c3c8505ec776
# Parent 4afd683921874bab859d4253b1115e61194cda8f
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/scatterplot commit de7140295cce07e1bc1697e51dab4271c8d7a8a6
diff -r 4afd68392187 -r 53eb2c412783 scatterplot.py
--- a/scatterplot.py Tue Oct 13 12:31:01 2015 -0400
+++ b/scatterplot.py Fri Dec 18 19:14:12 2015 -0500
@@ -1,13 +1,17 @@
#!/usr/bin/env python
-#Greg Von Kuster
+# Greg Von Kuster
import sys
-from rpy import *
+
+from numpy import array
+from rpy import r
+
def stop_err(msg):
sys.stderr.write(msg)
sys.exit()
+
def main():
in_fname = sys.argv[1]
@@ -29,13 +33,13 @@
for i, line in enumerate( file( in_fname ) ):
valid = True
line = line.rstrip( '\r\n' )
- if line and not line.startswith( '#' ):
+ if line and not line.startswith( '#' ):
row = []
fields = line.split( "\t" )
for column in columns:
try:
val = fields[column]
- if val.lower() == "na":
+ if val.lower() == "na":
row.append( float( "nan" ) )
else:
row.append( float( fields[column] ) )
@@ -54,7 +58,7 @@
valid = False
skipped_lines += 1
if not first_invalid_line:
- first_invalid_line = i+1
+ first_invalid_line = i + 1
if valid:
matrix.append( row )
@@ -65,7 +69,7 @@
r.plot( array( matrix ), type="p", main=title, xlab=xlab, ylab=ylab, col="blue", pch=19 )
r.dev_off()
except Exception, exc:
- stop_err( "%s" %str( 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] ) )
diff -r 4afd68392187 -r 53eb2c412783 scatterplot.xml
--- a/scatterplot.xml Tue Oct 13 12:31:01 2015 -0400
+++ b/scatterplot.xml Fri Dec 18 19:14:12 2015 -0500
@@ -1,71 +1,70 @@
-
- of two numeric columns
-
- rpy
-
- scatterplot.py $input $out_file1 $col1 $col2 "$title" "$xlab" "$ylab"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-.. class:: infomark
-
-**TIP:** If your data is not TAB delimited, use *Text Manipulation->Convert*
-
------
-
-**Syntax**
-
-This tool creates a simple scatter plot between two variables containing numeric values of a selected dataset.
-
-- All invalid, blank and comment lines in the dataset are skipped. The number of skipped lines is displayed in the resulting history item.
-
-- **Plot title** The scatterplot title
-- **Label for x axis** and **Label for y axis** The labels for x and y axis of the scatterplot.
-
------
-
-**Example**
-
-- Input file::
-
- 1 68 4.1
- 2 71 4.6
- 3 62 3.8
- 4 75 4.4
- 5 58 3.2
- 6 60 3.1
- 7 67 3.8
- 8 68 4.1
- 9 71 4.3
- 10 69 3.7
-
-- Create a simple scatterplot between the variables in column 2 and column 3 of the above dataset.
-
-.. image:: scatterplot.png
-
-
-
+
+ of two numeric columns
+
+ numpy
+ rpy
+
+ scatterplot.py $input $out_file1 $col1 $col2 "$title" "$xlab" "$ylab"
+
+
+
+
+
+
+
+
+
+
+
+
+
+.. class:: infomark
+
+**TIP:** If your data is not TAB delimited, use *Text Manipulation->Convert*
+
+-----
+
+**Syntax**
+
+This tool creates a simple scatter plot between two variables containing numeric values of a selected dataset.
+
+- All invalid, blank and comment lines in the dataset are skipped. The number of skipped lines is displayed in the resulting history item.
+
+- **Plot title** The scatterplot title
+- **Label for x axis** and **Label for y axis** The labels for x and y axis of the scatterplot.
+
+-----
+
+**Example**
+
+- Input file::
+
+ 1 68 4.1
+ 2 71 4.6
+ 3 62 3.8
+ 4 75 4.4
+ 5 58 3.2
+ 6 60 3.1
+ 7 67 3.8
+ 8 68 4.1
+ 9 71 4.3
+ 10 69 3.7
+
+- Create a simple scatterplot between the variables in column 2 and column 3 of the above dataset.
+
+.. image:: scatterplot.png
+
+
diff -r 4afd68392187 -r 53eb2c412783 tool_dependencies.xml
--- a/tool_dependencies.xml Tue Oct 13 12:31:01 2015 -0400
+++ b/tool_dependencies.xml Fri Dec 18 19:14:12 2015 -0500
@@ -1,6 +1,9 @@
-
-
+
+
+
+
+