Learn R Programming

genoset (version 1.28.2)

calcGC2: Calculate GC Percentage in sliding window

Description

Local GC content can be used to remove GC artifacts from copynumber data (see Diskin et al, Nucleic Acids Research, 2008, PMID: 18784189). This function will calculate GC content fraction in expanded windows around a set of ranges following example in http://www.bioconductor.org/help/course-materials/2012/useR2012/Bioconductor-tutorial.pdf. Values are as.integer( 1e4 * fraction ) for space reasons.

Usage

calcGC2(dna)

Arguments

dna
BSgenome or DNAStringSet

Value

  • SimpleRleList, integer 1e4 * GC fraction, chromosomes 1:22, X and Y

Examples

Run this code
library(BSgenome.Hsapiens.UCSC.hg19)
gc = calcGC2(Hsapiens)

Run the code above in your browser using DataLab