computeOccupancy {ChIPanalyser} | R Documentation

## Compute Occupancy values from PWM Scores based on model.

### Description

`computeOccupancy` will compute the Occupancy from PWM Scores. As described in detail in the vignette, `ChIPanalyser` uses PWM Scores, DNA Accessibility data, the number of bound molecules and a sclaing factor of Transcription Factor specificty. This function will compute occupancy using the values assigned to each variable.

### Usage

    computeOccupancy(genomicProfiles,parameterOptions = NULL,
        norm = TRUE, verbose = TRUE)

### Arguments

`genomicProfiles` | `genomicProfiles` is a a `genomicProfiles` object resulting from `computePWMScore`. IT is important to use this resulting object as the occuapancy will only be computed for sites above a threshold.
`parameterOptions` | `parameterOptions` is a `parameterOptions` object containing the adequate values assigned to each Parameter. If not Supplied (`parameterOptions` = NULL), a new object will be created internally using default values.
`norm` | `norm` a logical value which determines if the occupancy should be normalised or not.
`verbose` | `verbose` a logical value which determines if progress messages are printed or not.

### Details

`computeOccupancy` will compute the Occupancy from PWM Scores. As described in detail in the vignette, `ChIPanalyser` uses PWM Scores, DNA Accessibility data, the number of bound molecules and a sclaing factor of Transcription Factor specificty. This function will compute occupancy using the values assigned to each variable. It should also be noted that the `parameterOptions` object contains a set of parameters used to compute Occupancy (not only restricted to this ). These parameters are often dependant on real ChIP-Seq data and will influence the goodness of fit between the predicted model an real ChIP-seq data. We strongly advise that the values assigned to each parameter should be customiszed in order to increase the model ageement with real world biological data.

### Value

`computeOccupancy` will return a `genomicProfiles`. The main difference will reside in the `profiles` slot. This slot is generally a list or `GRangesList`. Within these list type structures are enclosed `GRanges` containing the positions of site above threshold, PWMScores and Occupancy for each site. The series of GRanges will depend on the number of loci that are tested and the number of element in the list will depend on the various combinations of `lambdaPWM` and `boundMolecules`.

### 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

    #Data extraction
    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 data objects
    GPP <- genomicProfiles(PFM=PFM,BPFrequency=DNASequenceSet)
    OPP <- parameterOptions()
    # Computing Genome Wide
    GenomeWide <- computeGenomeWideScores(genomicProfiles = GPP,
        DNASequenceSet = DNASequenceSet)

    #Compute PWM Scores
    PWMScores <- computePWMScore(genomicProfiles = GenomeWide,
        DNASequenceSet = DNASequenceSet,
        loci = eveLocus,
        chromatinState = Access)
    #Compute Occupnacy
    Occupancy <- computeOccupancy(genomicProfiles = PWMScores,
        parameterOptions = OPP)
    Occupancy

[Package ChIPanalyser version 1.14.0 Index]