Unlimited learning, half price | 50% off
Get 50% off unlimited learning

Repitools (version 1.18.0)

sequenceCalc: Find occurences of a DNA pattern

Description

Function to find all occurrences of a DNA pattern in given locations.

Usage

"sequenceCalc"(x, organism, pattern, fixed = TRUE, positions = FALSE) "sequenceCalc"(x, organism, window = NULL, positions = FALSE, ...)

Arguments

x
A data.frame, with columns chr and position, or instead of the column position there can be columns start, end, and strand, or a GRanges object of the regions.
window
Bases around the locations supplied in x that are in the window. Calculation will consider windowSize/2-1 bases upstream, and windowSize/2 bases downstream.
organism
The BSgenome object to calculate CpG density upon.
pattern
The DNAString to search for.
fixed
Whether to allow degenerate matches.
positions
If TRUE FALSE
...
Arguments passed into the GRanges method

Value

If positions is TRUE, a list of vectors of positions of matches in relation to the elements of x, otherwise a vector of the number of matches for each element of x.

Details

If the version of the data frame with the start, end, and strand columns is given, the window will be created around the TSS.

See Also

cpgDensityCalc, mappabilityCalc, gcContentCalc

Examples

Run this code
require(BSgenome.Hsapiens.UCSC.hg18)
TSSTable <- data.frame(chr=paste("chr",c(1,2),sep=""), position=c(100000,200000))
sequenceCalc(TSSTable, 600, organism=Hsapiens, pattern=DNAString("CG"))

Run the code above in your browser using DataLab