gcContent {SomaticSignatures} | R Documentation |
Compute the GC content for regions of a reference sequence.
gcContent(regions, ref)
regions |
GRanges object with the regions for which the GC content should be computed. |
ref |
Reference sequence object, as a 'BSgenome' or 'FaFile' object. |
A numeric vector with the GC content [0,1] for each region.
library(BSgenome.Hsapiens.1000genomes.hs37d5) regs = GRanges(c("1", "2"), IRanges(1e7, width = 100)) gc = gcContent(regs, BSgenome.Hsapiens.1000genomes.hs37d5)