Learn R Programming

SomaticSignatures (version 2.8.4)

gcContent: GC Content

Description

Compute the GC content for regions of a reference sequence.

Usage

gcContent(regions, ref)

Arguments

regions
GRanges object with the regions for which the GC content should be computed.
ref
Reference sequence object, as a 'BSgenome' or 'FaFile' object.

Value

A numeric vector with the GC content [0,1] for each region.

Examples

Run this code
library(BSgenome.Hsapiens.1000genomes.hs37d5)

regs = GRanges(c("1", "2"), IRanges(1e7, width = 100))

gc = gcContent(regs, BSgenome.Hsapiens.1000genomes.hs37d5)

Run the code above in your browser using DataLab