get_ASE_by_regulation: Get Alternate Splice Events based on their differential...

View source: R/splicewiz_wrappers.R

get_ASE_by_regulationR Documentation

Get Alternate Splice Events based on their differential regulation.

Description

Get Alternate Splice Events based on their differential regulation.

Usage

get_ASE_by_regulation(
  x,
  sample_comparisons,
  regulation = "both",
  event_type = NULL,
  simplify = FALSE
)

get_ASEsets_by_regulation(
  x,
  sample_comparisons,
  regulation = "both",
  event_type = NULL
)

Arguments

x

an abject of class "parcutils_ase". This is an output of the function run_ase_diff_analysis().

sample_comparisons

a character vector denoting sample comparisons for which ASE to be obtained.

regulation

a character string, default both. Values can be one of the up, down, both, other, all.

  • up : returns all up regulated ASE.

  • down : returns all down regulated ASE

  • both : returns all up and down regulated ASE.

  • other : returns ASE other than up and down regulated ASE.

  • all : returns all ASE.

event_type

a character string denoting event type for which one of the up, down, both, other or all events to be returned based. Choices are: IR, SE, AFE, ALE, A3SS, A5SS and MXE. Default NULL, uses all event types.

simplify

logical, default FALSE, if TRUE returns result in a dataframe format.

Details

For a given differential comparison this function returns up, down, both, other and all ASE.

Value

a list or dataframe.

Examples

se <- SpliceWiz::SpliceWiz_example_NxtSE(novelSplicing = TRUE)
SpliceWiz::colData(se)$treatment <- rep(c("A", "B"), each = 3)
SpliceWiz::colData(se)$replicate <- rep(c("P","Q","R"), 2)

res <- run_ase_diff_analysis(x = se, test_factor = "replicate", test_nom = c("P","Q","R") ,test_denom = c("Q","R","P"),  IRmode ="annotated",  cutoff_lfc = 0.6, cutoff_pval = 1, regul_based_upon = 1)

# get both up and down regulated genes
get_ASE_by_regulation(x = res, sample_comparisons = c("P_VS_Q")) %>% head()

# get up genes only
get_ASE_by_regulation(x = res, sample_comparisons = c("P_VS_Q") , regul = "up") %>% head()

# get SE events
get_ASE_by_regulation(x = res, sample_comparisons = c("P_VS_Q") , regul = "down",event_type = "SE") %>% head()

# get genes other than up and down
get_ASE_by_regulation(x = res, sample_comparisons = c("P_VS_Q") , regul = "other") %>% head()

# Simplify output for multiple sample comparisons
get_ASE_by_regulation(x = res, sample_comparisons = res$de_comparisons, simplify = TRUE, regul= "both",event_type = "IR")


# get genesets by regulation. It uses sample comparison and regulation to name each output geneset.

get_ASEsets_by_regulation(x = res, sample_comparisons = "P_VS_Q", regul = "both")


cparsania/parcutils documentation built on Oct. 27, 2024, 4:55 a.m.