calculateTranscriptMC {transite} | R Documentation

## Motif Enrichment calculation

### Description

C++ implementation of Motif Enrichment calculation

### Usage

    calculateTranscriptMC(absoluteHits, totalSites, relHitsForeground, n,
      maxPermutations, minPermutations, e)

### Arguments

`absoluteHits` | number of putative binding sites per sequence (returned by `scoreTranscripts`)
`totalSites` | number of potential binding sites per sequence (returned by `scoreTranscripts`)
`relHitsForeground` | relative number of hits in foreground set
`n` | number of sequences in the foreground set
`maxPermutations` | maximum number of foreground permutations performed in Monte Carlo test for enrichment score
`minPermutations` | minimum number of foreground permutations performed in Monte Carlo test for enrichment score
`e` | stop criterion for enrichment score Monte Carlo test: aborting permutation process after observing `e` random enrichment values with more extreme values than the actual enrichment value

### Value

list with p-value and number of iterations of Monte Carlo sampling for foreground enrichment

### Examples

    foreground.seqs <- c("CAGUCAAGACUCC", "AAUUGGUUGUGGGGCUUCCCUGUACAU",
                         "AGAU", "CCAGUAA", "UGUGGGG")
    background.seqs <- c(foreground.seqs, "CAACAGCCUUAAUU", "CUUUGGGGAAU",
                         "UCAUUUUAUUAAA", "AUCAAAUUA", "GACACUUAAAGAUCCU",
                         "UAGCAUUAACUUAAUG", "AUGGA", "GAAGAGUGCUCA",
                         "AUAGAC", "AGUUC")
    motif.db <- getMotifById("M178_0.6")
    fg <- scoreTranscripts(foreground.seqs, cache = FALSE,
      motifs = motif.db)
    bg <- scoreTranscripts(background.seqs, cache = FALSE,
      motifs = motif.db)

    mc.result <- calculateTranscriptMC(unlist(bg$absolute.hits),
     unlist(bg$total.sites),
     fg$df$absolute.hits / fg$df$total.sites,
     length(foreground.seqs), 1000, 500, 5)

[Package transite version 1.2.1 Index]