motifRankingForGroup-MotifEnrichmentResults-method: Get a ranking of motifs by their enrichment in the whole set...

Description Usage Arguments Value Examples

Description

Get a ranking of motifs by their enrichment in the whole set of sequences

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## S4 method for signature 'MotifEnrichmentResults'
motifRankingForGroup(
  obj,
  bg = TRUE,
  id = FALSE,
  order = FALSE,
  rank = FALSE,
  unique = FALSE,
  ...
)

Arguments

obj

a MotifEnrichmentResults object

bg

if to use background corrected P-values to do the ranking (if available)

id

if to show PWM IDs instead of target TF names

order

if to output the ordering of PWMs instead of actual P-values or raw values

rank

if the output should be rank of a PWM instead of actual P-values or raw values

unique

if TRUE, only the best rank is taken for each TF (only when id = FALSE, order = FALSE)

...

currently unused

Value

a vector of P-values or raw enrichments sorted such that the first motif is most enriched

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
if(requireNamespace("PWMEnrich.Dmelanogaster.background")){
   ###
   # load the pre-compiled lognormal background
   data(PWMLogn.dm3.MotifDb.Dmel, package = "PWMEnrich.Dmelanogaster.background")

   # scan two sequences for motif enrichment
   sequences = list(DNAString("GAAGTATCAAGTGACCAGTAAGTCCCAGATGA"), 
     DNAString("AGGTAGATAGAACAGTAGGCAATGAAGCCGATG"))
   res = motifEnrichment(sequences, PWMLogn.dm3.MotifDb.Dmel)

   # most enriched in both sequences (sorted by lognormal background P-value)
   head(motifRankingForGroup(res))

   # Return a non-redundant set of TFs
   head(motifRankingForGroup(res, unique=TRUE))

   # sorted by raw affinity instead of P-value
   head(motifRankingForGroup(res, bg=FALSE))

   # show IDs instead of target TF names
   head(motifRankingForGroup(res, id=TRUE))

   # output the rank instead of P-value
   head(motifRankingForGroup(res, rank=TRUE))
}

PWMEnrich documentation built on Nov. 8, 2020, 7:45 p.m.