Signac (version 0.2.4)

GenomeBinMatrix: GenomeBinMatrix

Description

Construct a bin x cell matrix from a fragments file.

Usage

GenomeBinMatrix(
  fragments,
  genome,
  cells = NULL,
  binsize = 5000,
  chunk = 50,
  sep = c("-", "-"),
  verbose = TRUE
)

Arguments

fragments

Path to tabix-indexed fragments file

genome

A vector of chromosome sizes for the genome. This is used to construct the genome bin coordinates. The can be obtained by calling seqlengths on a BSgenome-class object.

cells

Vector of cells to include. If NULL, include all cells found in the fragments file

binsize

Size of the genome bins to use

chunk

Number of chunks to use when processing the fragments file. Fewer chunks may enable faster processing, but will use more memory.

sep

Vector of separators to use for genomic string. First element is used to separate chromosome and coordinates, second separator is used to separate start and end coordinates.

verbose

Display messages

Value

Returns a sparse matrix

Details

This function bins the genome and calls FeatureMatrix to construct a bin x cell matrix.

Examples

Run this code
# NOT RUN {
gn <- 780007
names(gn) <- 'chr1'
fpath <- system.file("extdata", "fragments.tsv.gz", package="Signac")
GenomeBinMatrix(
  fragments = fpath,
  genome = gn,
  binsize = 1000,
  chunk = 1
)
# }

Run the code above in your browser using DataLab