# mouse
velocyto run10x -m path/to/RNA_velocity/mm10_allTracks.gtf /path/to/scrna_project/Cellranger_result/sample1/ path/to/cellranger/reference/refdata-gex-mm10-2020-A/genes/genes.gtf -@ 10 --samtools-memory 24000
# human
velocyto run10x -m path/to/RNA_velocity/human_allTracks.gtf /path/to/scrna_project/Cellranger_result/sample1/ path/to/cellranger/reference/refdata-gex-GRCh38-2020-A/genes/genes.gtf -@ 10 --samtools-memory 24000
# Running RNA Velocity
scv.pp.filter_and_normalize(adata,min_shared_counts=30, n_top_genes=2000)
scv.pp.moments(adata, n_pcs=30, n_neighbors=30)
scv.tl.velocity(adata, mode = "stochastic")
scv.tl.velocity_graph(adata)
scv.pl.velocity_embedding(adata, basis='X_umap', arrow_size=5)
ident_colours = ["#F8766D", "#A3A500", "#00BF7D", "#00B0F6", "#E76BF3"]
scv.pl.velocity_embedding_stream(adata, basis='X_umap',color = "celltype", palette = ident_colours)
scv.pl.velocity_embedding_stream(adata, basis='X_umap',color = "celltype", palette = ident_colours, size = 20,alpha =0.8)
scv.pl.velocity_embedding_stream(adata, basis='X_umap',color = "celltype", palette = ident_colours, size = 20,alpha =0.8, save="UMAP_stream.png", figsize=(7,5), legend_fontsize = 9, show=False, title='')
scv.pl.velocity_embedding_stream(adata, basis='X_umap',color = "celltype", palette = ident_colours, size = 20,alpha =0.8, save="UMAP_stream.pdf", figsize=(7,5), legend_fontsize = 9, show=False, title='')
scvelo
库提供了三种模式来估算 RNA Velocity:'deterministic'
(确定性模式),'stochastic'
(随机模式)和'dynamical'
(动力学模式)。这三种模式代表了不同的数学模型,用于描述 transcriptional dynamics(转录动态)。以下是这三种模式的简单概述:
-
确定性模式('deterministic'):这种模式假设所有的细胞都处于稳态,即每个细胞的转录速率和降解速率是平衡的。这种模式使用稳态方程来估算 RNA Velocity。
-
随机模式('stochastic'):这种模式放宽了稳态假设,允许细胞的转录速率和降解速率不完全平衡。这种模式使用随机微分方程来描述转录动态,并使用 Monte Carlo 方法估算 RNA Velocity。
-
动力学模式('dynamical'):这种模式进一步放宽了假设,允许细胞的状态在时间上变化。这种模式使用动力学方程来描述转录动态,并需要先运行
tl.recover_dynamics
来恢复每个基因的动力学参数。然后,这些参数被用于估算 RNA Velocity。
在选择哪种模式时,你需要考虑你的数据和你的研究问题。确定性模式的计算速度最快,但是模型假设最强。动力学模式的模型假设最弱,但是需要更多的计算,且需要先运行 tl.recover_dynamics
。随机模式介于两者之间。
网友评论