GetSitesLocations: Extract RNA editing sites located in a genomic region.

View source: R/util_GetSitesLocations.R

GetSitesLocationsR Documentation

Extract RNA editing sites located in a genomic region.

Description

Extract and order RNA editing sites located within an input genomic region.

Usage

GetSitesLocations(
  region_df,
  rnaEditMatrix,
  output = c("locationsOnly", "locationsAndValues")
)

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 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)).

output

Type of output data. Defaults to "locationsOnly".

Value

When output is set to "locationsOnly", a data frame of extracted and ordered RNA editing sites with columns chr and pos will be returned.

When output is set to "locationsAndValues", a data frame of RNA editing level values from the extracted and ordered sites will be returned. Please note that site IDs will be in row names of the output data frame.

Examples

  data (rnaedit_df)
  
  exm_region <- data.frame(
     seqnames = "chr1",
     start =  28000000,
     end = 28826881, 
     stringsAsFactors = FALSE
  )
  
  GetSitesLocations(
     region_df = exm_region,
     rnaEditMatrix = rnaedit_df,
     output = "locationsOnly"
  )[1:3, ]
   

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