mergePACds: Merge multiple PACdatasets

Description Usage Arguments Details Value See Also Examples

Description

mergePACds groups nearby PACs from single/multiple PACdataset objects.

Usage

1
mergePACds(PACdsList, d=24)

Arguments

PACdsList

a PACdataset, or a list of multiple PACdataset objects. The PACds@anno should have columns chr/strand/coord. If there is no colData in PACds, then the sample label will be set as groupN. If PACdsList is a PACdataset, then will treat it as PA and group nearby PAs into PACs.

d

distance to group nearby PACds, default is 24 nt.

Details

This function is particularlly useful for grouping nearby cleavage sites into PACs. It is also useful When you have multiple PA or PAC files, each file is from one sample. Then you need to merge these PACds into one PACds for DE or other analyses. But after grouping and/or merging, you may need call annotatePAC to annotate the merged PACs by a GFF annotation.

Value

A merged PACdataset. The counts slot stores counts of merged samples. If sample names from different PACdataset objects are duplicated, then will be set as .x,.y. The colData slot stores the merge sample annotation from the first column of each @colData. The anno slot contains these columns: chr, strand, coord, tottag, UPA_start, UPA_end, nPA, maxtag.

See Also

[annotatePAC()] to annotate a PACdataset; [rbind()] to combine multiple PACdatasets of the same format.

Other PACdataset functions: get3UTRAPAds(), readPACds()

Examples

1
2
3
4
5
6
7
8
9
## Group PA into PACs
data(PACds)
PACds@counts=rbind(PACds@counts, PACds@counts)
PACds@anno=rbind(PACds@anno, PACds@anno)
ds=mergePACds(PACds, d=24)
## merge two PACds
ds1=makeExamplePACds()
ds2=makeExamplePACds()
ds=mergePACds(list(ds1, ds2), d=24)

XHWUlab/PolyAtailor documentation built on Dec. 28, 2021, 12:13 a.m.