View source: R/R_funclib_movAPA.r
plotPACdsStat | R Documentation |
plotPACdsStat plots the results from movStat(PACdataset).
plotPACdsStat(pstats, pdfFile = NULL, minPAT = NULL, conds = NULL, ...)
pstats |
a list from movStat(PACdataset). Each item in the list is a data frame, including columns [nPAC nPAT nGene nAPAgene APAextent 3UTR_nPAT 5UTR_nPAT AMB_nPAT CDS_nPAT intron_nPAT 3UTR_nPAC 5UTR_nPAC AMB_nPAC CDS_nPAC intron_nPAC] |
pdfFile |
If not NULL, then print to pdfFile. |
minPAT |
min number of PATs to filter PACs with expression levels >= minPAT, values like NULL/5/c(1,5,10) |
conds |
conditions to make statistics, values like NULL / c('0400','1200') / 'total'. All conds will be in one plot. |
... |
Dot arguments passing to other functions. |
Output plots are barplots with facet of minPAT.
NULL. Output to text file and/or print the plots to a device.
movStat
to get statistical results.
Other PACdataset functions:
PACdataset-class
,
PACds
,
annotateByPAS()
,
annotatePAC()
,
createPACdataset()
,
get3UTRAPAds()
,
get3UTRAPApd()
,
length()
,
makeExamplePACds()
,
mergePACds()
,
normalizePACds()
,
rbind()
,
readPACds()
,
removePACdsIP()
,
scPACds
,
subscript_operator
,
summary()
,
writePACds()
data(PACds)
## To make statistics of distributions of PACs for each sample, first we pooled replicates.
PACds1=subsetPACds(PACds, group='group', pool=TRUE)
head(PACds@counts)
head(PACds1@counts)
## Make statistics of distribution of PACs using different PAT cutoffs.
## minPAT=5 means that only PACs with >=5 reads are used for statistics.
pstats=movStat(PACds1, minPAT=c(1, 5, 10, 20, 50, 60), ofilePrefix=NULL)
names(pstats)
pstats$pat10
## Plot statistical results by barplots: PAC#, PAT#, APA gene%, PAC%,
## PAT% across samples and genomic regions.
## Plot all statistical results with all cutoffs,
## with each plot having six smaller plots corresponding to the six cutoffs.
plotPACdsStat(pstats, pdfFile='PACds_stat.pdf', minPAT=c(5,10))
## Plot specific cutoffs and conditions.
plotPACdsStat(pstats, pdfFile='PACds_stat_anther_embryo.pdf',
minPAT=c(5,10), conds=c('anther','embryo'))
## Plot the overall distributions using pooled samples (total) and two cutoffs.
plotPACdsStat(pstats, pdfFile='PACds_stat_total.pdf',
minPAT=c(5,10), conds=c('total'))
## Plot the overall distributions using pooled samples (total) and one cutoff.
plotPACdsStat(pstats, pdfFile='PACds_stat_total_PAT10.pdf',
minPAT=c(10), conds=c('total'))
## Plot to the current device, but just the last plot will be shown.
plotPACdsStat(pstats, pdfFile=NULL, minPAT=c(5,10))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.