plotSizeDistribution {wavClusteR} | R Documentation

## Plot the distribution of cluster sizes

### Description

Produce an histogram of cluster sizes

### Usage

    plotSizeDistribution( clusters, showCov = FALSE, ... )

### Arguments

`clusters` | GRanges object containing individual clusters as identified by the getClusters function
`showCov` | logical, if TRUE a scatter plot of average cluster coverage vs. cluster size is shown along with a loess fit. Default is FALSE.
`...` | Additional parameters to be passed to the `hist` function

### Value

Called for its effect, returns a histogram.

### Author(s)

Federico Comoglio

### See Also

`getClusters`

### Examples

    require(BSgenome.Hsapiens.UCSC.hg19)

    data( model, package = "wavClusteR" )

    filename <- system.file( "extdata", "example.bam", package = "wavClusteR" )
    example <- readSortedBam( filename = filename )
    countTable <- getAllSub( example, minCov = 10, cores = 1 )
    highConfSub <- getHighConfSub( countTable, supportStart = 0.2, supportEnd = 0.7, substitution = "TC" )
    coverage <- coverage( example )
    clusters <- getClusters( highConfSub = highConfSub,
                             coverage = coverage,
                             sortedBam = example,
    	                 method = 'mrn',
    	                 cores = 1,
    	                 threshold = 2 )

    fclusters <- filterClusters( clusters = clusters,
    		             highConfSub = highConfSub,
            		     coverage = coverage,
    			     model = model,
    			     genome = Hsapiens,
    		             refBase = 'T',
    		             minWidth = 12 )
    plotSizeDistribution(fclusters, breaks = 30, col = 'skyblue2')

[Package wavClusteR version 2.12.1 Index]