checkCuts {msgbsR} | R Documentation

## checkCuts

### Description

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

### Usage

    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

    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")

[Package msgbsR version 1.4.0 Index]