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)

Arguments

object

An RLRanges object.

force

Force corrAnalyze to run, even if on Windows. Default: FALSE.

Value

An RLRanges object with correlation results included as a matrix. The correlation matrix is accessed via rlresults(object, "correlationMat").

Details

Currently, this does not work on windows.

Method

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:

  1. The coverage is quantified within the “gold standard” sites and added as a column to the signal matrix from RLHub::gs_signal.

  2. Then, the stats::cor function is used to calculate the Pearson correlation pairwise between all samples, yielding a correlation matrix

  3. Finally, the correlation matrix is stashed in the in the correlationMat slot of the RLResults and returned.

Examples


# 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)
}
#> see ?RLHub and browseVignettes('RLHub') for documentation