get3UTRAPAds: Get 3'UTR APA PACdataset

View source: R/R_funclib_movAPA.r

get3UTRAPAdsR Documentation

Get 3'UTR APA PACdataset

Description

get3UTRAPAds subset a PACdataset to get all PACs of genes with 3'UTR APA sites.

Usage

get3UTRAPAds(
  pacds,
  sortPA = TRUE,
  choose2PA = NULL,
  avgPACtag = 0,
  avgGeneTag = 0,
  clearPAT = 0
)

Arguments

pacds

A PACdataset object.

sortPA

If TRUE, then order PACs by the respective 3'UTR length in each gene.

choose2PA

specify whether and how to choose two PACs when there are >2 PACs. The value can be NULL (use all PACs), PD (choose only proximal and distal sites), farest (choose two PACs that are with the longest distance), most (choose two PACs with the most abundance).

avgPACtag

if >0, then to filter by PAC tag num, >=avgPACtag, see subsetPACds().

avgGeneTag

if >0, then to filter by PAC tag num, >=avgGeneTag, see subsetPACds().

clearPAT

if >0, then to filter by clearPAT, see subsetPACds().

Details

Genes with 3'UTR APA sites are genes with multiple PACs in its 3'UTR. If the column toStop is not in PACds@anno, then will calculate the 3'UTR length first. First filter by paramters like avgPACtag, etc., and then by choose2PA.

Value

A PACdataset with only 3'UTR APA sites. If there is no result, return an empty PACdataset with 0-row @anno and @counts.

See Also

Other PACdataset functions: PACdataset-class, PACds, annotateByPAS(), annotatePAC(), createPACdataset(), get3UTRAPApd(), length(), makeExamplePACds(), mergePACds(), normalizePACds(), plotPACdsStat(), rbind(), readPACds(), removePACdsIP(), scPACds, subscript_operator, summary(), writePACds()

Examples

data(PACds)
## Get all 3'UTR APA
pp1=get3UTRAPAds(PACds,sortPA=TRUE); summary(pp1); is3UTRAPAds(pp1); is3UTRAPAds(PACds)
## Get proximal distal PA
pp1=get3UTRAPAds(PACds, sortPA=TRUE, choose2PA='most');
summary(pp1); is3UTRAPAds(pp1); is3UTRAPAds(PACds); head(pp1@anno)
pp1@anno[pp1@anno$gene=='PH02Gene00018',]

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