View source: R/AnnotateResults.R
| AnnotateResults | R Documentation |
Add annotations to site-specific or region-based analysis
results from function TestAssociations.
AnnotateResults(
results_df,
closeByRegions_gr = NULL,
inputRegions_gr = NULL,
genome = c("hg38", "hg19"),
analysis = c("region-based", "site-specific")
)
results_df |
An output data frame from function
|
closeByRegions_gr |
An output GRanges object from function
|
inputRegions_gr |
A GRanges object for input genomic
regions, defaults to |
genome |
Use |
analysis |
Results type. Defaults to |
A data frame with locations of the genomic sites or regions
(seqnames, start, end, width), annotations for locations
(inputRegion, closeByRegion, symbol), test statistics
(estimate, stdErr or coef, exp_coef, se_coef), pValue
and false discovery rate (fdr).
TransformToGR, AllCloseByRegions,
AllCoeditedRegions, CreateEditingTable,
SummarizeAllRegions, TestAssociations
data(rnaedit_df)
# get GRanges for genes
genes_gr <- TransformToGR(
genes_char = c("PHACTR4", "CCR5", "METTL7A"),
type = "symbol",
genome = "hg19"
)
# find close-by regions within the genes
closebyRegions_gr <- AllCloseByRegions(
regions_gr = genes_gr,
rnaEditMatrix = rnaedit_df
)
# identify co-edited regions within the genes
coedited_gr <- AllCoeditedRegions(
regions_gr = closebyRegions_gr,
rnaEditMatrix = rnaedit_df,
output = "GRanges",
method = "spearman"
)
# summarize editing levels within each gene by maximum
summarizedRegions_df <- SummarizeAllRegions(
regions_gr = coedited_gr,
rnaEditMatrix = rnaedit_df,
selectMethod = MaxSites
)
exm_pheno <- readRDS(
system.file(
"extdata",
"pheno_df.RDS",
package = 'rnaEditr',
mustWork = TRUE
)
)
# test summarized editing levels against survival outcome
results_df <- TestAssociations(
rnaEdit_df = summarizedRegions_df,
pheno_df = exm_pheno,
responses_char = "sample_type",
covariates_char = NULL,
respType = "binary"
)
AnnotateResults(
results_df = results_df,
closeByRegions_gr = closebyRegions_gr,
inputRegions_gr = genes_gr,
genome = "hg19"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.