Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Correlation work #511

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
style fixes
bgruening committed Oct 25, 2018
commit af55803a56d6bd3575085e77b21ba85d3ea13a12
64 changes: 33 additions & 31 deletions tools/correlation/cor.xml
Original file line number Diff line number Diff line change
@@ -1,33 +1,35 @@
<tool id="cor2" name="Correlation" version="1.0.0">
<description>for numeric columns</description>
<requirements>
<requirement type="package" version="1.0.3">rpy</requirement>
</requirements>
<command interpreter="python">cor.py $input1 $out_file1 $numeric_columns $method</command>
<inputs>
<param format="tabular" name="input1" type="data" label="Dataset" help="Dataset missing? See TIP below"/>
<param name="numeric_columns" label="Numerical columns" type="data_column" numerical="True" multiple="True" data_ref="input1" help="Multi-select list - hold the appropriate key while clicking to select multiple columns" />
<param name="method" type="select" label="Method">
<option value="pearson">Pearson</option>
<option value="kendall">Kendall rank</option>
<option value="spearman">Spearman rank</option>
</param>
</inputs>
<outputs>
<data format="txt" name="out_file1" />
</outputs>
<tests>
<!--
Test a tabular input with the first line being a comment without a # character to start
-->
<test>
<param name="input1" value="cor.tabular" />
<param name="numeric_columns" value="2,3" />
<param name="method" value="pearson" />
<output name="out_file1" file="cor_out.txt" />
</test>
</tests>
<help>
<tool id="cor2" name="Correlation" version="1.0.1">
<description>for numeric columns</description>
<requirements>
<requirement type="package" version="1.0.3">rpy</requirement>
</requirements>
<command>
cor.py '$input1' '$out_file1' $numeric_columns $method
</command>
<inputs>
<param format="tabular" name="input1" type="data" label="Dataset" help="Dataset missing? See TIP below"/>
<param name="numeric_columns" label="Numerical columns" type="data_column" numerical="True" multiple="True" data_ref="input1" help="Multi-select list - hold the appropriate key while clicking to select multiple columns" />
<param name="method" type="select" label="Method">
<option value="pearson">Pearson</option>
<option value="kendall">Kendall rank</option>
<option value="spearman">Spearman rank</option>
</param>
</inputs>
<outputs>
<data format="txt" name="out_file1" />
</outputs>
<tests>
<!--
Test a tabular input with the first line being a comment without a # character to start
-->
<test>
<param name="input1" value="cor.tabular" />
<param name="numeric_columns" value="2,3" />
<param name="method" value="pearson" />
<output name="out_file1" file="cor_out.txt" />
</test>
</tests>
<help>

.. class:: infomark

@@ -97,5 +99,5 @@ This tool computes the matrix of correlation coefficients between numeric column
0.730635686279 1.0

So the correlation for our twenty cases is .73, which is a fairly strong positive relationship.
</help>
</help>
</tool>