tileCount: Perform overlap queries between reads and genome by windows

Description Usage Arguments Value Author(s) Examples

View source: R/tileCount.R

Description

tileCount extends summarizeOverlaps by finding coverage for each fixed window in the whole genome

Usage

1
2
3
tileCount(reads, genome, excludeChrs = c("chrM", "M", "Mt", "MT"),
  windowSize = 50000, step = 10000, mode = IntersectionNotStrict,
  dataOverSamples = FALSE, ...)

Arguments

reads

A GRanges, GRangesList (should be one read per list element), GAlignments, GAlignmentsList, GAlignmentPairs or BamFileList object that represents the data to be counted by summarizeOverlaps. If reads are more than 1 bam files, it should be a vector of character with full path, otherwise current working directory is the default directory.

genome

A BSgenome object from/on which to get/set the sequence and metadata information.

excludeChrs

A vector of string: chromosomes/scaffolds of no interest for NAD analysis. see summarizeOverlaps. default is countByOverlaps, alia of countOverlaps(features, reads, ignore.strand=ignore.strand)

windowSize

numeric(1) or integer(1). Size of the windows.

step

numeric(1) or integer(1). Step of generating silding windows.

mode

One of the pre-defined count methods.

dataOverSamples

logical(1). Data over several samples when use GRangesList as input.

...

Additional arguments passed to summarizeOverlaps.

Value

A RangedSummarizedExperiment object. The assays slot holds the counts, rowRanges holds the annotation from the sliding widows of genome. metadata contains lib.size.chrom for holding chromosome-level sequence depth

Author(s)

Jianhong Ou, Haibo Liu, Herve Pages and Julie Zhu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
if (interactive())
{
    fls <- list.files(system.file("extdata", package="NADfinder"),
    recursive=FALSE, pattern="*bam$", full=TRUE)
    names(fls) <- basename(fls)
    if (!require(BSgenome.Mmusculus.UCSC.mm10))
    {
        if (!requireNamespace("BiocManager", quietly=TRUE))
        install.packages("BiocManager")
        BiocManager::install("BSgenome.Mmusculus.UCSC.mm10")
        library(BSgenome.Mmusculus.UCSC.mm10)
    }
    se <- tileCount(reads = fls, 
                    genome = Mmusculus,
                    excludeChrs = c("chrM", paste0("chr", c(1:17,19)), 
                                    "chrX", "chrY"), 
                    windowSize=50000, step=10000)
}

LihuaJulieZhu/NADfinder documentation built on May 17, 2019, 6:21 p.m.