Learn R Programming

bPeaks (version 1.2)

baseLineCalc: Function to calculate the average number of reads mapped on each nucleotide in a genome

Description

This function calculates the mean genome-wide read depth.

Usage

baseLineCalc(covData)

Arguments

covData
A vector with the numbers of sequences aligned at each genomic position to be considered in the analysis

Value

The average number of reads mapped on each nucleotide in the genome.

Details

This function adds the numbers of sequences observed at each position and divides this number by the genome size (total number of nucleotides).

References

http://bpeaks.gene-networks.net/

See Also

bPeaksAnalysis

Examples

Run this code
# get library
library(bPeaks)

# get PDR1 data
data(dataPDR1)

# mean genome-wide read depth in IP data
meanIPcov = baseLineCalc(dataPDR1$IPdata[,3])
print(meanIPcov)

# mean genome-wide read depth in control data
meanContCov = baseLineCalc(dataPDR1$controlData[,3])
print(meanContCov) 

Run the code above in your browser using DataLab