Skip to contents

Perform ASE diff analysis using edgeR.

Usage

run_ase_diff_analysis(
  x,
  test_nom,
  test_denom,
  test_factor = "condition",
  cutoff_lfc = 1,
  cutoff_pval = 0.05,
  cutoff_padj = 0.01,
  regul_based_upon = 1,
  n_thread = 1,
  ...
)

Arguments

x

an object of class NxtSe.

test_nom

// TO DO

test_denom

// TO DO

test_factor

refer to the argument test_factor in SpliceWiz::ASE_edgeR().

cutoff_lfc

minimal threshold for log2fold change, default 1 (2 fold).

cutoff_pval

minimal threshold for pvalue, default 0.05. P-value threshold will be applied only when regul_based_upon is either 1 or 3.

cutoff_padj

minimal threshold for Padj, default 0.01. Padj threshold will be applied only when regul_based_upon is either 2 or 3.

regul_based_upon

one of the numeric choices 1, 2, or 3. Default 1 i.e. categorized diff. ASE by pvalue and log2fc.

if 1 ...

  • Up : log2fc >= cutoff_lfc & pvalue <= cutoff_pval

  • Down : log2fc <= (-1) * cutoff_lfc & pvalue <= cutoff_pval

  • Other : remaining genes

if 2 ...

  • Up : log2fc >= cutoff_lfc & padj <= cutoff_padj

  • Down : log2fc <= (-1) * cutoff_lfc & padj <= cutoff_padj

  • Other : remaining genes

if 3 ...

  • Up : log2fc >= cutoff_lfc & pvalue <= cutoff_pval & padj <= cutoff_padj

  • Down : log2fc <= (-1) * cutoff_lfc & pvalue <= cutoff_pval & padj <= cutoff_padj

  • Other : remaining genes

n_thread

an integer, default 1, denoting number of threads to use for multitasking.

...

Other parameters passed to SpliceWiz::ASE_edgeR().

Value

an object of class parcutils_se.

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)
run_ase_diff_analysis(x = se, test_factor = "treatment", test_nom = "A" ,test_denom = "B",  IRmode ="annotated")
#> Aug 16 11:35:53 Performing edgeR contrast for included / excluded counts separately
#> Aug 16 11:35:55 Performing edgeR contrast for included / excluded counts together
#> ┌───────────────────────────────────┐
#> │                                   │
#>Summary of ASE diff. analysis
#> │                                   │
#> └───────────────────────────────────┘
#> 
#> Total number of comparison: 1
#> Total number of ASE used for diff. analysis:
#> 
#> Diff. ASE counts by comparison...
#> 
#> A_VS_B 
#>number of up genes   : 3.
#>number of down genes : 0.
#> ──────────────────────────────
#> 
run_ase_diff_analysis(x = se, test_factor = "treatment", test_nom = "A" ,test_denom = "B",  IRmode ="annotated",  cutoff_lfc = 0.6, cutoff_padj = 1, regul_based_upon = 2, n_thread = 2  )
#> Aug 16 11:36:15 Performing edgeR contrast for included / excluded counts separately
#> Aug 16 11:36:17 Performing edgeR contrast for included / excluded counts together
#> Warning: UNRELIABLE VALUE: Future (‘<none>’) unexpectedly generated random numbers without specifying argument 'seed'. There is a risk that those random numbers are not statistically sound and the overall results might be invalid. To fix this, specify 'seed=TRUE'. This ensures that proper, parallel-safe random numbers are produced via the L'Ecuyer-CMRG method. To disable this check, use 'seed=NULL', or set option 'future.rng.onMisuse' to "ignore".
#> ┌───────────────────────────────────┐
#> │                                   │
#>Summary of ASE diff. analysis
#> │                                   │
#> └───────────────────────────────────┘
#> 
#> Total number of comparison: 1
#> Total number of ASE used for diff. analysis:
#> 
#> Diff. ASE counts by comparison...
#> 
#> A_VS_B 
#>number of up genes   : 27.
#>number of down genes : 33.
#> ──────────────────────────────
#>