SingleCloseByRegion: Extracts clusters of RNA editing sites located closely in a...

Description Usage Arguments Details Value Examples

View source: R/SingleCloseByRegion.R

Description

Extracts clusters of RNA editing sites located closely in an input genomic region.

Usage

1
SingleCloseByRegion(region_df, rnaEditMatrix, maxGap = 50, minSites = 3)

Arguments

region_df

A data frame with the input genomic region. Please make sure columns seqnames, start, and end are included in the data frame.

rnaEditMatrix

A matrix (or data frame) of RNA editing level values for individual sites, with row names as site IDs in the form of "chrAA:XXXXXXXX", and column names as sample IDs. Please make sure to follow the format of example dataset (data(rnaedit_df)).

maxGap

An integer, genomic locations within maxGap from each other are placed into the same cluster. Defaults to 50.

minSites

An integer, minimum number of edited sites for a cluster to be selected for output. Defaults to 3.

Details

The algorithm of this function is based on the clusterMaker function in the bumphunter R package. Each cluster is essentially a group of sites such that two consecutive sites in the cluster are separated by less than maxGap.

Value

A GRanges object containing genomic locations of RNA editing sites located closely within the single input pre-defined genomic region.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
  data(rnaedit_df)
  
  exm_region <- data.frame(
    seqnames = "chr1",
    start =  28691093,
    end = 28826881, 
    stringsAsFactors = FALSE
  )
  
  SingleCloseByRegion(
    region_df = exm_region,
    rnaEditMatrix = rnaedit_df,
    maxGap = 50,
    minSites = 3
  )  
  

rnaEditr documentation built on Nov. 8, 2020, 8:26 p.m.