createBins: Builds bin annotation data for a particular bin size

Description Usage Arguments Value Parallel processing Author(s) See Also Examples

View source: R/createBinAnnotations.R

Description

Builds bin annotation data for a particular bin size.

Usage

1
2
createBins(bsgenome, binSize, ignoreMitochondria=TRUE, excludeSeqnames=NULL,
  verbose=getOption("QDNAseq::verbose", TRUE))

Arguments

bsgenome

A BSgenome package.

binSize

A numeric scalar specifying the width of the bins in units of kbp (1000 base pairs), e.g. binSize=15 corresponds to 15 kbp bins.

ignoreMitochondria

Whether to ignore the mitochondria, defined as chromosomes named 'chrM', 'chrMT', 'M', or 'MT'.

excludeSeqnames

Character vector of seqnames which should be ignored.

verbose

If TRUE, verbose messages are produced.

Value

Returns a data.frame with columns chromosome, start, end, bases, and gc, which correspond to the chromosome name, positions of the first and last base pair in the bin, the percentage of characterized nucleotides (A, C, G, or T, i.e. non-N), and GC content (percentage of C and G nucleotides of non-N nucleotides).

Parallel processing

The future is used parallelize the following functions:

Author(s)

Ilari Scheinin

See Also

getBinAnnotations().

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: # NOTE: These take a very long time to run.
library(BSgenome.Hsapiens.UCSC.hg19)
bins <- createBins(BSgenome.Hsapiens.UCSC.hg19, 15)
bins$mappability <- calculateMappability(bins,
    bigWigFile='/path/to/wgEncodeCrgMapabilityAlign50mer.bigWig',
    bigWigAverageOverBed='/path/to/bigWigAverageOverBed')
bins$blacklist <- calculateBlacklist(bins,
    bedFiles=c('/path/to/wgEncodeDacMapabilityConsensusExcludable.bed',
    '/path/to/wgEncodeDukeMapabilityRegionsExcludable.bed'))
bins$residual <- iterateResiduals(readCountsG1K)

## End(Not run)

QDNAseq documentation built on Nov. 8, 2020, 6:57 p.m.