Learn R Programming

nandb (version 0.2.1)

KmersFromBrightnesses: Calculate numbers of kmers based on brightnesses

Description

Calculate the number pixels occupied of molecules in each oligomeric state (monomer, dimer, trimer, ..., kmer, ...) based on the brightnesses of those pixels.

Usage

KmersFromBrightnesses(brightnesses, monomer)

Arguments

brightnesses

Vector or array of pixel brightnesses

monomer

The median brightness of a monomer. You must know what this is to use this function correctly. This must be greater than 1 (this is the 'apparent brightness' of a monomer). If you're reading the Digman et al. (2008) paper, this is \(1 + \epsilon\).

This function takes the brightnesses in the range (1, 1 + 2 * monomer to be monomers, those in the range (1 + 2 * monomer, 1 + 4 * monomer to be dimers, (1 + 4 * monomer, 1 + 6 * monomer to be trimers and so on.

Value

A named vector (named '1mers' '2mers' '3mers' and so on) with each element detailing the number of that kmer found.

Examples

Run this code
# NOT RUN {
brightnesses <- runif(100, 1, 3)
monomer <- 1.2
KmersFromBrightnesses(brightnesses, monomer)
# }

Run the code above in your browser using DataLab