Mercurial > repos > bgruening > pandas_rolling_window
annotate pandas_rolling.xml @ 0:e9af125ddb86 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:28 -0400 | 
| parents | |
| children | 
| rev | line source | 
|---|---|
| 0 
e9af125ddb86
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"> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 3 <requirements> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 7 </requirements> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 8 <command> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 9 <![CDATA[ | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 10 | 
| 
e9af125ddb86
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' && | 
| 
e9af125ddb86
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' | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 13 | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 14 ]]> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 15 </command> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 16 <configfiles> | 
| 
e9af125ddb86
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[ | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 18 import argparse | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 19 import sys | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 20 | 
| 
e9af125ddb86
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 | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 22 | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 23 kwargs = dict() | 
| 
e9af125ddb86
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' | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 25 | 
| 
e9af125ddb86
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': | 
| 
e9af125ddb86
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}) | 
| 
e9af125ddb86
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': | 
| 
e9af125ddb86
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}) | 
| 
e9af125ddb86
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': | 
| 
e9af125ddb86
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}) | 
| 
e9af125ddb86
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': | 
| 
e9af125ddb86
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}) | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 34 #end if | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 35 | 
| 
e9af125ddb86
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} ) | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 37 | 
| 
e9af125ddb86
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: | 
| 
e9af125ddb86
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) | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 40 #else: | 
| 
e9af125ddb86
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) | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 42 #end if | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 43 | 
| 
e9af125ddb86
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') | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 45 ]]> </configfile> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 46 </configfiles> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 47 <inputs> | 
| 
e9af125ddb86
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"/> | 
| 
e9af125ddb86
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" | 
| 
e9af125ddb86
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." /> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 51 | 
| 
e9af125ddb86
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" | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 53 help="" /> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 54 | 
| 
e9af125ddb86
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"> | 
| 
e9af125ddb86
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" | 
| 
e9af125ddb86
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"> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
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--> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 72 </param> | 
| 
e9af125ddb86
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" /> | 
| 
e9af125ddb86
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" /> | 
| 
e9af125ddb86
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" /> | 
| 
e9af125ddb86
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" /> | 
| 
e9af125ddb86
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" /> | 
| 
e9af125ddb86
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" /> | 
| 
e9af125ddb86
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" /> | 
| 
e9af125ddb86
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" /> | 
| 
e9af125ddb86
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" /> | 
| 
e9af125ddb86
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" /> | 
| 
e9af125ddb86
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"> | 
| 
e9af125ddb86
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" /> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 85 </when> | 
| 
e9af125ddb86
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"> | 
| 
e9af125ddb86
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" /> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 88 </when> | 
| 
e9af125ddb86
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"> | 
| 
e9af125ddb86
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" /> | 
| 
e9af125ddb86
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" /> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 92 </when> | 
| 
e9af125ddb86
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"> | 
| 
e9af125ddb86
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" /> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 95 </when> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 96 </conditional> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 97 | 
| 
e9af125ddb86
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"> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
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> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 112 </param> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 113 | 
| 
e9af125ddb86
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" | 
| 
e9af125ddb86
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." /> | 
| 
e9af125ddb86
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.--> | 
| 
e9af125ddb86
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"/> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 118 </inputs> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 119 <outputs> | 
| 
e9af125ddb86
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" /> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 121 </outputs> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 122 <tests> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 123 <test> | 
| 
e9af125ddb86
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"/> | 
| 
e9af125ddb86
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"/> | 
| 
e9af125ddb86
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"/> | 
| 
e9af125ddb86
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"> | 
| 
e9af125ddb86
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"/> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 129 </conditional> | 
| 
e9af125ddb86
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"/> | 
| 
e9af125ddb86
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"/> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 132 </test> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 133 <test> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 134 <!-- None test --> | 
| 
e9af125ddb86
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"/> | 
| 
e9af125ddb86
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"/> | 
| 
e9af125ddb86
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"> | 
| 
e9af125ddb86
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"/> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 139 </conditional> | 
| 
e9af125ddb86
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"/> | 
| 
e9af125ddb86
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"/> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 142 </test> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 143 <test> | 
| 
e9af125ddb86
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"/> | 
| 
e9af125ddb86
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"/> | 
| 
e9af125ddb86
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"/> | 
| 
e9af125ddb86
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"> | 
| 
e9af125ddb86
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"/> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 149 </conditional> | 
| 
e9af125ddb86
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"/> | 
| 
e9af125ddb86
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"/> | 
| 
e9af125ddb86
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"/> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 153 </test> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 154 <test> | 
| 
e9af125ddb86
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"/> | 
| 
e9af125ddb86
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"/> | 
| 
e9af125ddb86
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"> | 
| 
e9af125ddb86
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"/> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 159 </conditional> | 
| 
e9af125ddb86
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"/> | 
| 
e9af125ddb86
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"/> | 
| 
e9af125ddb86
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"/> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 163 </test> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 164 </tests> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 165 <help> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 166 <![CDATA[ | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 167 | 
| 
e9af125ddb86
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** | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 169 | 
| 
e9af125ddb86
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. | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 171 | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 172 | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 173 ]]> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 174 </help> | 
| 
e9af125ddb86
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pandas_rolling_window commit bdbedf42854d16bb00c396045007d4baece0a869
 bgruening parents: diff
changeset | 175 </tool> | 
