top.fun: Get samples from a repertoire slice-by-slice or top-by-top...

Description Usage Arguments Value Examples

Description

Functions for getting samples from data frames either by consequently applying head functions (top.fun) or by getting equal number of rows in the moving window (slice_fun) and applying specified function to this samples.

Usage

1
2
3
top.fun(.data, .n, .fun, ..., .simplify = T)

slice_fun(.data, .size, .n, .fun, ..., .simplify = T)

Arguments

.data

Data.frame, matrix, vector or any enumerated type or a list of this types.

.n

Vector of values passed to head function for top.fun or the number of slices for slice_fun.

.fun

Funtions to apply to every sample subset. First input argument is a data.frame, others are passed as ....

...

Additional parameters passed to the .fun.

.simplify

if T then try to simplify result to a vector or to a matrix if .data is a list.

.size

Size of the slice for sampling for slice_fun.

Value

List of length length(.n) for top.fun or .n for slice_fun.

Examples

1
2
3
4
5
6
7
## Not run: 
# Get entropy of V-usage for the first 1000, 2000, 3000, ... clones.
res <- top.fun(immdata[[1]], 1000, entropy.seg)
# Get entropy of V-usage for the interval of clones with indices [1,1000], [1001,2000], ...
res <- top.fun(immdata[[1]], 1000, entropy.seg)

## End(Not run)

imminfo/tcr documentation built on June 13, 2020, 7:01 a.m.