plotAlphaDistributionOneChr {MethylSeekR} | R Documentation

## Calculate and plot alpha distribution.

### Description

This function calculates the alpha values for a selected chromosome and plots the distribution of alpha values. The shape of the distribution is indicative of the presence or absence of partially methylated domains (PMDs).

### Usage

    plotAlphaDistributionOneChr(m, chr.sel, pdfFilename = NULL, num.cores = 1, nCGbin = 101)

### Arguments

`m` | Methylation GRanges object.
`chr.sel` | Selected chromosome for which alpha values are calculated. Must be one of the sequence levels of m.
`pdfFilename` | Name of the pdf file in which the figure is saved. If no name is provided (default), the figure is printed to the screen.
`num.cores` | The number of cores that are used for the calculation (default 1).
`nCGbin` | The number of CpGs in each sliding window used to calculate alpha (default 101). The default is highly recommended.

### Value

No return value. The function creates a figure showing the alpha distribution for the selected chromosome that is either printed to the screen (default) or saved as a pdf if a filename is provided.

### Author(s)

Lukas Burger lukas.burger@fmi.ch

### Examples

    library(MethylSeekR)

    # get chromosome lengths
    library("BSgenome.Hsapiens.UCSC.hg18")
    sLengths=seqlengths(Hsapiens)

    # read methylation data
    methFname <- system.file("extdata", "Lister2009_imr90_hg18_chr22.tab",
    package="MethylSeekR")
    meth.gr <- readMethylome(FileName=methFname, seqLengths=sLengths)

    #calculate alpha distribution for one chromosome
    plotAlphaDistributionOneChr(m=meth.gr, chr.sel="chr22", num.cores=1)

[Package MethylSeekR version 1.30.0 Index]