GetMinPairwiseCor {rnaEditr} | R Documentation

## Calculate minimum pairwise correlation for sub-regions.

### Description

Filter the contiguous co-edited subregions found from `FindCorrelatedRegions`, by calculating pairwise correlations and then selecting subregions passing the minimum correlation filter.

### Usage

    GetMinPairwiseCor(
      rnaEditCluster_mat,
      minPairCorr = 0.1,
      probes_ls,
      method = c("spearman", "pearson")
    )

### Arguments

`rnaEditCluster_mat` | A matrix of RNA editing level values on individual sites, with row names as sample IDs and column names as site IDs in the form of "chrAA:XXXXXXXX".
`minPairCorr` | Minimum pairwise correlation coefficient of sites within a cluster, used as a filter. To use this filter, set a number between -1 and 1 (defaults to 0.1). To turn it off, please set the number to -1.
`probes_ls` | A list of regions with sites. Please note that probes in each list need to be ordered by their locations.
`method` | Method for computing correlation. Defaults to `"spearman"`.

### Value

A list with a list of probes passing the minPairCorr and a data frame with the following columns:

- `subregion` : index for each output contiguous co-edited region.

- `keepminPairwiseCor` : indicator for contiguous co-edited subregions, The regions with `keepminPairwiseCor = 1` passed the minimum correlation and will be returned as a contiguous co-edited subregion.

- `minPairwiseCor` : the minimum pairwise correlation of sites within a subregion.

### Examples

      data(t_rnaedit_df)

      ordered_cols <- OrderSitesByLocation(
        sites_char = colnames(t_rnaedit_df),
        output = "vector"
      )
      exm_data <- t_rnaedit_df[, ordered_cols]

      exm_sites <- list(
        "1" = c("chr1:28661656", "chr1:28661718", "chr1:28662148")
      )

      GetMinPairwiseCor(
        rnaEditCluster_mat = exm_data,
        minPairCorr = 0.1,
        probes_ls = exm_sites,
        method = "spearman"
      )

[Package rnaEditr version 1.2.0 Index]