Description Usage Arguments Value Examples
Applies the minimum hypergeometric test to given data and plots the enrichment of observed over expected across the data, including the ln(P) value (title), log2(observed/expected) (y-axis; e.g. observed/expected cognate k-mers), and element rank (x-axis, e.g. k-mer). The blue line indicates the point of minimum hypergeometric p-value.
1 | makeEnrichmentGraph(x, n_max = length(x) - 1, sortedBy = NULL)
|
x |
A sorted vector of binary values, where 1 is a "hit" (e.g. cognate k-mer) and 0 is a "miss" (e.g. non-cognate k-mer). |
n_max |
The maximum number of k-mers to consider for each minimum hypergeometric test. Defaults to testing all possible entries in the vector for maximal enrichment. |
sortedBy |
An alternate x-axis (instead of vector index) to use for the x-axis of the graph. Generally, what the vector x was sorted by. |
Returns a list containing the plot (plot), the data.frame used to make the plot (rawData), and the minHG test (minHGTest).
1 2 3 4 | kmerMat = inputKMerFreqs(sprintf("kMerFiles/%s.freq.gz",sampleDesc$id), IDs = sampleDesc$id)
myPCA = doKMerPCA(kmerMat, nPCs = "jackstraw")
treatmentPCs = findDistinguishingPCs(myPCA$rotation[,1:myPCA$nPCs], sampleDesc[c("id","treated")])
plot = makeEnrichmentGraph(as.logical(cisbp$binaryPBMZScores[order(pcs$rotation[row.names(cisbp$binaryPBMZScores),treatmentPCs$PC[1]],decreasing = T),"M0312_1.02.PBM"])); # highly weighted k-mers
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.