Learn R Programming

GreyListChIP (version 1.4.0)

countReads-methods: Count reads from a BamFile

Description

Given the tiling of the genome created when the GreyList object was created (or replaced via getKaryotype), count reads overlapping the bins, in preparation for estimating the threshold for grey-listing bins.

Usage

countReads(obj,bamFile)

Arguments

obj
A GreyList object on which to count reads.
bamFile
A BamFile from which to count reads.

Value

GreyList object, with added counts.

Details

This method counts reads contained within the bins that make up the genome tiling. Bins are overlapping (by default 1Kb bins at 512b intervals) so reads are counted once for each bin that wholly contains them.

See Also

GreyList, BamFile

Examples

Run this code
# Load a pre-built GreyList object.
data(greyList)

path <- system.file("extra", package="GreyListChIP")
## Not run: fn <- file.path(path,"sample_chr21.bam")
## Not run: gl <- countReads(gl,fn)

Run the code above in your browser using DataLab