sign_compartmentscore: Sign compartment score.

View source: R/compartment_score.R

sign_compartmentscoreR Documentation

Sign compartment score.

Description

Takes pre-computed eigenvectors per chromosome arm and adjust the sign based on metrics of active chromatin.

Usage

sign_compartmentscore(
  CS_discovery,
  bed = NULL,
  bedgraph = NULL,
  verbose = FALSE,
  ref = 1
)

Arguments

CS_discovery

A CS_discovery object as produced by the compartment_score function.

bed

A data.frame with 3 columns in BED format, containing peaks of active chromatin marks. Mutually exclusive with the 'bedgraph' argument.

bedgraph

A data.frame with 4 columns in bedGraph format, containing scores correlated with active chromatin. Mutually exclusive with the 'bed' argument.

verbose

A logical of length 1. If TRUE, reports when 'bedgraph' correlations are weak or uncomputable.

ref

An integer of length 1 giving a sample index that can be used as a reference. Set to NULL to sign every sample individually.

Details

Signing compartment scores is necessary to have the compartment scores correspond to A and B compartments.

Some decent 'bed'/'bedgraph' arguments to use are ChIP-seq peaks of H3K4me1, gene density, (inverted) Lamina DamID signal, GC content or early replication timing metrics.

Value

A CS_discovery object with signed attribute set to TRUE

See Also

compartment_score for computing the eigenvectors.

Examples

## Not run: 
# Doing the eigenvector decomposition only yields unsigned scores
cs <- compartment_score(list(WT_100kb, KO_100kb))

# Signing the scores
cs <- sign_compartmentscore(cs, bed = H3K4me1_peaks)

## End(Not run)

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