probOverlapHit: Overlapping motif hit probabilities

Description Usage Arguments Details Value Examples

View source: R/overlap.R

Description

This function computes a set of self-overlapping probabilites for a motif and background model.

Usage

1
probOverlapHit(pfm, bg, singlestranded = FALSE)

Arguments

pfm

An R matrix that represents a position frequency matrix

bg

A Background object

singlestranded

Boolean that indicates whether a single strand or both strands shall be scanned for motif hits. Default: singlestranded = FALSE.

Details

The 'gamma's are determined based on two-dimensional score distributions (similar as described in Pape et al. 2008), however, they are computed based on an order-d background model. On the other hand, the 'beta's represent overlapping hit probabilities that were corrected for intermediate hits.

Value

An Overlap object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Load sequences
seqfile = system.file("extdata", "seq.fasta", package = "motifcounter")
seqs = Biostrings::readDNAStringSet(seqfile)

# Load background
bg = readBackground(seqs, 1)

# Load motif
motiffile = system.file("extdata", "x31.tab", package = "motifcounter")
motif = t(as.matrix(read.table(motiffile)))

# Compute overlapping hit probabilities for scanning both DNA strands
op = motifcounter:::probOverlapHit(motif, bg, singlestranded = FALSE)

# Compute overlapping hit probabilities for scanning a single DNA strand
op = motifcounter:::probOverlapHit(motif, bg, singlestranded = TRUE)

motifcounter documentation built on Nov. 8, 2020, 5:44 p.m.