AllCloseByRegions: Extract clusters of RNA editing sites located closely in...

View source: R/AllCloseByRegions.R

AllCloseByRegionsR Documentation

Extract clusters of RNA editing sites located closely in genomic regions.

Description

A wrapper function to extract clusters of RNA editing sites that are located closely in genomic regions.

Usage

AllCloseByRegions(
  regions_gr,
  rnaEditMatrix,
  maxGap = 50,
  minSites = 3,
  progressBar = "time"
)

Arguments

regions_gr

A GRanges object of input genomic regions.

rnaEditMatrix

A matrix (or data frame) of RNA editing level values on 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 RNA editing sites within each resulting cluster. Defaults to 3.

progressBar

Name of the progress bar to use. There are currently five types of progress bars: "time", "none", "text", "tk", and "win". Defaults to "time". See create_progress_bar for more details.

Details

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

Value

A GRanges object containing genomic regions of RNA editing sites located closely within each input pre-defined genomic region.

See Also

TransformToGR, AllCoeditedRegions, CreateEditingTable, SummarizeAllRegions, TestAssociations, AnnotateResults

Examples

  data(rnaedit_df)
  
  exm_regions <- TransformToGR(
    genes_char = c("PHACTR4", "CCR5", "METTL7A"),
    type = "symbol",
    genome = "hg19"
  )
  
  AllCloseByRegions(
    regions_gr = exm_regions,
    rnaEditMatrix = rnaedit_df,
    maxGap = 50,
    minSites = 3,
    progressBar = "time"
  )  
   

TransBioInfoLab/rnaEditr documentation built on Nov. 29, 2022, 3:31 p.m.