Compute counts per cell in gene body and promoter region.
Usage
GeneActivity(
object,
assay = NULL,
features = NULL,
extend.upstream = 2000,
extend.downstream = 0,
biotypes = "protein_coding",
max.width = 5e+05,
process_n = 2000,
fragtk = TRUE,
gene.id = FALSE,
verbose = TRUE
)Arguments
- object
A Seurat object
- assay
Name of assay to use. If NULL, use the default assay
- features
Genes to include. If NULL, use all protein-coding genes in the annotations stored in the object
- extend.upstream
Number of bases to extend upstream of the TSS
- extend.downstream
Number of bases to extend downstream of the TTS
- biotypes
Gene biotypes to include. If NULL, use all biotypes in the gene annotation.
- max.width
Maximum allowed gene width for a gene to be quantified. Setting this parameter can avoid quantifying extremely long transcripts that can add a relatively long amount of time. If NULL, do not filter genes based on width.
- process_n
Number of regions to load into memory at a time, per thread. Processing more regions at once can be faster but uses more memory.
- fragtk
Use
fragtkfor fast and memory-efficient data quantification. Can be TRUE/FALSE or a character vector. If TRUE,fragtkwill be used and attempt to find thefragtkexecutable in the path. If FALSE, use the R implementation to produce the data matrix. If a character vector is provided, this should be the path to thefragtkexecutable andfragtkwill be used. Note thatfragtkuses the Paired Insertion Counting method, whereas the R implementation counts insertions. See https://crates.io/crates/fragtk for fragtk documentation.- gene.id
Record gene IDs in output matrix rather than gene name.
- verbose
Display messages
Examples
fpath <- system.file("extdata", "fragments.tsv.gz", package = "Signac")
fragments <- CreateFragmentObject(
path = fpath,
cells = colnames(atac_small),
validate.fragments = FALSE
)
#> Computing hash
Fragments(atac_small) <- fragments
GeneActivity(atac_small, fragtk = FALSE)
#> Extracting gene coordinates
#> Extracting reads overlapping genomic regions
#> 5 x 100 sparse Matrix of class "ngCMatrix"
#> [[ suppressing 100 column names ‘AAACGAAAGAGAGGTA-1’, ‘AAACGAAAGCAGGAGG-1’, ‘AAACGAAAGGAAGAAC-1’ ... ]]
#>
#> OR4F5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
#> OR4F29 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
#> OR4F16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
#> SAMD11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
#> NOC2L . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
#>
#> OR4F5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
#> OR4F29 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
#> OR4F16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
#> SAMD11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
#> NOC2L . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
#>
#> OR4F5 . . . . . . . . . . . . . . . . . . . . . . . . . . . .
#> OR4F29 . . . . . . . . . . . . . . . . . . . . . . . . . . . .
#> OR4F16 . . . . . . . . . . . . . . . . . . . . . . . . . . . .
#> SAMD11 . . . . . . . . . . . . . . . . . . . . . . . . . . . .
#> NOC2L . . . . . . . . . . . . . . . . . . . . . . . . . . . .