removePACdsIP: Remove internal priming.

removePACdsIPR Documentation

Remove internal priming.

Description

removePACdsIP removes internal priming artificats from a PACdataset object.

Usage

removePACdsIP(
  PACds,
  bsgenome,
  returnBoth = TRUE,
  up = -10,
  dn = 10,
  conA = NA,
  sepA = NA,
  ipGrams = NA,
  chrCheck = TRUE
)

Arguments

PACds

a PACdataset.

bsgenome

a BSGenome/FaFile to get chromosome sequences. The PACds@anno$chr should all be in bsgenome$seqnames.

returnBoth

If TRUE, then return a list(real, ip), otherwise return only the real PACds.

up

the start position of the window to scan, see faFromPACds().

dn

the end position of the window to scan, see faFromPACds(). If up=-10 and dn=10 then will scan the [-10, 0, +10] window (21 nt). If up=-10 and dn=-1 then will scan the [-10, -1] window (10 nt, not including the PA pos).

conA

the number of continuous As in a window to define IP. Default is NA.

sepA

the number of total As in a window to define IP. Default is NA, which means not considering total As.

ipGrams

the grams to define IP. Default is NA. If any one gram in ipGrams is located within [up, dn] region then it is IP.

chrCheck

if TRUE, then all chr in PACds should be in bsgenome, otherwise will ignore those non-consistent chr rows in PACds.

Details

If there are continuous [conA] As or at least >=[sepA] As or at least one [ipGrams] in the [up, dn] window of a PAC, then it is considered as IP.

Value

Dependent on returnBoth.

See Also

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

Examples

data(PACds)
library("BSgenome.Oryza.ENSEMBL.IRGSP1")
bsgenome <- BSgenome.Oryza.ENSEMBL.IRGSP1
## remove internal priming within -140 ~ +10 of PA, without considering total A#
removePACdsIP(PACds, bsgenome, returnBoth=TRUE, up=-140, dn=10, conA=6, sepA=NA)
## remove internal priming within -10 ~ +10 of PA, if there is any AAAAAA or total 7 As.
removePACdsIP(PACds, bsgenome, returnBoth=TRUE, up=-10, dn=10, conA=6, sepA=7)
## remove internal priming within -10 ~ +10 of PA, if there is any one ipGrams.
removePACdsIP(PACds, bsgenome, returnBoth=TRUE, up=-5, dn=10,
             ipGrams=c('AAAA', 'AGAA', 'AAGA', 'AAAG'))

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