CountRawReads: count raw reads for all bins

View source: R/ChIPseqSpikeInFree.R

CountRawReadsR Documentation

count raw reads for all bins

Description

This function counts raw reads for each bin.

Usage

CountRawReads(
  bamFiles,
  chromFile = "hg19",
  prefix = "test",
  singleEnd = TRUE,
  binSize = 1000
)

Arguments

bamFiles

a vector of bam filenames.

chromFile

a chrom.size file. Given "hg19","mm10","mm9" or "hg38", will load chrom.size file from package folder. Otherwise, give a your own chrom.size

prefix

prefix of output file name

singleEnd

To count paired-end reads, set argument singleEnd=FALSE

binSize

size of bins (bp). Recommend a value bwteen 200 and 10000

Value

a data.frame of raw counts for each bin

Examples

## 1.count reads using mm9 bams
# bams <- c("your/path/ChIPseq1.bam","your/path/ChIPseq2.bam")
# rawCountDF <- CountRawReads(bamFiles=bams,chromFile="mm9",
#    prefix="your/path/test",singleEnd=TRUE)

stjude/ChIPseqSpikeInFree documentation built on March 28, 2022, 5:36 a.m.