movAPAindexDiff: Get APA index difference between conditions

movAPAindexDiffR Documentation

Get APA index difference between conditions

Description

movAPAindexDiff calculates APA index difference between conditions by different metrics.

Usage

movAPAindexDiff(
  PACds,
  group,
  method,
  doReps = "avg",
  choose2PA = NULL,
  RUD.includeNon3UTR = FALSE,
  clearPAT = 0,
  nPermute = 0
)

Arguments

PACds

a PACdataset.

group

a sample group name to get all conditions under the group.

method

can be WUL, RUD, SLR.

  • "WUL": Weighted UTR length (Jia 2017; Ultisky) (3UTRAPA, choose2PA=NULL/PD/MOST)

  • "RUD": Relative Usage of Distal Poly(A) Sites (Ji 2009) (3UTRAPA with/without non-3UTR PACs, choose2PA=NULL/PD/MOST)

  • "SLR": short to long ratio (Begik 2017) (3UTRAPA, choose2PA=PD/most). Similar to RUD (relative expression difference) (W Li 2015; Arefeen 2018). RED is equivalent to divide the SLR index but just choose PD/most PA.

  • "RS": Patrick et al. 2016, sum(abs_ratio/2) (3UTRAPA if choose2PA!=null; allAPA if =NULL)

doReps

Can be 'avg' or 'pool' to merge replicates.

choose2PA

can be NULL, PD (proximal, distal, farest), most (most abundant two PAs).

RUD.includeNon3UTR

only used when method=RUD, to use all PA or just 3UTR PA.

clearPAT

set PAC counts to 0 when it is < clearPAT. First call movAPAindex(clearPAT), if method=RS then subsetPACds(clearPAT). If doReps!=NULL, then first doReps, and then filter by clearPAT.

nPermute

If >0, then will get pvalue by bootstraping. nPermute>0 must be with choose2PA=PD or MOST, because pvalue can be obtained for only two PACs.

Details

This function is different from APAswitching/UTR_trend. It does not filter PACds by cond1/2 but for all conditions. So there might be NaN/Inf for some condition pairs when some PACs are not expressed in two specific condtions but expressed in other conds.

Value

A data frame with columns being condition pairs like [cond1.cond2], and values are log2(index1/index2).

See Also

Other comparison functions: movAPAindex(), movAPAswitch(), movDEGene(), movDEPAC(), movPAindex(), movUTRtrend(), plotCummPAindex()

Examples

data(PACds)
## RED + only for PD
diff=movAPAindexDiff(PACds, group='len', method="SLR", choose2PA="PD", RUD.includeNon3UTR=FALSE)
## RS+only for PD
diff=movAPAindexDiff(PACds, group='len', method="RS", choose2PA="PD")
## Get pvalue
geneSLRsig=movAPAindexDiff(PACds, group='len', method='SLR',
                          choose2PA="PD", doReps='avg', clearPAT=0, nPermute=10)

BMILAB/movAPA documentation built on Jan. 3, 2024, 11:09 p.m.