makeBins: Split genome into bins

View source: R/utils.R

makeBinsR Documentation

Split genome into bins

Description

This function splid genome into a equaly-sized user defined genomic intervals.

Usage

makeBins(
  bsgenome = NULL,
  fai = NULL,
  chromosomes,
  binsize = 1e+05,
  stepsize = binsize/2
)

Arguments

bsgenome

A reference genome to get lengths of genomic sequences (eg. GRCh38).

fai

A FASTA index to get lengths of genomic sequences.

chromosomes

A user defined set of chromosomes for binning (eg. 'chr1')

binsize

A size of the genomic bin to split genome into.

stepsize

A size of the genomic interval to move each bin. For non-overlapping bins use the same size as binsize.

Value

A GRanges-class object with resized original set of ranges.

Author(s)

David Porubsky


daewoooo/primatR documentation built on March 28, 2024, 6:41 a.m.