Learn R Programming

HiCociety (version 0.1.39)

calculate_avg_count: Calculate Average Count within 5-pixel Padding

Description

This function calculates the average count within a 25kb padding around each (x, y) coordinate pair.

Usage

calculate_avg_count(x, y, counts, resol)

Value

A numeric vector of average counts.

Arguments

x

Numeric vector of x-coordinates of contact frequency data frame.

y

Numeric vector of y-coordinates of contact frequency data frame.

counts

Numeric vector of contact frequency counts.

resol

Integer specifying the HiC resolution.

Examples

Run this code
x <- c(1, 2, 3, 4, 5)
y <- c(1, 2, 3, 4, 5)
counts <- c(10, 20, 30, 40, 50)
resol <- 10000
calculate_avg_count(x, y, counts, resol)

Run the code above in your browser using DataLab