calcCounts: Creating the raw count matrix

Description Usage Arguments Value Examples

View source: R/calcCounts.R

Description

This function will return a matrix of read counts where ecah column is a sample, and each row is a bin.

Usage

1
calcCounts(metaData, bins, rl, mc.cores = 1)

Arguments

metaData

A table in the format of the output of getMetaData().

bins

The set of bins determined by calcBins().

rl

The read length of the experiment.

mc.cores

The number of cores to use for multi-threaded analysis. Defaults to 1.

Value

A data.frame that contains the counts for each sample in the metaData input that fall into each segment of bins.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
pD <- getMetaData(
'https://raw.githubusercontent.com/JMF47/MDTSData/master/data/pD.ped')
genome = BSgenome.Hsapiens.UCSC.hg19
map_file <- 
"https://raw.githubusercontent.com/JMF47/MDTSData/master/data/chr1.map.bw"
bins = calcBins(pD, n=5, rl=100, med=150, min=5, genome, map_file)

## End(Not run)
load(system.file("extdata", 'bins.RData', package = "MDTS"))
load(system.file("extdata", 'counts.RData', package = "MDTS"))
counts

JMF47/MDTS documentation built on May 28, 2019, 12:42 p.m.