MarkCoeditedSites {rnaEditr} | R Documentation

## Mark RNA editing sites in contiguous and co-edited region.

### Description

Mark RNA editing sites in contiguous and co-edited region by selecting sites for which `r_drop` values calculated from inner function `CreateRdrop` is greater than `rDropThresh_num`.

### Usage

    MarkCoeditedSites(
      rnaEditCluster_mat,
      rDropThresh_num = 0.4,
      method = c("spearman", "pearson"),
      minEditFreq = 0.05,
      verbose = TRUE
    )

### 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".
`rDropThresh_num` | Threshold for minimum correlation between RNA editing levels of one site and the mean RNA editing levels of the rest of the sites. Please set a number between 0 and 1. Defaults to 0.4.
`method` | Method for computing correlation. Defaults to `"spearman"`.
`minEditFreq` | Threshold for minimum percentage of edited samples for a given site. The `r_drop` value of the sites with frequency lower than `minEditFreq` will be set as NA. Please set a number between 0 and 1. Defaults to 0.05.
`verbose` | Should messages and warnings be displayed? Defaults to TRUE.

### Details

`r_drop` statistic is used to identify co-edited sites. An outlier site (`keep = 0`) in a genomic region typically has low correlation with the rest of the sites in a genomic region. The sites with `r_drop` value greater than `rDropThresh_num` are marked to have `keep = 1`. Please see `CreateRdrop` for more details.

### Value

A data frame with the following columns:

- `site` : site ID.

- `r_drop` : The correlation between RNA editing levels of one site and the mean RNA editing levels of the rest of the sites.

- `keep` : indicator for co-edited sites, The sites with `keep = 1` belong to the contiguous and co-edited region.

- `keep_contiguous` : contiguous co-edited region number

- `site` : site ID.

- `keep` : indicator for co-edited sites, The sites with `keep = 1` belong to the contiguous and co-edited region.

- `ind` : index for the sites.

- `r_drop` : the correlation between RNA editing levels of one site and the mean RNA editing levels of the rest of the sites.

### See Also

`CreateRdrop`

### Examples

      data(t_rnaedit_df)

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

      MarkCoeditedSites(
        rnaEditCluster_mat = exm_data,
        method = "spearman"
      )

[Package rnaEditr version 1.2.0 Index]