gcContentCalc {Repitools} | R Documentation

## Calculate The gcContent of a Region

### Description

Function to calculate the GC content of windows

### Usage

      ## S4 method for signature 'GRanges,BSgenome'
    gcContentCalc(x, organism, verbose = TRUE)
      ## S4 method for signature 'data.frame,BSgenome'
    gcContentCalc(x, organism, window = NULL, ...)

### Arguments

`x` | A `GRanges` object or a `data.frame`, with columns `chr` and either `position` or `start`, `end` and `strand`.
`window` | Bases around the locations that are in the window. Calculation will consider `windowSize/2` bases upstream, and `windowSize / 2 - 1` bases downstream.
`organism` | The `BSgenome` object to calculate gcContent upon.
`verbose` | Whether to print the progess of processing.
`...` | The `verbose` variable for the `data.frame` method, passed onto the `GRanges` method.

### Details

The windows considered will be `windowSize/2` bases upstream and `windowSize/2-1` bases downstream of the given position, for each position. The value returned for each region is a percentage of bases in that region that are a G or C.

### Value

A vector of GC content percentages, one for each region.

### Author(s)

Aaron Statham

### Examples

    require(BSgenome.Hsapiens.UCSC.hg18)
    TSSTable <- data.frame(chr = paste("chr", c(1,2), sep = ""), position = c(100000, 200000))
    gcContentCalc(TSSTable, 200, organism=Hsapiens)

[Package Repitools version 1.34.0 Index]