| motifDiffEnrichment {PWMEnrich} | R Documentation |
Test for differential enrichment between two groups of sequences
motifDiffEnrichment(sequences1, sequences2, pwms,
score = "autodetect", bg = "autodetect",
cutoff = log2(exp(4)), verbose = TRUE, res1 = NULL,
res2 = NULL)
sequences1 |
First set of sequences. Can be either a single sequence (an object of class DNAString), or a list of DNAString objects, or a DNAStringSet object. |
sequences2 |
Second set of sequences. Can be either a single sequence (an object of class DNAString), or a list of DNAString objects, or a DNAStringSet object. |
pwms |
this parameter can take multiple values
depending on the scoring scheme and background correction
used. When the
|
score |
this parameter determines which scoring scheme to use. Following scheme as available:
|
bg |
this parameter determines which background correction to use, if any.
|
cutoff |
the score cutoff for a significant motif hit if scoring scheme "cutoff" is selected. |
res1 |
the output of |
res2 |
the output of |
verbose |
if to produce verbose output |
This function calls motifEnrichment on two groups
of sequences and calculates the difference statistics
when possible.
if(require("PWMEnrich.Dmelanogaster.background")){
# load the background file for drosophila and lognormal correction
data(PWMLogn.dm3.MotifDb.Dmel)
# get the differential enrichment
diff = motifDiffEnrichment(DNAString("TGCATCAAGTGTGTAGTGTGAGATTAGT"), DNAString("TGAACGAGTAGGACGATGAGAGATTGATG"), PWMLogn.dm3.MotifDb.Dmel, verbose=FALSE)
# motifs differentially enriched in the first sequence (with lognormal background correction)
head(sort(diff$group.bg, decreasing=TRUE))
# motifs differentially enriched in the second sequence (with lognormal background correction)
head(sort(diff$group.bg))
}