annotateByKnownPAC: Annotate a PACdataset with known PACdatasets

annotateByKnownPACR Documentation

Annotate a PACdataset with known PACdatasets

Description

annotateByKnownPAC returns overlapping status and min distance with given PACdatasets.

Usage

annotateByKnownPAC(pacds, knownPACdss, labels, d = 50, verbose = TRUE)

Arguments

pacds

a query PACdataset.

knownPACdss

a PACdataset or a list of PACdatasets.

labels

a character vector storing column names added to pacds. Each PACdataset in knownPACdss will add two columns (labels[i]_ovp, _dist). The length of labels must be 1 or the same as knowPACdss (if it is a list).

d

Distance (nt) allowed from known PACs to pacds.

verbose

print information.

Details

This function is used to validate a PACdataset with other known PAC datasets and calculates the min distance between two PACs.

Value

A PACdataset with columns (labels[i]_ovp, _dist) added.

The _ovp column is 0/1 denoting whether a PAC in pacds is overlapping with knowPACdss.

The _dist column is NA (no overlapping) or a integer denoting the min distance between a PAC in pacds and the overlapped PAC in knownPACdss.

Examples

data(PACds); pacds=PACds
knownPACdss=list(pacds[1:500], pacds[500:1000])
p2=annotateByKnownPAC(pacds, knownPACdss, labels=c('test1','test2'))
summary(p2@anno$test2_dist)

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