all.mers: function to generate all k mers of a given size

Description Usage Arguments Value Examples

View source: R/all.mers.R

Description

This function returns all k-mers given k in alphabetical order

Usage

1
all.mers(mer)

Arguments

mer

The number k of nucleotides in the k-mers

Value

A character vector of k-mers

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (mer) 
{
    sort(apply(expand.grid(lapply(1:mer, function(x) {
        c("A", "C", "G", "T")
    })), 1, function(x) paste(x, collapse = "")))
  }

muhligs/Regmex documentation built on Sept. 5, 2020, 1:11 a.m.