Skip to contents

An S4 class to store the results of a damidBind differential analysis, as generated by `differential_binding()` or `differential_accessibility()`.

A generic plot method that creates a default visualisation (a volcano plot) for a `DamIDResults` object. For more advanced plotting options or different plot types, see the specific functions `plot_volcano()`, `plot_venn()`, and `analyse_go_terms()`.

Usage

# S4 method for class 'DamIDResults'
show(object)

analysisTable(object)

# S4 method for class 'DamIDResults'
analysisTable(object)

enrichedCond1(object)

# S4 method for class 'DamIDResults'
enrichedCond1(object)

enrichedCond2(object)

# S4 method for class 'DamIDResults'
enrichedCond2(object)

conditionNames(object)

# S4 method for class 'DamIDResults'
conditionNames(object)

# S4 method for class 'DamIDResults,missing'
plot(x, y, ...)

Arguments

object

A `DamIDResults` object.

x

A `DamIDResults` object.

y

(Missing) Not used.

...

Additional arguments passed to `plot_volcano()`.

Value

  • `analysisTable(object)`: returns a data.frame with the full differential analysis.

  • `enrichedCond1(object)`: returns a data.frame of regions enriched in condition 1.

  • `enrichedCond2(object)`: returns a data.frame of regions enriched in condition 2.

  • `conditionNames(object)`: returns a named character vector mapping display names to internal condition identifiers.

Slots

analysis

A data.frame containing the full differential analysis table from limma or NOISeq.

upCond1

A data.frame of regions significantly enriched in condition 1.

upCond2

A data.frame of regions significantly enriched in condition 2.

cond

A named character vector mapping user-friendly display names to the internal condition identifiers used in the analysis.

data

A list containing the initial input data used for the analysis, including the occupancy data.frame and other metadata.

Accessor Functions

These functions provide a convenient way to access the different data slots of a `DamIDResults` object.

See also

[plot_volcano()], [plot_venn()], [analyse_go_terms()] for more powerful and specific plotting functions.

Examples

# Helper function to create a sample DamIDResults object for examples
.generate_accessor_example_results <- function() {
    analysis_df <- data.frame(
        logFC = c(2, -2), P.Value = c(0.01, 0.01),
        row.names = c("chr1:1-100", "chr1:101-200")
    )
    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")
    )
}
dummy_results <- .generate_accessor_example_results()

# Extract the full analysis table
head(analysisTable(dummy_results))
#>              logFC P.Value
#> chr1:1-100       2    0.01
#> chr1:101-200    -2    0.01

# Extract regions enriched in condition 1
head(enrichedCond1(dummy_results))
#>            logFC P.Value
#> chr1:1-100     2    0.01

# Extract regions enriched in condition 2
head(enrichedCond2(dummy_results))
#>              logFC P.Value
#> chr1:101-200    -2    0.01

# Get the condition names
conditionNames(dummy_results)
#> Condition 1 Condition 2 
#>        "C1"        "C2"