movAPAindexDiff | R Documentation |
movAPAindexDiff calculates APA index difference between conditions by different metrics.
movAPAindexDiff(
PACds,
group,
method,
doReps = "avg",
choose2PA = NULL,
RUD.includeNon3UTR = FALSE,
clearPAT = 0,
nPermute = 0
)
PACds |
a PACdataset. |
group |
a sample group name to get all conditions under the group. |
method |
can be WUL, RUD, SLR.
|
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. |
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.
A data frame with columns being condition pairs like [cond1.cond2], and values are log2(index1/index2).
Other comparison functions:
movAPAindex()
,
movAPAswitch()
,
movDEGene()
,
movDEPAC()
,
movPAindex()
,
movUTRtrend()
,
plotCummPAindex()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.