site.merge {DBChIP} | R Documentation

## Cluster close-by sites into consensus sites

### Description

Cluster close-by sites into consensus sites through agglomerative (bottom-up) hierarchical clustering.

### Usage

    site.merge(bs.list, in.distance = 100, out.distance = 250)

### Arguments

`bs.list` | internal format of binding site. Result of `read.binding.site.list`.
`in.distance` | within cluster distance. If the distance between centroids of two clusters are smaller than this value, the clusters will be merged into one. Default value 100 bp.
`out.distance` | out of cluster distance. If the distance between centroids of two clusters are larger than this value, they are considered different binding sites. Default value 250 bp.

### Details

We group predicted locations from multiple conditions into clusters of close-by locations by using agglomerative (bottom-up) hierarchical clustering with centroid linkage.

If the distance between centroids of two clusters are between `in.distance` and `out.distance`, the cluster with higher weight will be kept.

### Value

A list where each element represents a chromosome. Within each chromosome, it is a data.frame with following fields

`pos` | consensus binding position.
`nsig` | number of significant original binding sites that are merged into consensus site.
`origin` | the origin of merged binding sites.
`ori.pos` | the original positions of merged binding sites. The consensus position is a weighted average of original positions.

### See Also

`DBChIP`

[Package DBChIP version 1.31.0 Index]