View source: R/compartment_score.R
compartment_score | R Documentation |
compartment_score
calculates a compartment score per chromosome arm.
compartment_score(explist, ev = 1, bed = NULL, bedgraph = NULL, ref = 1)
explist |
Either a single GENOVA |
ev |
An |
bed |
A |
bedgraph |
A |
ref |
An |
The produre is based on the algorithm of G. Fudenberg, which performs an eigenvector decomposition of the observed / expected matrix minus one. Centromeres will be skipped.
A CS_discovery
object with 1 element.
compart_scores
, a data.frame
with the following columns:
chrom
A character
with chromosome names.
start
An integer
with start positions in the
chromosome.
end
An integer
with end positions in the chromosome.
bin
An integer
giving the index of the genomic
position.
A numeric
, the calculated compartment score
for the first 'explist
' entry. Column name is eponymous with entries
in 'explist
'.
A numeric
, the calculated
compartment scores for subsequent 'explist
' entries.
100kb-150kb. Data with <20kb resolution will return an error due to sparsity.
When the 'bed
' or 'bedgraph
' arguments are both
NULL
, the function returns an unsigned CS_discovery
object
with the attribute 'signed = FALSE
'. Signing the compartment scores
is necessary to have positive values correspond to more active A
compartments and negative values to more inactive B compartments.
sign_compartmentscore
for getting signed
compartment scores and appropriate 'bed
'. and 'bedgraph
'
arguments.
## Not run:
# Proper compartment scores
cs <- compartment_score(list(WT_100kb, KO_100kb), bed = H3K4me1_peaks)
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.