checkCuts: checkCuts

Description Usage Arguments Value Author(s) Examples

View source: R/checkCuts.R

Description

Determines the sequence around a cut site using a fasta file or BSgenome

Usage

1
checkCuts(cutSites, genome, fasta = FALSE, seq)

Arguments

cutSites

A GRanges object containing the locations of the cut sites to be checked for sequence match. The names of the correct cut sites will be returned as a GRanges object.

genome

The path to a fasta file or a BSgenome object to check for genomic sequences.

fasta

TRUE if a fasta file has been supplied. Default = FALSE

seq

The desired recognition sequence that the enzyme should have cut.

Value

A GRanges object containing the names of the sites that had the correct sequence.

Author(s)

Benjamin Mayne

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(GenomicRanges)
library(SummarizedExperiment)
library(BSgenome.Rnorvegicus.UCSC.rn6)
# Load the positions of possible MspI cut sites
data(ratdata)
# Extract the cut sites
cutSites <- rowRanges(ratdata)
# Adjust the cut sites to overlap recognition site on each strand
start(cutSites) <- ifelse(test = strand(cutSites) == '+',
                          yes = start(cutSites) - 1, no = start(cutSites) - 2)
end(cutSites) <- ifelse(test = strand(cutSites) == '+',
                        yes = end(cutSites) + 2, no = end(cutSites) + 1)
correctCuts <- checkCuts(cutSites = cutSites, genome = "rn6", seq = "CCGG")

BenjaminAdelaide/msgbsR documentation built on May 5, 2019, 2:41 p.m.