annotate pandas_rolling.xml @ 0:a06f7b5c4dc7 draft default tip

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
author bgruening
date Mon, 20 May 2019 08:42:54 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
1 <tool id="pandas_rolling_window" name="Rolling window" version="0.1">
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
2 <description>over a dataframe (e.g. for data smoothing)</description>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
3 <requirements>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
4 <requirement type="package" version="1.16.3">numpy</requirement>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
5 <requirement type="package" version="1.2.1">scipy</requirement>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
6 <requirement type="package" version="0.24.2">pandas</requirement>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
7 </requirements>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
8 <command>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
9 <![CDATA[
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
10
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
11 cat '$pandas_script' &&
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
12 python '$pandas_script'
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
13
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
14 ]]>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
15 </command>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
16 <configfiles>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
17 <configfile name="pandas_script"><![CDATA[
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
18 import argparse
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
19 import sys
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
20
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
21 import pandas as pd
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
22
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
23 kwargs = dict()
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
24 window_type = '$smooth_function.smooth_function_opts_selector'
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
25
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
26 #if $smooth_function.smooth_function_opts_selector == 'gaussian':
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
27 kwargs.update({'std': $smooth_function.gaussian_std})
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
28 #elif $smooth_function.smooth_function_opts_selector == 'general_gaussian':
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
29 kwargs = ({'power': $smooth_function.ggaussian_power, 'width': $smooth_function.ggaussian_width})
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
30 #elif $smooth_function.smooth_function_opts_selector == 'kaiser':
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
31 kwargs.update({'beta': $smooth_function.kaiser_beta})
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
32 #elif $smooth_function.smooth_function_opts_selector == 'slepian':
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
33 kwargs.update({'width': $smooth_function.slepian_width})
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
34 #end if
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
35
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
36 df = pd.read_csv('${infile}', sep='\t', index_col=None, header=None, dtype={'strand': object} )
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
37
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
38 #if $group_column:
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
39 df['aggregate'] = df.groupby( int($group_column)-1, sort=False )[int($value_column)-1].rolling(${window_len}, win_type=window_type, center=$centering ).${statistics}(**kwargs).reset_index(drop=True)
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
40 #else:
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
41 df['aggregate'] = df[int($value_column)-1].rolling(${window_len}, win_type=window_type, center=$centering ).${statistics}(**kwargs).reset_index(drop=True)
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
42 #end if
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
43
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
44 df.to_csv('${outfile}', index=False, header=False, sep='\t', na_rep='0', float_format='%.2f')
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
45 ]]> </configfile>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
46 </configfiles>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
47 <inputs>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
48 <param name="infile" type="data" format="tabular,bed.interval" label="Select input file in tabular or BED format"/>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
49 <param name="group_column" type="data_column" data_ref="infile" optional="true" label="Optional column to group"
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
50 help="For example if you have a chromosome column you probably want to group each chromosome before you apply any function." />
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
51
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
52 <param name="value_column" type="data_column" data_ref="infile" label="Column with the value of interest"
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
53 help="" />
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
54
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
55 <conditional name="smooth_function">
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
56 <param name="smooth_function_opts_selector" type="select" label="Provide a window type"
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
57 help="For more information please see https://en.wikipedia.org/wiki/Window_function">
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
58 <option value="boxcar" selected="True">Boxcar or Dirichlet, all points are evenly weighted</option>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
59 <option value="triang">triang</option>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
60 <option value="blackman">blackman</option>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
61 <option value="hamming">hamming</option>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
62 <option value="bartlett">bartlett</option>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
63 <option value="parzen">parzen</option>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
64 <option value="bohman">bohman</option>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
65 <option value="blackmanharris">blackmanharris</option>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
66 <option value="nuttall">nuttall</option>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
67 <option value="barthann">barthann</option>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
68 <!--option value="kaiser">kaiser</option>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
69 <option value="gaussian">gaussian</option>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
70 <option value="general_gaussian">general gaussian</option>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
71 <option value="slepian">slepian</option-->
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
72 </param>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
73 <when value="boxcar" />
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
74 <when value="triang" />
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
75 <when value="blackman" />
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
76 <when value="hamming" />
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
77 <when value="bartlett" />
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
78 <when value="parzen" />
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
79 <when value="bohman" />
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
80 <when value="blackmanharris" />
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
81 <when value="nuttall" />
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
82 <when value="barthann" />
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
83 <when value="kaiser">
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
84 <param name="kaiser_beta" type="float" value="0.1" min='0.0' label="beta" />
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
85 </when>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
86 <when value="gaussian">
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
87 <param name="gaussian_std" type="float" value="0.1" min='0.0' label="std" />
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
88 </when>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
89 <when value="general_gaussian">
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
90 <param name="ggaussian_power" type="integer" value="2" min='1' label="power" />
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
91 <param name="ggaussian_width" type="integer" value="2" min="1" label="width" />
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
92 </when>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
93 <when value="slepian">
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
94 <param name="slepian_width" type="integer" value="2" min="1" label="width" />
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
95 </when>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
96 </conditional>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
97
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
98 <param name="statistics" type="select" label="Provide a statistical function">
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
99 <option value="count">Number of non-null observations (count)</option>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
100 <option value="sum">Sum of values (sum)</option>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
101 <option value="mean" selected="true">Mean of values (mean)</option>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
102 <option value="median">Arithmetic median of values (median)</option>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
103 <option value="min">Minimum (min)</option>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
104 <option value="max">max (max)</option>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
105 <option value="std">Bessel-corrected sample standard deviation (std)</option>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
106 <option value="var">Unbiased variance (var)</option>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
107 <option value="skew">Sample skewness (3rd moment)</option>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
108 <option value="kurt">Sample kurtosis (4th moment)</option>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
109 <option value="quantil">Sample quantile (value at %)</option>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
110 <option value="cov">Unbiased covariance (binary) (cov)</option>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
111 <option value="corr">Correlation (corr)</option>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
112 </param>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
113
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
114 <param name="centering" type="boolean" truevalue="True" falsevalue="False" label="center smoothed values"
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
115 help="By default the labels are set to the right edge of the window. Here you can change that to the center." />
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
116 <!-- Options for all formats.-->
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
117 <param name="window_len" type="integer" value="3" min="2" label="Window length"/>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
118 </inputs>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
119 <outputs>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
120 <data name="outfile" format_source="infile" />
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
121 </outputs>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
122 <tests>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
123 <test>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
124 <param name="infile" value="1.bedgraph"/>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
125 <param name="group_column" value="1"/>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
126 <param name="value_column" value="5"/>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
127 <conditional name="smooth_function">
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
128 <param name="smooth_function_opts_selector" value="boxcar"/>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
129 </conditional>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
130 <param name="window_len" value="3"/>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
131 <output name="outfile" value="1_boxcar.bedgraph"/>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
132 </test>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
133 <test>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
134 <!-- None test -->
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
135 <param name="infile" value="1.bedgraph"/>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
136 <param name="value_column" value="5"/>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
137 <conditional name="smooth_function">
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
138 <param name="smooth_function_opts_selector" value="boxcar"/>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
139 </conditional>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
140 <param name="window_len" value="3"/>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
141 <output name="outfile" value="2_boxcar.bedgraph"/>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
142 </test>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
143 <test>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
144 <param name="infile" value="1.bedgraph"/>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
145 <param name="group_column" value="1"/>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
146 <param name="value_column" value="5"/>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
147 <conditional name="smooth_function">
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
148 <param name="smooth_function_opts_selector" value="hamming"/>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
149 </conditional>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
150 <param name="window_len" value="3"/>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
151 <param name="statistics" value="sum"/>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
152 <output name="outfile" value="1_hamming.bedgraph"/>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
153 </test>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
154 <test>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
155 <param name="infile" value="1.bedgraph"/>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
156 <param name="value_column" value="5"/>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
157 <conditional name="smooth_function">
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
158 <param name="smooth_function_opts_selector" value="hamming"/>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
159 </conditional>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
160 <param name="window_len" value="3"/>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
161 <param name="statistics" value="sum"/>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
162 <output name="outfile" value="2_hamming.bedgraph"/>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
163 </test>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
164 </tests>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
165 <help>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
166 <![CDATA[
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
167
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
168 **What it does**
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
169
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
170 Provides rolling window calculations, e.g. for smoothing values.
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
171
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
172
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
173 ]]>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
174 </help>
a06f7b5c4dc7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
bgruening
parents:
diff changeset
175 </tool>