mappabilityCalc {Repitools} | R Documentation

## Calculate The Mappability of a Region

### Description

Function to calculate mappability of windows

### Usage

      ## S4 method for signature 'GRanges,MappabilitySource'
    mappabilityCalc(x, organism, window = NULL,
                  type = c("block", "TSS", "center"), verbose = TRUE)
      ## S4 method for signature 'data.frame,MappabilitySource'
    mappabilityCalc(x, organism, window = NULL,
                                             type = c("block", "TSS", "center"), ...)

### Arguments

`x` | A `GRanges` object or a `data.frame`, with columns `chr` and either `position` or `start`, `end` and `strand`.
`window` | Bases around the locations that are in the window. Calculation will consider `windowSize/2` bases upstream, and `windowSize/2-1` bases downstream.

For unstranded features, the effect is the same as for + strand features.

`type` | What part of the interval to make the window around. If the value is `"TSS"`, the the start coordinate is used for all + strand features, and the end coordinate is used for all - strand features. If `"cemter"` is chosen, then the coordinate that is half way between the start and end of each feature will be used as the reference point. `"block"` results in the use the start and end coordinates without modification.
`organism` | The `BSgenome` object to calculate mappability upon, or the file path to a FASTA file generated by GEM Mappability, or the path to a bigWig file containing mappability scores.
`verbose` | Whether to print the progess of processing.
`...` | The `verbose` variable for the `data.frame` method, passed onto the `GRanges` method.

### Details

The windows considered will be `windowSize/2` bases upstream and `windowSize/2-1` bases downstream of the given position of stranded features, and the same number of bases towards the start and end of the chromosome for unstranded features. The value returned for each region is a percentage of bases in that region that are not N (any base in IUPAC nomenclature).

For any positions of a window that are off the end of a chromosome, they will be considered as being N.

### Value

A vector of mappability percentages, one for each region.

### Author(s)

Aaron Statham

### Examples

      ## Not run:
        require(BSgenome.Hsapiens36bp.UCSC.hg18mappability)
        TSSTable <- data.frame(chr = paste("chr", c(1,2), sep = ""), position = c(100000, 200000))
        mappabilityCalc(TSSTable, Hsapiens36bp, window = 200, type = "TSS")

    ## End(Not run)

[Package Repitools version 1.34.0 Index]