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

Description Usage Arguments Value Examples

View source: R/util_GetSitesLocations.R

Description

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

Usage

1
2
3
4
5
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
  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, ]
   

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