computePWMScore {ChIPanalyser} | R Documentation

## Compute PWM Scores of sites above threshold.

### Description

`computePWMScore` will compute and extract all sites that exhibit a PWM Score higher than a threshold. This threshold (see `PWMThreshold`) will determine the percentage of total sites that should NOT be considered.

### Usage

    computePWMScore(DNASequenceSet, genomicProfileParameters,
        setSequence = NULL, DNAAccessibility = NULL,cores=1, verbose = TRUE)

### Arguments

`DNASequenceSet` | `DNASequenceSet` is a `DNAStringSet` or a `BSgenome` containing the full sequence of the organism of interest.
`genomicProfileParameters` | `genomicProfileParameters` is a `genomicProfileParameters` object resulting from the `computeGenomeWidePWMScore` function.
`setSequence` | `setSequence` is a `GRanges` object containing the Loci of interest.
`DNAAccessibility` | `DNAAccessibility` is a `GRanges` object containing Accesible DNA.
`cores` | `cores` is the number of cores used to compute PWM Scores.
`verbose` | `verbose` is a logical value indicating if progress messages should be printed or not.

### Details

After determining genome wide scores, it is possible to only compute and extract high affinity sites (in the sense that they have a high PWM Score). If a `PWMThreshold` is not set by user, the default value is set at 0.7. This means that 70 % of sites will NOT be selected. Only the top 30 % will be computed and extracted. If one is interested in all PWM Scores at a genome wide scale ( or accessible DNA ), this is possible by setting `PWMThreshold` to zero.

### Value

`computePWMScore` will return a `genomicProfileParameters` object. The `AllSitesAboveThreshold` slot will have been updated. This slot will now contain a `GRangesList` with each element being a `GRanges`. This GRanges will contain postion of each sites (start, end and strand) and the PWMScore associated to that site.

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

    # Computing Genome Wide
    GenomeWide <- computeGenomeWidePWMScore(DNASequenceSet = DNASequenceSet,
        genomicProfileParameters = GPP)

    #Compute PWM Scores
    PWMScores <- computePWMScore(DNASequenceSet = DNASequenceSet,
        genomicProfileParameters = GenomeWide,
        setSequence = eveLocus, DNAAccessibility = Access)
    PWMScores

[Package ChIPanalyser version 1.2.0 Index]