atac2rna: Convert a peak matrix to a gene activity matrix

Description Usage Arguments Value Examples

View source: R/atac2rna.R

Description

This function takes in a peak matrix and an annotation file (gtf)and collapse the peak matrix to a gene activity matrix.

Usage

1
2
3
4
5
6
7
8
atac2rna(
  peaks,
  annotation.file = NULL,
  seq.levels = c(1:22, "X", "Y"),
  include.body = TRUE,
  upstream = 2000,
  downstream = 0
)

Arguments

peaks

Matrix of peak counts.

annotation.file

Path to GTF annotation file.

seq.levels

Which seqlevels to keep (corresponds to chromosomes usually).

include.body

Include the gene body?

upstream

Number of bases upstream to consider.

downstream

Number of bases downstream to consider.

Value

A Seurat object with both ATAC data matrix and gene activity matrix.

Examples

1
2
3
## Not run: annotation.file <- "../data/Homo_sapiens.GRCh37.82.gtf"
         ATAC_example <- atac2rna(pbmc_small_atac, annotation.file = annotation.file)
## End(Not run)

cailab-tamu/scTypeGSEA documentation built on July 15, 2020, 10:56 a.m.