FindSequenceOccurrence: Find occurrences of a DNA sequence in a BSgenome

Description Usage Arguments Details Author(s) Examples

View source: R/src_FindSequenceOccurrence.R

Description

Function takes a DNA sequence and then returns a GRanges object with the position of that sequence (separated by strand) in a given BSgenome. Optionally one can set a number of allowed mismatches. IUPAC ambiguity characters are supported.

Usage

1
2
3
4
5
6
7
FindSequenceOccurrence(
  Sequence,
  BSGenome,
  StrictAmbiguity = FALSE,
  MaxMismatches = 0,
  Cores = detectCores()
)

Arguments

Sequence

A DNA sequence

BSGenome

a BSgenome object

StrictAmbiguity

logical, how to deal with ambiguity characters, see Details.

MaxMismatches

number of allowed mismatches

Cores

number of cores for chromosome-wise search parallelization via mclapply

Details

StrictAmbiguity => if TRUE (so strict) then an amb. character in the query, e.g. N is only counted as a match if the reference contains the same character, so N in query must be N in reference. Else, character in reference can be any of the encoded characters, so N can be A/T/C/G in the reference.

Author(s)

Alexander Toenges

Examples

1
2
3
4
5
library(BSgenome.Ecoli.NCBI.20080805)
FindSequenceOccurrence(Sequence = "AGCTAAATTTGG", 
                       MaxMismatches = 1,
                       BSGenome = BSgenome.Ecoli.NCBI.20080805)
 

ATpoint/dailytRumpet documentation built on April 28, 2020, 1:47 a.m.