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(AllSitesPWMScore,DNAAccessibility=NULL,
        occupancyProfileParameters = NULL,
        norm = TRUE, verbose = TRUE)

### Arguments

`AllSitesPWMScore` | `AllSitesPWMScore` is a a `genomicProfileParameters` object resulting from `computePWMScore`. IT is important to use this resulting object as the occuapancy will only be computed for sites above a threshold.
`DNAAccessibility` | `DNAAccessibility` is a GRanges object containing Ranges of accesible sequences. This object ccould also contain a DNA affinity score as a metadata column.
`occupancyProfileParameters` | `occupancyProfileParameters` is a `occupancyProfileParameters` object containing the adequate values assigned to each Parameter. If not Supplied (`occupancyProfileParamters` = 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 `occupancyProfileParameters` 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 `genomicProfileParameters`. The main difference will reside in the `AllSitesAboveThreshold` 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 `ScalingFactorPWM` 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)){
        source("https://bioconductor.org/biocLite.R")
        biocLite("BSgenome.Dmelanogaster.UCSC.dm3")
        }
    library(BSgenome.Dmelanogaster.UCSC.dm3)
    DNASequenceSet <- getSeq(BSgenome.Dmelanogaster.UCSC.dm3)

    #Building data objects
    GPP <- genomicProfileParameters(PFM=PFM,BPFrequency=DNASequenceSet)
    OPP <- occupancyProfileParameters()
    # Computing Genome Wide
    GenomeWide <- computeGenomeWidePWMScore(DNASequenceSet = DNASequenceSet,
        genomicProfileParameters = GPP)

    #Compute PWM Scores
    PWMScores <- computePWMScore(DNASequenceSet = DNASequenceSet,
        genomicProfileParameters = GenomeWide, setSequence = eveLocus,
        DNAAccessibility = Access)
    #Compute Occupnacy
    Occupancy <- computeOccupancy(AllSitesPWMScore = PWMScores,
        occupancyProfileParameters = OPP)
    Occupancy

[Package ChIPanalyser version 1.2.0 Index]