BPFrequency_-: Setter method for 'BPFrequency' slot in a 'genomicProfiles'...

Description Usage Arguments Details Value Author(s) References Examples

Description

Setter method for BPFrequency slot in a genomicProfiles object. If base pair frequency is unknown, BPFrequency will compute base pair frequency from a DNA sequence.

Usage

1
BPFrequency(object)<-value

Arguments

object

object is a genomicProfiles object.

value

value can three different objects:

A vector of length 4 containing the probability of occurrence of each base pair (A,C,G,T) in order. Default value is c(0.25,0.25,0.25,0.25).

A BSgenome of the organism of interest. The base pair frequency will automatically be computed and updated in genomicProfiles.

A DNAStringSet of the organisme of interest. The base pair frequency will automatically be computed and updated in genomicProfiles (Prefered method).

Details

Default value is c(0.25,0.25,0.25,0.25) When generating a Postion Weight Matrix from a Position Frequency Matrix, the probability of occurrence of each base pair (Base Pair Frequency) is necessary (as originally described by Gary Stormo). It is possible to set custom values for BPFrequency with a vector of length 4 containing the probability of occurrence of each base pair (A,C,G,T) in order. If Base pair frequency is unknown, BPFrequency will compute base pair frequency from a DNA sequence when building a genomicProfiles object. The nature of this sequence can be aBSgenome object or a DNAStringSet. In order to decrease run time, it is advised to use DNAStringSet.

Value

Returns a genomicProfiles object with an updated value for BPFrequency.

Author(s)

Patrick C.N. Martin <pm16057@essex.ac.uk>

References

Zabet NR, Adryan B (2015) Estimating binding properties of transcription factors from genome-wide binding profiles. Nucleic Acids Res., 43, 84–94.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
data(ChIPanalyserData)
# path to Position Frequency Matrix
PFM <- file.path(system.file("extdata",package="ChIPanalyser"),"BCDSlx.pfm")
#As an example of genome, this example will run on the Drosophila genome

if(!require("BSgenome.Dmelanogaster.UCSC.dm3", character.only = TRUE)){
    if (!requireNamespace("BiocManager", quietly=TRUE))
        install.packages("BiocManager")
    BiocManager::install("BSgenome.Dmelanogaster.UCSC.dm3")
    }
library(BSgenome.Dmelanogaster.UCSC.dm3)
DNASequenceSet <- getSeq(BSgenome.Dmelanogaster.UCSC.dm3)
# Building genomicProfiles object
GPP <- genomicProfiles(PFM=PFM, BPFrequency=DNASequenceSet)
# Updating BPFrequency
## !! Note!! BPFrequency is used to compute PWM from PFM
## IF updated after building GPP, then it will not influence PWM
## Advised to build with BPFrequency directly
BPFrequency(GPP) <- DNASequenceSet
BPFrequency(GPP) <- c(0.25,0.25,0.25,0.25)

patrickCNMartin/ChIPanalyserDev documentation built on Nov. 14, 2019, 4:39 p.m.