Description Usage Arguments Details Value See Also Examples
Resample data frame using values from the column with number of clonesets. Number of clonestes (i.e., rows of a MiTCR data frame) are reads (usually the "Read.count" column) or UMIs (i.e., barcodes, usually the "Umi.count" column).
1 2 3 4 5 | resample(.data, .n = -1, .col = c("read.count", "umi.count"))
downsample(.data, .n, .col = c("read.count", "umi.count"))
prop.sample(.data, .perc = 50, .col = c("read.count", "umi.count"))
|
.data |
Data frame with the column |
.n |
Number of values / reads / UMIs to choose. |
.col |
Which column choose to represent quanitites of clonotypes. See "Details". |
.perc |
Percentage (0 - 100). See "Details" for more info. |
resample
. Using multinomial distribution, compute the number of occurences for each cloneset, than remove zero-number clonotypes and
return resulting data frame. Probabilities for rmultinom
for each cloneset is a percentage of this cloneset in
the .col
column. It's a some sort of simulation of how clonotypes are chosen from the organisms. For now it's not working
very well, so use downsample
instead.
downsample
. Choose .n
clones (not clonotypes!) from the input repertoires without any probabilistic simulation, but
exactly computing each choosed clones. Its output is same as for resample
(repertoires), but is more consistent and
biologically pleasant.
prop.sample
. Choose the first N clonotypes which occupies .perc
percents of overall UMIs / reads.
Subsampled data frame.
rmultinom, clonal.proportion
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.