changeset 0:9bc0c48a027f draft default tip

Imported from capsule None
author devteam
date Mon, 19 May 2014 12:34:48 -0400
parents
children
files cca.py cca.xml test-data/1.tabular test-data/cca_out1.tabular test-data/cca_out2.pdf test-data/iris.tabular tool_dependencies.xml
diffstat 7 files changed, 1308 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cca.py	Mon May 19 12:34:48 2014 -0400
@@ -0,0 +1,158 @@
+#!/usr/bin/env python
+
+import sys, string
+from rpy import *
+import numpy
+
+def stop_err(msg):
+    sys.stderr.write(msg)
+    sys.exit()
+
+infile = sys.argv[1]
+x_cols = sys.argv[2].split(',')
+y_cols = sys.argv[3].split(',')
+
+x_scale = x_center = "FALSE"
+if sys.argv[4] == 'both':
+    x_scale = x_center = "TRUE"
+elif sys.argv[4] == 'center':
+    x_center = "TRUE"
+elif sys.argv[4] == 'scale':
+    x_scale = "TRUE"
+    
+y_scale = y_center = "FALSE"
+if sys.argv[5] == 'both':
+    y_scale = y_center = "TRUE"
+elif sys.argv[5] == 'center':
+    y_center = "TRUE"
+elif sys.argv[5] == 'scale':
+    y_scale = "TRUE"
+
+std_scores = "FALSE"   
+if sys.argv[6] == "yes":
+    std_scores = "TRUE"
+    
+outfile = sys.argv[7]
+outfile2 = sys.argv[8]
+
+fout = open(outfile,'w')
+elems = []
+for i, line in enumerate( file ( infile )):
+    line = line.rstrip('\r\n')
+    if len( line )>0 and not line.startswith( '#' ):
+        elems = line.split( '\t' )
+        break 
+    if i == 30:
+        break # Hopefully we'll never get here...
+
+if len( elems )<1:
+    stop_err( "The data in your input dataset is either missing or not formatted properly." )
+
+x_vals = []
+
+for k,col in enumerate(x_cols):
+    x_cols[k] = int(col)-1
+    x_vals.append([])
+
+y_vals = []
+
+for k,col in enumerate(y_cols):
+    y_cols[k] = int(col)-1
+    y_vals.append([])
+
+skipped = 0
+for ind,line in enumerate( file( infile )):
+    if line and not line.startswith( '#' ):
+        try:
+            fields = line.strip().split("\t")
+            valid_line = True
+            for col in x_cols+y_cols:
+                try:
+                    assert float(fields[col])
+                except:
+                    skipped += 1
+                    valid_line = False
+                    break
+            if valid_line:
+                for k,col in enumerate(x_cols):
+                    try:
+                        xval = float(fields[col])
+                    except:
+                        xval = NaN#
+                    x_vals[k].append(xval)
+                for k,col in enumerate(y_cols):
+                    try:
+                        yval = float(fields[col])
+                    except:
+                        yval = NaN#
+                    y_vals[k].append(yval)
+        except:
+            skipped += 1
+
+x_vals1 = numpy.asarray(x_vals).transpose()
+y_vals1 = numpy.asarray(y_vals).transpose()
+
+x_dat= r.list(array(x_vals1))
+y_dat= r.list(array(y_vals1))
+
+try:
+    r.suppressWarnings(r.library("yacca"))
+except:
+    stop_err("Missing R library yacca.")
+    
+set_default_mode(NO_CONVERSION)
+try:
+    xcolnames = ["c%d" %(el+1) for el in x_cols]
+    ycolnames = ["c%d" %(el+1) for el in y_cols]
+    cc = r.cca(x=x_dat, y=y_dat, xlab=xcolnames, ylab=ycolnames, xcenter=r(x_center), ycenter=r(y_center), xscale=r(x_scale), yscale=r(y_scale), standardize_scores=r(std_scores))
+    ftest = r.F_test_cca(cc)
+except RException, rex:
+    stop_err("Encountered error while performing CCA on the input data: %s" %(rex))
+
+set_default_mode(BASIC_CONVERSION)
+summary = r.summary(cc)
+
+ncomps = len(summary['corr'])
+comps = summary['corr'].keys()
+corr = summary['corr'].values()
+xlab = summary['xlab']
+ylab = summary['ylab']
+
+for i in range(ncomps):
+    corr[comps.index('CV %s' %(i+1))] = summary['corr'].values()[i]
+
+ftest=ftest.as_py()
+print >>fout, "#Component\t%s" %("\t".join(["%s" % el for el in range(1,ncomps+1)]))
+print >>fout, "#Correlation\t%s" %("\t".join(["%.4g" % el for el in corr]))
+print >>fout, "#F-statistic\t%s" %("\t".join(["%.4g" % el for el in ftest['statistic']]))
+print >>fout, "#p-value\t%s" %("\t".join(["%.4g" % el for el in ftest['p.value']]))
+
+print >>fout, "#X-Coefficients\t%s" %("\t".join(["%s" % el for el in range(1,ncomps+1)]))
+for i,val in enumerate(summary['xcoef']):
+    print >>fout, "%s\t%s" %(xlab[i], "\t".join(["%.4g" % el for el in val]))
+
+print >>fout, "#Y-Coefficients\t%s" %("\t".join(["%s" % el for el in range(1,ncomps+1)]))
+for i,val in enumerate(summary['ycoef']):
+    print >>fout, "%s\t%s" %(ylab[i], "\t".join(["%.4g" % el for el in val]))
+       
+print >>fout, "#X-Loadings\t%s" %("\t".join(["%s" % el for el in range(1,ncomps+1)]))
+for i,val in enumerate(summary['xstructcorr']):
+    print >>fout, "%s\t%s" %(xlab[i], "\t".join(["%.4g" % el for el in val]))
+
+print >>fout, "#Y-Loadings\t%s" %("\t".join(["%s" % el for el in range(1,ncomps+1)]))
+for i,val in enumerate(summary['ystructcorr']):
+    print >>fout, "%s\t%s" %(ylab[i], "\t".join(["%.4g" % el for el in val]))
+
+print >>fout, "#X-CrossLoadings\t%s" %("\t".join(["%s" % el for el in range(1,ncomps+1)]))
+for i,val in enumerate(summary['xcrosscorr']):
+    print >>fout, "%s\t%s" %(xlab[i], "\t".join(["%.4g" % el for el in val]))
+
+print >>fout, "#Y-CrossLoadings\t%s" %("\t".join(["%s" % el for el in range(1,ncomps+1)]))
+for i,val in enumerate(summary['ycrosscorr']):
+    print >>fout, "%s\t%s" %(ylab[i], "\t".join(["%.4g" % el for el in val]))
+
+r.pdf( outfile2, 8, 8 )
+#r.plot(cc)
+for i in range(ncomps):
+    r.helio_plot(cc, cv = i+1, main = r.paste("Explained Variance for CV",i+1), type = "variance")
+r.dev_off()
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cca.xml	Mon May 19 12:34:48 2014 -0400
@@ -0,0 +1,98 @@
+<tool id="cca1" name="Canonical Correlation Analysis" version="1.0.0">
+  <description> </description>
+  <requirements>
+    <requirement type="package" version="2.11.0">R</requirement>
+    <requirement type="package" version="1.7.1">numpy</requirement>
+    <requirement type="package" version="1.0">yacca</requirement>
+    <requirement type="package" version="1.0.3">rpy</requirement>
+  </requirements>
+  <command interpreter="python">
+    cca.py 
+      $input1
+      $x_cols
+      $y_cols
+      $x_scale
+      $y_scale
+      $std_scores
+      $out_file1
+      $out_file2
+  </command>
+  <inputs>
+    <param format="tabular" name="input1" type="data" label="Select data" help="Dataset missing? See TIP below."/>
+    <param name="x_cols" label="Select columns containing X variables " type="data_column" data_ref="input1" numerical="True" multiple="true" >
+        <validator type="no_options" message="Please select at least one column."/>
+    </param>
+    <param name="y_cols" label="Select columns containing Y variables " type="data_column" data_ref="input1" numerical="True" multiple="true" >
+        <validator type="no_options" message="Please select at least one column."/>
+    </param>
+    <param name="x_scale" type="select" label="Type of Scaling for X variables" help="Can be used to center and/or scale variables">
+        <option value="none" selected="true">None</option>
+        <option value="center">Center only</option>
+        <option value="scale">Scale only</option>
+        <option value="both">Center and Scale</option>
+    </param>
+    <param name="y_scale" type="select" label="Type of Scaling for Y variables" help="Can be used to center and/or scale variables">
+        <option value="none" selected="true">None</option>
+        <option value="center">Center only</option>
+        <option value="scale">Scale only</option>
+        <option value="both">Center and Scale</option>
+    </param>
+    <param name="std_scores" type="select" label="Report standardized scores?" help="Selecting 'Yes' will rescale scores (and coefficients) to produce scores of unit variance">
+        <option value="no" selected="true">No</option>
+        <option value="yes">Yes</option>
+    </param>
+  </inputs>
+  <outputs>
+    <data format="input" name="out_file1" metadata_source="input1" />
+    <data format="pdf" name="out_file2" />
+  </outputs>
+  <tests>
+    <test>
+        <param name="input1" value="iris.tabular"/>
+        <param name="x_cols" value="3,4"/>
+        <param name="y_cols" value="1,2"/>
+        <param name="x_scale" value="both"/>
+        <param name="y_scale" value="scale"/>
+        <param name="std_scores" value="yes"/>
+        <output name="out_file1" file="cca_out1.tabular"/>
+        <output name="out_file2" file="cca_out2.pdf"/>
+    </test>
+  </tests>
+  <help>
+
+
+.. class:: infomark
+
+**TIP:** If your data is not TAB delimited, use *Edit Datasets-&gt;Convert characters*
+
+-----
+
+.. class:: infomark
+
+**What it does**
+
+This tool uses functions from 'yacca' library from R statistical package to perform Canonical Correlation Analysis (CCA) on the input data. It outputs two files, one containing the summary statistics of the performed CCA, and the other containing helioplots, which display structural loadings of X and Y variables on different canonical components.   
+
+*Carter T. Butts (2009). yacca: Yet Another Canonical Correlation Analysis Package. R package version 1.1.*
+
+-----
+
+.. class:: warningmark
+
+**Note**
+
+- This tool currently treats all predictor and response variables as continuous numeric variables. Running the tool on categorical variables might result in incorrect results.
+
+- Rows containing non-numeric (or missing) data in any of the chosen columns will be skipped from the analysis.
+
+- The summary statistics in the output are described below:
+
+  - correlation: Canonical correlation between the canonical variates (i.e. transformed variables)
+  - F-statistic: F-value obtained from F Test for Canonical Correlations Using Rao's Approximation
+  - p-value: denotes significance of canonical correlations
+  - Coefficients: represent the coefficients of X and Y variables on each canonical variate
+  - Loadings: represent the correlations between the original variables in each set and their respective canonical variates 
+  - CrossLoadings: represent the correlations between the original variables in each set and the opposite canonical variates 
+  
+  </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/1.tabular	Mon May 19 12:34:48 2014 -0400
@@ -0,0 +1,6 @@
+chr22	1000	NM_17
+chr22	2000	NM_18
+chr10	2200	NM_10
+chr10	hap	test
+chr10	1200	NM_11
+chr22	1600	NM_19
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/cca_out1.tabular	Mon May 19 12:34:48 2014 -0400
@@ -0,0 +1,22 @@
+#Component	1	2
+#Correlation	0.9409	0.1311
+#F-statistic	144.4	2.57
+#p-value	6.213e-68	0.1111
+#X-Coefficients	1	2
+c3	1.507	-3.378
+c4	-0.5372	3.659
+#Y-Coefficients	1	2
+c1	6.35	3.379
+c2	-2.66	6.67
+#X-Loadings	1	2
+c3	0.9894	0.1452
+c4	0.9133	0.4073
+#Y-Loadings	1	2
+c1	0.9289	0.3704
+c2	-0.4698	0.8828
+#X-CrossLoadings	1	2
+c3	0.9309	0.01904
+c4	0.8593	0.05339
+#Y-CrossLoadings	1	2
+c1	0.874	0.04855
+c2	-0.442	0.1157
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/cca_out2.pdf	Mon May 19 12:34:48 2014 -0400
@@ -0,0 +1,858 @@
+%PDF-1.4
+%ρ\r
+1 0 obj
+<<
+/CreationDate (D:20110308102929)
+/ModDate (D:20110308102929)
+/Title (R Graphics Output)
+/Producer (R 2.11.0)
+/Creator (R)
+>>
+endobj
+2 0 obj
+<<
+/Type /Catalog
+/Pages 3 0 R
+>>
+endobj
+5 0 obj
+<<
+/Type /Page
+/Parent 3 0 R
+/Contents 6 0 R
+/Resources 4 0 R
+>>
+endobj
+6 0 obj
+<<
+/Length 7 0 R
+>>
+stream
+1 J 1 j q
+Q q 59.04 73.44 486.72 443.52 re W n
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+302.40 110.40 m
+302.40 480.00 l
+S
+302.40 356.80 m
+306.64 356.68 l
+310.87 356.31 l
+315.07 355.71 l
+319.21 354.86 l
+323.29 353.79 l
+327.29 352.47 l
+331.18 350.94 l
+334.97 349.18 l
+338.62 347.21 l
+342.13 345.04 l
+345.49 342.66 l
+348.68 340.10 l
+351.68 337.37 l
+354.49 334.47 l
+357.09 331.41 l
+359.48 328.21 l
+361.64 324.88 l
+363.57 321.43 l
+365.25 317.88 l
+366.69 314.24 l
+367.88 310.52 l
+368.80 306.74 l
+369.47 302.92 l
+369.87 299.07 l
+370.00 295.20 l
+369.87 291.33 l
+369.47 287.48 l
+368.80 283.66 l
+367.88 279.88 l
+366.69 276.16 l
+365.25 272.52 l
+363.57 268.97 l
+361.64 265.52 l
+359.48 262.19 l
+357.09 258.99 l
+354.49 255.93 l
+351.68 253.03 l
+348.68 250.30 l
+345.49 247.74 l
+342.13 245.36 l
+338.62 243.19 l
+334.97 241.22 l
+331.18 239.46 l
+327.29 237.93 l
+323.29 236.61 l
+319.21 235.54 l
+315.07 234.69 l
+310.87 234.09 l
+306.64 233.72 l
+302.40 233.60 l
+298.16 233.72 l
+293.93 234.09 l
+289.73 234.69 l
+285.59 235.54 l
+281.51 236.61 l
+277.51 237.93 l
+273.62 239.46 l
+269.83 241.22 l
+266.18 243.19 l
+262.67 245.36 l
+259.31 247.74 l
+256.12 250.30 l
+253.12 253.03 l
+250.31 255.93 l
+247.71 258.99 l
+245.32 262.19 l
+243.16 265.52 l
+241.23 268.97 l
+239.55 272.52 l
+238.11 276.16 l
+236.92 279.88 l
+236.00 283.66 l
+235.33 287.48 l
+234.93 291.33 l
+234.80 295.20 l
+234.93 299.07 l
+235.33 302.92 l
+236.00 306.74 l
+236.92 310.52 l
+238.11 314.24 l
+239.55 317.88 l
+241.23 321.43 l
+243.16 324.88 l
+245.32 328.21 l
+247.71 331.41 l
+250.31 334.47 l
+253.12 337.37 l
+256.12 340.10 l
+259.31 342.66 l
+262.67 345.04 l
+266.18 347.21 l
+269.83 349.18 l
+273.62 350.94 l
+277.51 352.47 l
+281.51 353.79 l
+285.59 354.86 l
+289.73 355.71 l
+293.93 356.31 l
+298.16 356.68 l
+302.40 356.80 l
+S
+0.75 w
+[ 0.00 4.00] 0 d
+302.40 315.73 m
+303.81 315.69 l
+305.22 315.57 l
+306.62 315.37 l
+308.00 315.09 l
+309.36 314.73 l
+310.70 314.29 l
+311.99 313.78 l
+313.26 313.19 l
+314.47 312.54 l
+315.64 311.81 l
+316.76 311.02 l
+317.83 310.17 l
+318.83 309.26 l
+319.76 308.29 l
+320.63 307.27 l
+321.43 306.20 l
+322.15 305.09 l
+322.79 303.94 l
+323.35 302.76 l
+323.83 301.55 l
+324.23 300.31 l
+324.53 299.05 l
+324.76 297.77 l
+324.89 296.49 l
+324.93 295.20 l
+324.89 293.91 l
+324.76 292.63 l
+324.53 291.35 l
+324.23 290.09 l
+323.83 288.85 l
+323.35 287.64 l
+322.79 286.46 l
+322.15 285.31 l
+321.43 284.20 l
+320.63 283.13 l
+319.76 282.11 l
+318.83 281.14 l
+317.83 280.23 l
+316.76 279.38 l
+315.64 278.59 l
+314.47 277.86 l
+313.26 277.21 l
+311.99 276.62 l
+310.70 276.11 l
+309.36 275.67 l
+308.00 275.31 l
+306.62 275.03 l
+305.22 274.83 l
+303.81 274.71 l
+302.40 274.67 l
+300.99 274.71 l
+299.58 274.83 l
+298.18 275.03 l
+296.80 275.31 l
+295.44 275.67 l
+294.10 276.11 l
+292.81 276.62 l
+291.54 277.21 l
+290.33 277.86 l
+289.16 278.59 l
+288.04 279.38 l
+286.97 280.23 l
+285.97 281.14 l
+285.04 282.11 l
+284.17 283.13 l
+283.37 284.20 l
+282.65 285.31 l
+282.01 286.46 l
+281.45 287.64 l
+280.97 288.85 l
+280.57 290.09 l
+280.27 291.35 l
+280.04 292.63 l
+279.91 293.91 l
+279.87 295.20 l
+279.91 296.49 l
+280.04 297.77 l
+280.27 299.05 l
+280.57 300.31 l
+280.97 301.55 l
+281.45 302.76 l
+282.01 303.94 l
+282.65 305.09 l
+283.37 306.20 l
+284.17 307.27 l
+285.04 308.29 l
+285.97 309.26 l
+286.97 310.17 l
+288.04 311.02 l
+289.16 311.81 l
+290.33 312.54 l
+291.54 313.19 l
+292.81 313.78 l
+294.10 314.29 l
+295.44 314.73 l
+296.80 315.09 l
+298.18 315.37 l
+299.58 315.57 l
+300.99 315.69 l
+302.40 315.73 l
+S
+302.40 397.87 m
+309.47 397.66 l
+316.52 397.06 l
+323.51 396.05 l
+330.42 394.64 l
+337.22 392.84 l
+343.88 390.66 l
+350.37 388.10 l
+356.68 385.17 l
+362.77 381.88 l
+368.62 378.26 l
+374.22 374.31 l
+379.53 370.04 l
+384.53 365.48 l
+389.21 360.64 l
+393.55 355.55 l
+397.53 350.21 l
+401.13 344.66 l
+404.34 338.91 l
+407.15 332.99 l
+409.55 326.93 l
+411.53 320.73 l
+413.07 314.44 l
+414.18 308.07 l
+414.84 301.65 l
+415.07 295.20 l
+414.84 288.75 l
+414.18 282.33 l
+413.07 275.96 l
+411.53 269.67 l
+409.55 263.47 l
+407.15 257.41 l
+404.34 251.49 l
+401.13 245.74 l
+397.53 240.19 l
+393.55 234.85 l
+389.21 229.76 l
+384.53 224.92 l
+379.53 220.36 l
+374.22 216.09 l
+368.62 212.14 l
+362.77 208.52 l
+356.68 205.23 l
+350.37 202.30 l
+343.88 199.74 l
+337.22 197.56 l
+330.42 195.76 l
+323.51 194.35 l
+316.52 193.34 l
+309.47 192.74 l
+302.40 192.53 l
+295.33 192.74 l
+288.28 193.34 l
+281.29 194.35 l
+274.38 195.76 l
+267.58 197.56 l
+260.92 199.74 l
+254.43 202.30 l
+248.12 205.23 l
+242.03 208.52 l
+236.18 212.14 l
+230.58 216.09 l
+225.27 220.36 l
+220.27 224.92 l
+215.59 229.76 l
+211.25 234.85 l
+207.27 240.19 l
+203.67 245.74 l
+200.46 251.49 l
+197.65 257.41 l
+195.25 263.47 l
+193.27 269.67 l
+191.73 275.96 l
+190.62 282.33 l
+189.96 288.75 l
+189.73 295.20 l
+189.96 301.65 l
+190.62 308.07 l
+191.73 314.44 l
+193.27 320.73 l
+195.25 326.93 l
+197.65 332.99 l
+200.46 338.91 l
+203.67 344.66 l
+207.27 350.21 l
+211.25 355.55 l
+215.59 360.64 l
+220.27 365.48 l
+225.27 370.04 l
+230.58 374.31 l
+236.18 378.26 l
+242.03 381.88 l
+248.12 385.17 l
+254.43 388.10 l
+260.92 390.66 l
+267.58 392.84 l
+274.38 394.64 l
+281.29 396.05 l
+288.28 397.06 l
+295.33 397.66 l
+302.40 397.87 l
+S
+BT
+0.000 0.000 0.000 rg
+/F2 1 Tf 18.00 0.00 -0.00 18.00 144.39 483.94 Tm [(X V) 70 (ar) -15 (iab) 20 (les)] TJ
+ET
+BT
+/F2 1 Tf 18.00 0.00 -0.00 18.00 369.72 483.94 Tm [(Y V) 70 (ar) -15 (iab) 20 (les)] TJ
+ET
+0.75 w
+[] 0 d
+  239.55 319.19 m
+  201.34 339.30 l
+  209.96 352.91 l
+  248.17 332.81 l
+b
+BT
+/F2 1 Tf 10.39 -6.00 6.00 10.39 175.46 355.52 Tm (c3) Tj
+ET
+  248.17 257.59 m
+  215.62 240.47 l
+  206.99 254.08 l
+  239.55 271.21 l
+b
+BT
+/F2 1 Tf 10.39 6.00 -6.00 10.39 178.33 229.91 Tm (c4) Tj
+ET
+  356.63 332.81 m
+  390.31 350.52 l
+  398.93 336.91 l
+  365.25 319.19 l
+b
+BT
+/F2 1 Tf 10.39 6.00 -6.00 10.39 418.37 349.18 Tm (c1) Tj
+ET
+  365.25 271.21 m
+  373.87 266.67 l
+  365.24 253.06 l
+  356.63 257.59 l
+b
+BT
+/F2 1 Tf 10.39 -6.00 6.00 10.39 415.49 236.25 Tm (c2) Tj
+ET
+Q q
+BT
+0.000 0.000 0.000 rg
+/F3 1 Tf 14.00 0.00 -0.00 14.00 209.98 541.45 Tm [(Explained V) 60 (ariance f) 20 (or CV 1)] TJ
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 252.04 4.32 Tm [(Canonical V) 70 (ar) -15 (iate1)] TJ
+ET
+Q
+endstream
+endobj
+7 0 obj
+6000
+endobj
+8 0 obj
+<<
+/Type /Page
+/Parent 3 0 R
+/Contents 9 0 R
+/Resources 4 0 R
+>>
+endobj
+9 0 obj
+<<
+/Length 10 0 R
+>>
+stream
+1 J 1 j q
+Q q 59.04 73.44 486.72 443.52 re W n
+Q q 59.04 73.44 486.72 443.52 re W n
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+302.40 110.40 m
+302.40 480.00 l
+S
+302.40 356.80 m
+306.64 356.68 l
+310.87 356.31 l
+315.07 355.71 l
+319.21 354.86 l
+323.29 353.79 l
+327.29 352.47 l
+331.18 350.94 l
+334.97 349.18 l
+338.62 347.21 l
+342.13 345.04 l
+345.49 342.66 l
+348.68 340.10 l
+351.68 337.37 l
+354.49 334.47 l
+357.09 331.41 l
+359.48 328.21 l
+361.64 324.88 l
+363.57 321.43 l
+365.25 317.88 l
+366.69 314.24 l
+367.88 310.52 l
+368.80 306.74 l
+369.47 302.92 l
+369.87 299.07 l
+370.00 295.20 l
+369.87 291.33 l
+369.47 287.48 l
+368.80 283.66 l
+367.88 279.88 l
+366.69 276.16 l
+365.25 272.52 l
+363.57 268.97 l
+361.64 265.52 l
+359.48 262.19 l
+357.09 258.99 l
+354.49 255.93 l
+351.68 253.03 l
+348.68 250.30 l
+345.49 247.74 l
+342.13 245.36 l
+338.62 243.19 l
+334.97 241.22 l
+331.18 239.46 l
+327.29 237.93 l
+323.29 236.61 l
+319.21 235.54 l
+315.07 234.69 l
+310.87 234.09 l
+306.64 233.72 l
+302.40 233.60 l
+298.16 233.72 l
+293.93 234.09 l
+289.73 234.69 l
+285.59 235.54 l
+281.51 236.61 l
+277.51 237.93 l
+273.62 239.46 l
+269.83 241.22 l
+266.18 243.19 l
+262.67 245.36 l
+259.31 247.74 l
+256.12 250.30 l
+253.12 253.03 l
+250.31 255.93 l
+247.71 258.99 l
+245.32 262.19 l
+243.16 265.52 l
+241.23 268.97 l
+239.55 272.52 l
+238.11 276.16 l
+236.92 279.88 l
+236.00 283.66 l
+235.33 287.48 l
+234.93 291.33 l
+234.80 295.20 l
+234.93 299.07 l
+235.33 302.92 l
+236.00 306.74 l
+236.92 310.52 l
+238.11 314.24 l
+239.55 317.88 l
+241.23 321.43 l
+243.16 324.88 l
+245.32 328.21 l
+247.71 331.41 l
+250.31 334.47 l
+253.12 337.37 l
+256.12 340.10 l
+259.31 342.66 l
+262.67 345.04 l
+266.18 347.21 l
+269.83 349.18 l
+273.62 350.94 l
+277.51 352.47 l
+281.51 353.79 l
+285.59 354.86 l
+289.73 355.71 l
+293.93 356.31 l
+298.16 356.68 l
+302.40 356.80 l
+S
+0.75 w
+[ 0.00 4.00] 0 d
+302.40 315.73 m
+303.81 315.69 l
+305.22 315.57 l
+306.62 315.37 l
+308.00 315.09 l
+309.36 314.73 l
+310.70 314.29 l
+311.99 313.78 l
+313.26 313.19 l
+314.47 312.54 l
+315.64 311.81 l
+316.76 311.02 l
+317.83 310.17 l
+318.83 309.26 l
+319.76 308.29 l
+320.63 307.27 l
+321.43 306.20 l
+322.15 305.09 l
+322.79 303.94 l
+323.35 302.76 l
+323.83 301.55 l
+324.23 300.31 l
+324.53 299.05 l
+324.76 297.77 l
+324.89 296.49 l
+324.93 295.20 l
+324.89 293.91 l
+324.76 292.63 l
+324.53 291.35 l
+324.23 290.09 l
+323.83 288.85 l
+323.35 287.64 l
+322.79 286.46 l
+322.15 285.31 l
+321.43 284.20 l
+320.63 283.13 l
+319.76 282.11 l
+318.83 281.14 l
+317.83 280.23 l
+316.76 279.38 l
+315.64 278.59 l
+314.47 277.86 l
+313.26 277.21 l
+311.99 276.62 l
+310.70 276.11 l
+309.36 275.67 l
+308.00 275.31 l
+306.62 275.03 l
+305.22 274.83 l
+303.81 274.71 l
+302.40 274.67 l
+300.99 274.71 l
+299.58 274.83 l
+298.18 275.03 l
+296.80 275.31 l
+295.44 275.67 l
+294.10 276.11 l
+292.81 276.62 l
+291.54 277.21 l
+290.33 277.86 l
+289.16 278.59 l
+288.04 279.38 l
+286.97 280.23 l
+285.97 281.14 l
+285.04 282.11 l
+284.17 283.13 l
+283.37 284.20 l
+282.65 285.31 l
+282.01 286.46 l
+281.45 287.64 l
+280.97 288.85 l
+280.57 290.09 l
+280.27 291.35 l
+280.04 292.63 l
+279.91 293.91 l
+279.87 295.20 l
+279.91 296.49 l
+280.04 297.77 l
+280.27 299.05 l
+280.57 300.31 l
+280.97 301.55 l
+281.45 302.76 l
+282.01 303.94 l
+282.65 305.09 l
+283.37 306.20 l
+284.17 307.27 l
+285.04 308.29 l
+285.97 309.26 l
+286.97 310.17 l
+288.04 311.02 l
+289.16 311.81 l
+290.33 312.54 l
+291.54 313.19 l
+292.81 313.78 l
+294.10 314.29 l
+295.44 314.73 l
+296.80 315.09 l
+298.18 315.37 l
+299.58 315.57 l
+300.99 315.69 l
+302.40 315.73 l
+S
+302.40 397.87 m
+309.47 397.66 l
+316.52 397.06 l
+323.51 396.05 l
+330.42 394.64 l
+337.22 392.84 l
+343.88 390.66 l
+350.37 388.10 l
+356.68 385.17 l
+362.77 381.88 l
+368.62 378.26 l
+374.22 374.31 l
+379.53 370.04 l
+384.53 365.48 l
+389.21 360.64 l
+393.55 355.55 l
+397.53 350.21 l
+401.13 344.66 l
+404.34 338.91 l
+407.15 332.99 l
+409.55 326.93 l
+411.53 320.73 l
+413.07 314.44 l
+414.18 308.07 l
+414.84 301.65 l
+415.07 295.20 l
+414.84 288.75 l
+414.18 282.33 l
+413.07 275.96 l
+411.53 269.67 l
+409.55 263.47 l
+407.15 257.41 l
+404.34 251.49 l
+401.13 245.74 l
+397.53 240.19 l
+393.55 234.85 l
+389.21 229.76 l
+384.53 224.92 l
+379.53 220.36 l
+374.22 216.09 l
+368.62 212.14 l
+362.77 208.52 l
+356.68 205.23 l
+350.37 202.30 l
+343.88 199.74 l
+337.22 197.56 l
+330.42 195.76 l
+323.51 194.35 l
+316.52 193.34 l
+309.47 192.74 l
+302.40 192.53 l
+295.33 192.74 l
+288.28 193.34 l
+281.29 194.35 l
+274.38 195.76 l
+267.58 197.56 l
+260.92 199.74 l
+254.43 202.30 l
+248.12 205.23 l
+242.03 208.52 l
+236.18 212.14 l
+230.58 216.09 l
+225.27 220.36 l
+220.27 224.92 l
+215.59 229.76 l
+211.25 234.85 l
+207.27 240.19 l
+203.67 245.74 l
+200.46 251.49 l
+197.65 257.41 l
+195.25 263.47 l
+193.27 269.67 l
+191.73 275.96 l
+190.62 282.33 l
+189.96 288.75 l
+189.73 295.20 l
+189.96 301.65 l
+190.62 308.07 l
+191.73 314.44 l
+193.27 320.73 l
+195.25 326.93 l
+197.65 332.99 l
+200.46 338.91 l
+203.67 344.66 l
+207.27 350.21 l
+211.25 355.55 l
+215.59 360.64 l
+220.27 365.48 l
+225.27 370.04 l
+230.58 374.31 l
+236.18 378.26 l
+242.03 381.88 l
+248.12 385.17 l
+254.43 388.10 l
+260.92 390.66 l
+267.58 392.84 l
+274.38 394.64 l
+281.29 396.05 l
+288.28 397.06 l
+295.33 397.66 l
+302.40 397.87 l
+S
+BT
+0.000 0.000 0.000 rg
+/F2 1 Tf 18.00 0.00 -0.00 18.00 144.39 483.94 Tm [(X V) 70 (ar) -15 (iab) 20 (les)] TJ
+ET
+BT
+/F2 1 Tf 18.00 0.00 -0.00 18.00 369.72 483.94 Tm [(Y V) 70 (ar) -15 (iab) 20 (les)] TJ
+ET
+0.75 w
+[] 0 d
+  239.55 319.19 m
+  238.72 319.63 l
+  247.34 333.24 l
+  248.17 332.81 l
+b
+BT
+/F2 1 Tf 10.39 -6.00 6.00 10.39 175.46 355.52 Tm (c3) Tj
+ET
+  248.17 257.59 m
+  241.69 254.19 l
+  233.07 267.80 l
+  239.55 271.21 l
+b
+BT
+/F2 1 Tf 10.39 6.00 -6.00 10.39 178.33 229.91 Tm (c4) Tj
+ET
+  356.63 332.81 m
+  361.99 335.62 l
+  370.61 322.01 l
+  365.25 319.19 l
+b
+BT
+/F2 1 Tf 10.39 6.00 -6.00 10.39 418.37 349.18 Tm (c1) Tj
+ET
+  365.25 271.21 m
+  395.67 255.20 l
+  387.05 241.59 l
+  356.63 257.59 l
+b
+BT
+/F2 1 Tf 10.39 -6.00 6.00 10.39 415.49 236.25 Tm (c2) Tj
+ET
+Q q
+BT
+0.000 0.000 0.000 rg
+/F3 1 Tf 14.00 0.00 -0.00 14.00 209.98 541.45 Tm [(Explained V) 60 (ariance f) 20 (or CV 2)] TJ
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 252.04 4.32 Tm [(Canonical V) 70 (ar) -15 (iate2)] TJ
+ET
+Q
+endstream
+endobj
+10 0 obj
+6037
+endobj
+3 0 obj
+<<
+/Type /Pages
+/Kids [
+5 0 R
+8 0 R
+]
+/Count 2
+/MediaBox [0 0 576 576]
+>>
+endobj
+4 0 obj
+<<
+/ProcSet [/PDF /Text]
+/Font <</F2 12 0 R /F3 13 0 R >>
+/ExtGState << >>
+>>
+endobj
+11 0 obj
+<<
+/Type /Encoding
+/BaseEncoding /WinAnsiEncoding
+/Differences [ 45/minus 96/quoteleft
+144/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent
+/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron /space]
+>>
+endobj
+12 0 obj <<
+/Type /Font
+/Subtype /Type1
+/Name /F2
+/BaseFont /Helvetica
+/Encoding 11 0 R
+>> endobj
+13 0 obj <<
+/Type /Font
+/Subtype /Type1
+/Name /F3
+/BaseFont /Helvetica-Bold
+/Encoding 11 0 R
+>> endobj
+xref
+0 14
+0000000000 65535 f 
+0000000021 00000 n 
+0000000164 00000 n 
+0000012558 00000 n 
+0000012647 00000 n 
+0000000213 00000 n 
+0000000293 00000 n 
+0000006346 00000 n 
+0000006366 00000 n 
+0000006446 00000 n 
+0000012537 00000 n 
+0000012740 00000 n 
+0000012998 00000 n 
+0000013096 00000 n 
+trailer
+<<
+/Size 14
+/Info 1 0 R
+/Root 2 0 R
+>>
+startxref
+13199
+%%EOF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/iris.tabular	Mon May 19 12:34:48 2014 -0400
@@ -0,0 +1,151 @@
+5.1	3.5	1.4	0.2	Iris-setosa
+4.9	3.0	1.4	0.2	Iris-setosa
+4.7	3.2	1.3	0.2	Iris-setosa
+4.6	3.1	1.5	0.2	Iris-setosa
+5.0	3.6	1.4	0.2	Iris-setosa
+5.4	3.9	1.7	0.4	Iris-setosa
+4.6	3.4	1.4	0.3	Iris-setosa
+5.0	3.4	1.5	0.2	Iris-setosa
+4.4	2.9	1.4	0.2	Iris-setosa
+4.9	3.1	1.5	0.1	Iris-setosa
+5.4	3.7	1.5	0.2	Iris-setosa
+4.8	3.4	1.6	0.2	Iris-setosa
+4.8	3.0	1.4	0.1	Iris-setosa
+4.3	3.0	1.1	0.1	Iris-setosa
+5.8	4.0	1.2	0.2	Iris-setosa
+5.7	4.4	1.5	0.4	Iris-setosa
+5.4	3.9	1.3	0.4	Iris-setosa
+5.1	3.5	1.4	0.3	Iris-setosa
+5.7	3.8	1.7	0.3	Iris-setosa
+5.1	3.8	1.5	0.3	Iris-setosa
+5.4	3.4	1.7	0.2	Iris-setosa
+5.1	3.7	1.5	0.4	Iris-setosa
+4.6	3.6	1.0	0.2	Iris-setosa
+5.1	3.3	1.7	0.5	Iris-setosa
+4.8	3.4	1.9	0.2	Iris-setosa
+5.0	3.0	1.6	0.2	Iris-setosa
+5.0	3.4	1.6	0.4	Iris-setosa
+5.2	3.5	1.5	0.2	Iris-setosa
+5.2	3.4	1.4	0.2	Iris-setosa
+4.7	3.2	1.6	0.2	Iris-setosa
+4.8	3.1	1.6	0.2	Iris-setosa
+5.4	3.4	1.5	0.4	Iris-setosa
+5.2	4.1	1.5	0.1	Iris-setosa
+5.5	4.2	1.4	0.2	Iris-setosa
+4.9	3.1	1.5	0.1	Iris-setosa
+5.0	3.2	1.2	0.2	Iris-setosa
+5.5	3.5	1.3	0.2	Iris-setosa
+4.9	3.1	1.5	0.1	Iris-setosa
+4.4	3.0	1.3	0.2	Iris-setosa
+5.1	3.4	1.5	0.2	Iris-setosa
+5.0	3.5	1.3	0.3	Iris-setosa
+4.5	2.3	1.3	0.3	Iris-setosa
+4.4	3.2	1.3	0.2	Iris-setosa
+5.0	3.5	1.6	0.6	Iris-setosa
+5.1	3.8	1.9	0.4	Iris-setosa
+4.8	3.0	1.4	0.3	Iris-setosa
+5.1	3.8	1.6	0.2	Iris-setosa
+4.6	3.2	1.4	0.2	Iris-setosa
+5.3	3.7	1.5	0.2	Iris-setosa
+5.0	3.3	1.4	0.2	Iris-setosa
+7.0	3.2	4.7	1.4	Iris-versicolor
+6.4	3.2	4.5	1.5	Iris-versicolor
+6.9	3.1	4.9	1.5	Iris-versicolor
+5.5	2.3	4.0	1.3	Iris-versicolor
+6.5	2.8	4.6	1.5	Iris-versicolor
+5.7	2.8	4.5	1.3	Iris-versicolor
+6.3	3.3	4.7	1.6	Iris-versicolor
+4.9	2.4	3.3	1.0	Iris-versicolor
+6.6	2.9	4.6	1.3	Iris-versicolor
+5.2	2.7	3.9	1.4	Iris-versicolor
+5.0	2.0	3.5	1.0	Iris-versicolor
+5.9	3.0	4.2	1.5	Iris-versicolor
+6.0	2.2	4.0	1.0	Iris-versicolor
+6.1	2.9	4.7	1.4	Iris-versicolor
+5.6	2.9	3.6	1.3	Iris-versicolor
+6.7	3.1	4.4	1.4	Iris-versicolor
+5.6	3.0	4.5	1.5	Iris-versicolor
+5.8	2.7	4.1	1.0	Iris-versicolor
+6.2	2.2	4.5	1.5	Iris-versicolor
+5.6	2.5	3.9	1.1	Iris-versicolor
+5.9	3.2	4.8	1.8	Iris-versicolor
+6.1	2.8	4.0	1.3	Iris-versicolor
+6.3	2.5	4.9	1.5	Iris-versicolor
+6.1	2.8	4.7	1.2	Iris-versicolor
+6.4	2.9	4.3	1.3	Iris-versicolor
+6.6	3.0	4.4	1.4	Iris-versicolor
+6.8	2.8	4.8	1.4	Iris-versicolor
+6.7	3.0	5.0	1.7	Iris-versicolor
+6.0	2.9	4.5	1.5	Iris-versicolor
+5.7	2.6	3.5	1.0	Iris-versicolor
+5.5	2.4	3.8	1.1	Iris-versicolor
+5.5	2.4	3.7	1.0	Iris-versicolor
+5.8	2.7	3.9	1.2	Iris-versicolor
+6.0	2.7	5.1	1.6	Iris-versicolor
+5.4	3.0	4.5	1.5	Iris-versicolor
+6.0	3.4	4.5	1.6	Iris-versicolor
+6.7	3.1	4.7	1.5	Iris-versicolor
+6.3	2.3	4.4	1.3	Iris-versicolor
+5.6	3.0	4.1	1.3	Iris-versicolor
+5.5	2.5	4.0	1.3	Iris-versicolor
+5.5	2.6	4.4	1.2	Iris-versicolor
+6.1	3.0	4.6	1.4	Iris-versicolor
+5.8	2.6	4.0	1.2	Iris-versicolor
+5.0	2.3	3.3	1.0	Iris-versicolor
+5.6	2.7	4.2	1.3	Iris-versicolor
+5.7	3.0	4.2	1.2	Iris-versicolor
+5.7	2.9	4.2	1.3	Iris-versicolor
+6.2	2.9	4.3	1.3	Iris-versicolor
+5.1	2.5	3.0	1.1	Iris-versicolor
+5.7	2.8	4.1	1.3	Iris-versicolor
+6.3	3.3	6.0	2.5	Iris-virginica
+5.8	2.7	5.1	1.9	Iris-virginica
+7.1	3.0	5.9	2.1	Iris-virginica
+6.3	2.9	5.6	1.8	Iris-virginica
+6.5	3.0	5.8	2.2	Iris-virginica
+7.6	3.0	6.6	2.1	Iris-virginica
+4.9	2.5	4.5	1.7	Iris-virginica
+7.3	2.9	6.3	1.8	Iris-virginica
+6.7	2.5	5.8	1.8	Iris-virginica
+7.2	3.6	6.1	2.5	Iris-virginica
+6.5	3.2	5.1	2.0	Iris-virginica
+6.4	2.7	5.3	1.9	Iris-virginica
+6.8	3.0	5.5	2.1	Iris-virginica
+5.7	2.5	5.0	2.0	Iris-virginica
+5.8	2.8	5.1	2.4	Iris-virginica
+6.4	3.2	5.3	2.3	Iris-virginica
+6.5	3.0	5.5	1.8	Iris-virginica
+7.7	3.8	6.7	2.2	Iris-virginica
+7.7	2.6	6.9	2.3	Iris-virginica
+6.0	2.2	5.0	1.5	Iris-virginica
+6.9	3.2	5.7	2.3	Iris-virginica
+5.6	2.8	4.9	2.0	Iris-virginica
+7.7	2.8	6.7	2.0	Iris-virginica
+6.3	2.7	4.9	1.8	Iris-virginica
+6.7	3.3	5.7	2.1	Iris-virginica
+7.2	3.2	6.0	1.8	Iris-virginica
+6.2	2.8	4.8	1.8	Iris-virginica
+6.1	3.0	4.9	1.8	Iris-virginica
+6.4	2.8	5.6	2.1	Iris-virginica
+7.2	3.0	5.8	1.6	Iris-virginica
+7.4	2.8	6.1	1.9	Iris-virginica
+7.9	3.8	6.4	2.0	Iris-virginica
+6.4	2.8	5.6	2.2	Iris-virginica
+6.3	2.8	5.1	1.5	Iris-virginica
+6.1	2.6	5.6	1.4	Iris-virginica
+7.7	3.0	6.1	2.3	Iris-virginica
+6.3	3.4	5.6	2.4	Iris-virginica
+6.4	3.1	5.5	1.8	Iris-virginica
+6.0	3.0	4.8	1.8	Iris-virginica
+6.9	3.1	5.4	2.1	Iris-virginica
+6.7	3.1	5.6	2.4	Iris-virginica
+6.9	3.1	5.1	2.3	Iris-virginica
+5.8	2.7	5.1	1.9	Iris-virginica
+6.8	3.2	5.9	2.3	Iris-virginica
+6.7	3.3	5.7	2.5	Iris-virginica
+6.7	3.0	5.2	2.3	Iris-virginica
+6.3	2.5	5.0	1.9	Iris-virginica
+6.5	3.0	5.2	2.0	Iris-virginica
+6.2	3.4	5.4	2.3	Iris-virginica
+5.9	3.0	5.1	1.8	Iris-virginica
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_dependencies.xml	Mon May 19 12:34:48 2014 -0400
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<tool_dependency>
+  <package name="yacca" version="1.0">
+      <repository changeset_revision="09af164052b9" name="package_cran_yacca_1_0" owner="devteam" toolshed="http://toolshed.g2.bx.psu.edu" />
+    </package>
+    <package name="numpy" version="1.7.1">
+      <repository changeset_revision="0c288abd2a1e" name="package_numpy_1_7" owner="devteam" toolshed="http://toolshed.g2.bx.psu.edu" />
+    </package>
+    <package name="rpy" version="1.0.3">
+      <repository changeset_revision="82170c94ca7c" name="package_rpy_1_0_3" owner="devteam" toolshed="http://toolshed.g2.bx.psu.edu" />
+    </package>
+    <package name="R" version="2.11.0">
+      <repository changeset_revision="5824d2b3bc8b" name="package_r_2_11_0" owner="devteam" toolshed="http://toolshed.g2.bx.psu.edu" />
+    </package>
+</tool_dependency>