calculateKmerEnrichment {transite} | R Documentation

## k-mer Enrichment between Foreground and Background Sets

### Description

Calls `computeKmerEnrichment` to compute k-mer enrichment values for multiple foregrounds. Calculates enrichment for foreground sets in parallel.

### Usage

    calculateKmerEnrichment(foreground.sets, background.set, k,
      permutation = FALSE, chisq.p.value.threshold = 0.05,
      p.adjust.method = "BH", n.cores = 4)

### Arguments

`foreground.sets` | list of foreground sets; a foreground set is a character vector of DNA or RNA sequences (not both) and a strict subset of the `background.set`
`background.set` | character vector of DNA or RNA sequences that constitute the background set
`k` | length of k-mer, either `6` for hexamers or `7` for heptamers
`permutation` | if `TRUE`, only the enrichment value is returned (efficiency mode used for permutation testing)
`chisq.p.value.threshold` | threshold below which Fisher's exact test is used instead of Pearson's chi-squared test
`p.adjust.method` | see `p.adjust`
`n.cores` | number of computing cores to use

### Value

A list with two entries:

(1) dfs: a list of data frames with results from `computeKmerEnrichment` for each of the foreground sets (2) kmers: a character vector of all k-mers

### See Also

Other k-mer functions: `checkKmers`, `computeKmerEnrichment`, `drawVolcanoPlot`, `empiricalEnrichmentMeanCDF`, `generateKmers`, `generatePermutedEnrichments`, `homopolymerCorrection`, `permTestGeometricMean`, `runKmerSPMA`, `runKmerTSMA`

### Examples

    # define simple sequence sets for foreground and background
    foreground.set1 <- c(
      "CAACAGCCUUAAUU", "CAGUCAAGACUCC", "CUUUGGGGAAU",
      "UCAUUUUAUUAAA", "AAUUGGUGUCUGGAUACUUCCCUGUACAU",
      "AUCAAAUUA", "AGAU", "GACACUUAAAGAUCCU",
      "UAGCAUUAACUUAAUG", "AUGGA", "GAAGAGUGCUCA",
      "AUAGAC", "AGUUC", "CCAGUAA"
    )
    foreground.set2 <- c("UUAUUUA", "AUCCUUUACA", "UUUUUUU", "UUUCAUCAUU")
    foreground.sets <- list(foreground.set1, foreground.set2)
    background.set <- c(foreground.set1, foreground.set2,
                        "CCACACAC", "CUCAUUGGAG", "ACUUUGGGACA", "CAGGUCAGCA")

    # single-threaded
    kmer.enrichment.values.st <- calculateKmerEnrichment(foreground.sets,
      background.set, 6, n.cores = 1)
    ## Not run:
    # multi-threaded
    kmer.enrichment.values.mt <- calculateKmerEnrichment(foreground.sets,
      background.set, 6)
    ## End(Not run)

[Package transite version 1.2.1 Index]