Description Usage Arguments Value Examples
Applies the minimum hypergeometric test to the current data, and makes a plot where the
1 | makeEnrichmentGraphForPC(PC, binaryData, n_max = 3000, decreasing = F)
|
PC |
A named numeric vector representing the k-mer loadings of a PC |
binaryData |
A named logical vector representing k-mer cognate (T) or non-cognate (F) status for a motif. |
n_max |
The maximum number of k-mers to consider for each minimum hypergeometric test. Defaults to 3000. Should be no more than about 10% of the number of k-mers. |
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 5 6 7 | 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")])
tfEnrichmentsPBM = getKMerTFEnrichment(myPCA$rotation[,1:myPCA$nPCs], cisbp$binaryPBMZScores);
tfEnrichmentsPBM = tfEnrichmentsPBM[order(tfEnrichmentsPBM$p),]
tfEnrichmentsPBM = merge(tfEnrichmentsPBM2, cisbp$TFTable[c("Motif_ID","TF_Name")], by="Motif_ID") # add TF names
p = makeEnrichmentGraphForPC(pcs$rotation[,treatmentPCs$PC[1]],cisbp$binaryPBMZScores[,head(tfEnrichmentsPBM$Motif_ID[tfEnrichmentsPBM$PC==treatmentPCs$PC[1] & tfEnrichmentsPBM$direction=="low"],n=1)]) #top motif for top treatment-distinguishing PC for lowly-weighted k-mers
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.