Description Usage Arguments Details Examples
Test for differential enrichment between two groups of sequences
1 2 3 4 5 6 7 8 9 10 11 |
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. |
verbose |
if to produce verbose output |
res1 |
the output of |
res2 |
the output of |
This function calls motifEnrichment
on two groups of sequences and calculates
the difference statistics when possible.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | if(requireNamespace("PWMEnrich.Dmelanogaster.background")){
# load the background file for drosophila and lognormal correction
data(PWMLogn.dm3.MotifDb.Dmel, package = "PWMEnrich.Dmelanogaster.background")
# 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))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.