Skip to contents

This function returns the subset of regions significantly enriched in the second condition.

Usage

enrichedCond2(object)

Arguments

object

A DamIDResults object.

Value

A data.frame.

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()
enrichedCond2(mock_results)
#>              logFC P.Value B gene_name
#> chr1:101-200    -2    0.01 3     GeneB