This function returns the subset of regions significantly enriched in the first condition.
Examples
# Helper function to create a sample DamIDResults object for examples
.generate_example_results <- function() {
analysis_df <- data.frame(
logFC = c(2, -2, 0.1), P.Value = c(0.01, 0.01, 0.9), B = c(4, 3, -1),
gene_name = c("GeneA", "GeneB", "GeneC"),
row.names = c("chr1:1-100", "chr1:101-200", "chr1:201-300")
)
new("DamIDResults",
analysis = analysis_df,
upCond1 = analysis_df[1, , drop = FALSE],
upCond2 = analysis_df[2, , drop = FALSE],
cond = c("Condition 1" = "C1", "Condition 2" = "C2"),
data = list(test_category = "bound")
)
}
mock_results <- .generate_example_results()
enrichedCond1(mock_results)
#> logFC P.Value B gene_name
#> chr1:1-100 2 0.01 4 GeneA