
Count fragments over gene body plus promoter into a gene activity store
gene_activity_sc.RdSignac's GeneActivity(): per gene, the longest span of its biotype,
under max_width, extended upstream of the TSS; each overlapping
fragment counts once. The result is a SingleCells() over every
cell of object, in its order and with its obs and cell filter, so it
serves as the query of transfer_labels_seurat_sc() and of the
RNA tools. Methods that assume RNA counts refuse it or warn. Written to the
default directory, later cell filters on object reach it; reopen it with
get_gene_activity().
Usage
gene_activity_sc(
object,
fragments,
gtf,
dir_out = NULL,
ga_params = params_atac_gene_activity(),
target_size = NULL,
barcode_map = NULL,
overwrite = FALSE,
max_mem_gb = NULL,
.verbose = TRUE
)Arguments
- object
SingleCellsclass whose cell ids are the fragment barcodes (aSingleCellsMultiModalor aSingleCellsAtac).- fragments
String. The fragment file (BGZF, gzip or plain).
- gtf
String. Gene annotation (GENCODE, Ensembl, or a transcript-only GTF).
- dir_out
Optional string. Output directory.
NULLusesgene_activityinside the experiment directory.- ga_params
List. Output of
params_atac_gene_activity().- target_size
Optional numeric. Target of the log-CPM norm.
NULLuses the median RNAlib_sizeof the kept cells, as the Signac vignettes do, or 1e4 on an ATAC-only experiment, whoselib_sizecounts peaks.- barcode_map
Optional. Cell id to fragment barcode, where they differ: a named character vector or a function.
- overwrite
Boolean. Replace an existing store at
dir_out.- max_mem_gb
Optional numeric. Memory budget of the gene-major conversion.
- .verbose
Boolean. Controls verbosity.