How to calculate TSS(UP 1K,DOWN 1K) score for gene of every cell?
mengchengyao opened this issue · 3 comments
Hi,
Thanks for your great tools with single analysis tool.
Now I want to calculate TSS(Promoter region: UP 1K,DOWN 1K) score for gene of every cell, how can I do?
snapatac2.pp.make_gene_matrix
snapatac2.tl.init_network_from_annotation
snapatac2.metrics.frip
which function to use?
could you give an example ?
Yours
Currently, the closest function you can use is pp.make_gene_matrix
which calculates the score using the whole gene body region: https://kzhang.org/SnapATAC2/api/_autosummary/snapatac2.pp.make_gene_matrix.html#snapatac2.pp.make_gene_matrix
But the feature you requested is relatively easy to implement.
In v2.6.4, you will be able to achieve this by:
>>> gene_mat = snap.pp.make_gene_matrix(data, gene_anno=snap.genome.hg38, upstream=1000, downstream=1000, include_gene_body=False)
In v2.6.4, you will be able to achieve this by:
>>> gene_mat = snap.pp.make_gene_matrix(data, gene_anno=snap.genome.hg38, upstream=1000, downstream=1000, include_gene_body=False)
Many thanks.