Description Usage Arguments Value Author(s) References Examples

View source: R/auxiliary_functions.R

Function performs Winsor normalization (see winsor() function) of each window of specified window_size, sliding in a given vector by 1 position, and reports a list of (1) mean Winsorized values for each vector position (mean of Winsorized value for a given position as calculated within each overlapping window) and (2) standard deviation of those Winsorized values.

1 2 | ```
swinsor_vector(input_vector, window_size, winsor_level = 0.9,
only_top = FALSE)
``` |

`input_vector` |
Vector with values to be smooth-Winsorized |

`window_size` |
Size of a sliding window. |

`winsor_level` |
Winsorization level. Bottom outliers will be set to (1-winsor_level)/2 quantile and top outliers to (1+winsor_level)/2 quantile. |

`only_top` |
If TRUE then bottom values are not Winsorized and are set to 0. |

`comp1` |
Vector with mean Winsorized values for each input_vector position |

`comp2` |
Vector with standard deviation of Winsorized values for each input_vector position |

Lukasz Jan Kielpinski

"Analysis of sequencing based RNA structure probing data" Kielpinski, Sidiropoulos, Vinther. Chapter in "Methods in Enzymology" (in preparation)

1 2 3 | ```
data_set <- runif(1:100)*100
plot(swinsor_vector(data_set, window_size=71,
winsor_level=0.8)[[1]] ~ data_set)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.