saddle: Compartment versus compartment scores

View source: R/saddle.R

saddleR Documentation

Compartment versus compartment scores

Description

Produces a compartment score quantile versus quantile analysis in which observed over expected contacts are compared between the different quantiles of the compartment scores.

Usage

saddle(explist, CS_discovery, bins = 10L, dist_thres = c(-Inf, Inf))

Arguments

explist

Either a single GENOVA 'contacts' object or a list of GENOVA 'contacts' objects.

CS_discovery

A signed 'CS_discovery' produced by the compartment_score function.

bins

An integer of length 1 setting the number of quantiles the comparment score should be divided into.

dist_thres

A numeric of length two noting the lower and upper limit of distances in basepairs to consider. Defaults to c(-Inf, Inf) to include all distances.

Details

Per chromosome arm, compartment scores are divided in quantile bins. Subsequently, the average observed over expected score is calculated for every pairwise combination of bins. The observed over expected score is calculated as the contacts divided by the average of contacts for the same distance from the diagonal.

Choosing a 'bins' of 5 will produce results similar to Flyamer et al. (2007), while setting 'bins' to 100 will produce results similar to Bonev et al. (2017)

Value

A saddle_discovery object with 1 element:

  • saddle, a data.table with the following columns:

    exp

    A character with the sample names from the 'explist' argument.

    chr

    A character with the chromosome names and arms (p or q).

    q1

    An integer giving the first comparment score quantile bin. Lower values indicate smaller compartment scores than higher values.

    q2

    An integer giving the second quantile bin.

    mean

    A numeric with the average observed over expected values at the indicated quantile bins.

Resolution recommendation

The resolution of the 'CS_discovery' object. Either print the object to see the resolution or use attr(CS_discovery, "resolution") for programmatic access.

Examples

## Not run: 
exps <- list(WT_100kb, KO_100kb)

# Computing signed compartment scores
cs <- comparment_score(exps, bed = H3K4me1_peaks)

# Saddle analysis
sadl <- saddle(exps, cs)

# Visualising results
visualise(sadl)

## End(Not run)

robinweide/GENOVA documentation built on March 14, 2024, 11:16 p.m.