genomeBlocks {Repitools} | R Documentation

## Creates bins across a genome.

### Description

Creates a compact `GRanges` representation of bins across specified chromosomes of a given genome.

### Usage

      ## S4 method for signature 'numeric'
    genomeBlocks(genome, chrs = names(genome), width = NULL,
                                       spacing = width)
      ## S4 method for signature 'BSgenome'
    genomeBlocks(genome, chrs = seqnames(genome), width = NULL,
                                        spacing = width)

### Arguments

`genome` | Either a `BSgenome` object, or a named vector of integers (names being choromosome names, integers being the chromosome lengths), to get the chromosome lengths from.
`chrs` | A `vector` containing which chromosomes to create bins across. May either be numeric indicies or chromosome names. Default is all chromosomes given by `genome`.
`width` | The width in base pairs of each bin.
`spacing` | The space between the centres of each adjacent bin. By default, is equal to the `spacing` parameter, which gives non-overlapping bins. Values larger than `spacing` will give overlapping bins, and values smaller than `spacing` will give gaps between each bin.

### Value

Returns a `GRanges` object, compatible with direct usage in `annotationBlocksCounts`

### Author(s)

Aaron Statham

### See Also

`annotationBlocksCounts`

### Examples

      chr.lengths <- c(800, 200, 200)
      names(chr.lengths) <- c("chr1", "chr2", "chr3")
      genomeBlocks(chr.lengths, width = 200)

[Package Repitools version 1.26.0 Index]