corrAnalyze | R Documentation |
Finds the pairwise correlation in signal around gold-standard R-Loop sites between the query sample and the coverage tracks in the RLBase database. See details.
corrAnalyze(object, force = FALSE)
object |
An RLRanges object. |
force |
Force |
Currently, this does not work on windows.
The corrAnalyze
function performs a correlation test that can
be used to assess sample-sample similarity by calculating coverage signal
(from genomic alignments) around “gold standard”
R-loop sites (PMID: 33411340).
The resulting correlation matrix is useful for determining how well a
supplied sample correlates with previously-published datasets.
During the RLBase-data workflow, the signal for each R-loop mapping sample within “gold standard” R-loop sites was calculated see RLHub::gs_signal.
The corrAnalyze
function loads RLHub::gs_signal and accepts an RLRanges
object with a valid coverage slot. It then does the following:
The coverage is quantified within the “gold standard” sites and added as a column to the signal matrix from RLHub::gs_signal.
Then, the stats::cor function is used to calculate the Pearson correlation pairwise between all samples, yielding a correlation matrix
Finally, the correlation matrix is stashed in the in the
correlationMat
slot of the RLResults and returned.
An RLRanges object with correlation results included as a matrix
.
The correlation matrix is accessed via
rlresults(object, "correlationMat")
.
# Example RLRanges object rlr <- readRDS(system.file("extdata", "rlrsmall.rds", package = "RLSeq")) # corrAnalyze does not work on Windows OS if (.Platform$OS.type != "windows") { # run corrAnalyze rlr <- corrAnalyze(rlr) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.