plotPACdsStat: Plot movStat results

View source: R/R_funclib_movAPA.r

plotPACdsStatR Documentation

Plot movStat results

Description

plotPACdsStat plots the results from movStat(PACdataset).

Usage

plotPACdsStat(pstats, pdfFile = NULL, minPAT = NULL, conds = NULL, ...)

Arguments

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.

Details

Output plots are barplots with facet of minPAT.

Value

NULL. Output to text file and/or print the plots to a device.

See Also

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()

Examples


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))

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