movAPAswitch | R Documentation |
movAPAswitch analyzes APA site switching for genes with both canonical and non-canonical APA sites. It performs analyses for all condition pairs of the given group. If you only need a specific condition pair, call subsetPACds first to filter used conditions.
movAPAswitch(
PACds,
group,
avgPACtag = 5,
avgGeneTag = 10,
only3UTR = FALSE,
mergeReps = "pool",
aMovDEPACRes = NULL,
DEPAC.padjThd = NULL,
nDEPAC = NULL,
mindist = 50,
fisherThd = 0.1,
logFCThd = 1,
cross = FALSE,
selectOne = NULL
)
PACds |
a PACdataset. |
group |
a sample group name to get all conditions under the group. |
avgPACtag |
filter PACs with average tag number between cond1-cond2 >= avgPACtag. |
avgGeneTag |
the same as avgPACtag but for gene. |
only3UTR |
If TRUE, then first filter 3UTR PACs. |
mergeReps |
pool or avg replicates of the same condition, default is pool. |
aMovDEPACRes |
an object of movDEPACRes to get DE PAC results. If nDEPAC>0, should provide. |
DEPAC.padjThd |
to filter DE PACs with padj<DEPAC.padjThd. |
nDEPAC |
can be NULL (0), 1 or 2, denoting that the switching pair has 0, 1 or 2 DE PACs. if nDEPAC>0 then should provide aMovDEPACRes. |
mindist |
the min distance between two PACs to be considered for switching analyses. |
fisherThd |
used to filter DE PAC list from DE/DEX method by pvalue<fisherThd. |
logFCThd |
used to filter |rcij| >=logFCThd, where |rcij| is the log2(ratio of PA1 between two samples/ratio of PA2). |
cross |
Whether the change of ratio should be crossing for PA1 and PA2. |
selectOne |
can be 'farest','logFC','fisherPV' to output only one switching pair if a gene has multiple switching pairs. |
This function is similar to movUTRtrend(method=DE/DEX), but it can be used for non-3'UTR PACs. If nDEPAC>0, then first get DE PACs from aMovDEPACRes. For genes with more than two PACs, each pair of PACs with distance>=mindist is computed for switching. If a pair of PACs meets the following criteria, then it is switching: (1) DEPAC# (by DEPAC.padjThd) >= nDEPAC; (2) Pvalue of the Fisher's text of the two PACs between conditions < fisherThd; (3) |Relative usage (RU)| of the two PACs between conditions >=logFCThd; Given PAi and PAj between samples A and B, RU=log2(ejB/ejA)-log2(eiB/eiA) (4) If cross=T, then expression levels of the two PACs are switched between conditions.
An object of movAPASwitchRes similar to movUTRTrendRes.
Other comparison functions:
movAPAindexDiff()
,
movAPAindex()
,
movDEGene()
,
movDEPAC()
,
movPAindex()
,
movUTRtrend()
,
plotCummPAindex()
# Detect 3UTR APA switching using DEXseq, which is similar to movUTRtrend(method=DEX)
data(PACds)
## First get DE PAC results by DEXseq.
DEXPAC=movDEPAC(PACds, method='DEXseq', group='group', minSumPAT=10)
## Then get 3UTR switching genes, usig selectOne=NULL to detect all pairs of switching PACs.
swDEX=movAPAswitch(PACds, group='group',aMovDEPACRes=DEXPAC,
avgPACtag=5, avgGeneTag=10,
only3UTR=TRUE,
DEPAC.padjThd=0.1, nDEPAC=1,
mindist=50, fisherThd=0.1, logFCThd=0.5, cross=FALSE, selectOne=NULL)
lapply(swDEX@fullList,nrow)
head(swDEX@fullList[["anther.embryo"]])
head(swDEX@pairwise$padj
## Detect APA switching events involving non-3UTR PACs.
## First get DE PAC results by DESeq2 (or DEXseq).
DEXPAC=movDEPAC(PACds, method='DEXseq', group='group', minSumPAT=10)
## Then detect APA switching events,
## using selectOne=NULL to get all pairs of switching PACs.
swDE=movAPAswitch(PACds, group='group',aMovDEPACRes=DEXPAC,
avgPACtag=10, avgGeneTag=20,
only3UTR=FALSE,
DEPAC.padjThd=0.1, nDEPAC=1,
mindist=50, fisherThd=0.1, logFCThd=0.5,
cross=FALSE, selectOne=NULL)
## Stat the switching results.
stat=movStat(object=swDE, padjThd=0.1, valueThd=1)
stat$nsig
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.