get_context_freq: Extract occurence of tri-nucleotide contexts

Description Usage Arguments Value Examples

View source: R/get_context_freq.R

Description

Extracts the frequencies of the tri-nucleotide contexts in a given region of the genome. These frequencies are needed to normalize a mutational catalogue. The output can be input to normalize().

Usage

1
get_context_freq(genome, region = NULL)

Arguments

genome

a BSgenome object

region

a GRanges object, path, URL, connection or BEDFile object.

Value

matrix containing the frequencies of the trinucleotide contexts

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
gr<-GenomicRanges::GRanges(seqnames=c("chr1"),
          ranges=IRanges::IRanges(start=c(100000),end=c(1000000)),
          strand=c("+"))
get_context_freq(BSgenome.Hsapiens.UCSC.hg19::BSgenome.Hsapiens.UCSC.hg19, gr)
get_context_freq(BSgenome.Hsapiens.UCSC.hg19::BSgenome.Hsapiens.UCSC.hg19)

## Not run: 
get_context_freq(BSgenome.Hsapiens.UCSC.hg19::BSgenome.Hsapiens.UCSC.hg19, 'example.bed')

## End(Not run)

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