Description Usage Arguments Value Details Author(s) See Also Examples
EnrichDepletTF
Calculating the p values for enrichment and depletion of
transcription factor binding sites within a system.
1 2 | EnrichDepletTF(sys, nUpMost = FALSE, CorDirection = "Positive",
multipleTests = "Bonferroni", alpha = 0.05)
|
sys |
(character) A vector of 1L length, of 5 uppercase lettered word that
corresponds to a biological system curated during the
BCB420H1 winter 2019 course. The list of available systems
can be retrieved by:
names(SyDBgetRootSysIDs(fetchData("SysDB"))). For more
information, see |
nUpMost |
(numeric|logical) Either FALSE or a numeric vector of 1L length. FALSE returns the one sided enrichment / depletion scores and p values for all significantly correlated genes. A numeric vector sets the number of most highly correlated pairs of genes to return their one sided enrichment / depletion scores and p values. The default is FALSE. |
CorDirection |
(character) A vector of 1L length of either "Positive" or "Negative". "Positive" calculates the enrichment / depletion of TF-binding among pairs of genes that are significantly positively correlated. "Negative" calculates the enrichment / depletion of TF-binding among pairs of genes that are significantly negatively correlated. The default is "Positive". |
multipleTests |
(character) A vector of 1L length of either "Bonferroni" or "BH" (Benjamini-Hochberg). Sets the multiple tests correction approach for the calculation of correlation. The default is "Bonferroni". Note that this parameter does not influence the correction approach for the depletion / enrichment calculations, as the returned value contains both approaches as a default. |
alpha |
(numeric) A vector of 1L length. Sets the value of alpha for deciding the cutoff for significant results. The same value of alpha is used for both calculating the cutoff p value for significantly correlated pairs of genes and for calculating the cutoff p value for significantly enriched / depleted TFs among the significantly correlated pairs of genes. The Default is 0.05. |
(data frame) A data frame with 8 columns, and rows dimensions that are equal to the number of unique TF that can bind the genes of the chosen system. The returned data frame provides the following information for each TF: Enrichment magnitude (Odds Ratio) among the systems' correlated genes; P value for one sided fisher's exact test for enrichment; Depletion magnitude (Odds Ratio) among the systems' correlated genes; P value for one sided fisher's exact test for depletion; The BH corrected cutoff calculated for the p values of the enrichment; The BH corrected cutoff calculated for the p values of depletion; The Bonferroni corrected cutoff. This data frame contains all values for the significantly enriched / depleted TFs as well as for the not-enriched / not-depleted TFs. If less then 3 correlated genes were fed into the function, the function will return NaN and a warning.
The systems were curated as part of BCB420H1 winter 2019 course. The
TF binding datasets were curated by the GTRD database. The
expression profiles database was obtained from GEO. For more
information about the datasets, see fetchData
.
Enrichment and depletion calculation were inspired by "Pathway
Guide" Fishers Exact Test
and by Devon Ryan Depletion
Note: I am not sure if the depletion calculation is mathematically
correct.
Sapir Labes (aut)
fisher.test
Performs Fisher's exact test for testing the null of
independence of rows and columns in a contingency table
with fixed marginals.
1 2 3 4 5 6 7 | ## Not run:
# The enrichment and depletion values and p values of TF for the 10 most positively
# correlated genes of NLRIN system.
EnrichDepletNLRIN <- EnrichDepletTF(sys = "NLRIN", nUpMost = 10)
EnrichDepletNLRIN[EnrichDepletNLRIN$Enrichment_P_value < EnrichDepletNLRIN$BH_enrichment, ]
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.