snapatac2.pp.make_gene_matrix#
- snapatac2.pp.make_gene_matrix(adata, gff_file, file=None, chunk_size=500, use_x=False, id_type='gene')[source]#
Generate cell by gene activity matrix.
Generate cell by gene activity matrix by counting the TN5 insertions in gene body regions. The result will be stored in a new file and a new AnnData object will be created.
- Parameters
adata (
AnnData|AnnDataSet) – The (annotated) data matrix of shapen_obsxn_vars. Rows correspond to cells and columns to regions.gff_file (
Genome|Path) – Either a Genome object or the path of a gene annotation file in GFF format.file (
Optional[Path]) – File name of the h5ad file used to store the result.chunk_size (
int) – Chunk sizeuse_x (
bool) – If True, use the matrix stored in.Xto compute the gene activity. Otherwise the.obsm['insertion']is used.id_type (
Literal[‘gene’, ‘transcript’]) – “gene” or “transcript”.
- Returns
A new AnnData object, where rows correspond to cells and columns to genes.
- Return type