前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Monocel3简介以及安装

Monocel3简介以及安装

作者头像
生信喵实验柴
发布2022-10-25 19:41:39
2K0
发布2022-10-25 19:41:39
举报
文章被收录于专栏:生信喵实验柴生信喵实验柴

一、软件介绍

1.1 monocel3

Monocel3是单细胞分析领域一个重要的R 包,它是之前 Monocel和 Monocel2的升级版本,之前的 Monocel2 主要用于单细胞拟时分析。而新版本的 Monocel3 在原有基础上,还可以进行聚类,单细胞亚型分类,细胞注释,拟时分析,基因表达等分析。包含了 Seurat+SingleR 的功能,可以说一个 R 包可以完成单细胞数据分析绝大部分的功能。使用同一个 R 包分析起来更加方便。

目前 monocel3 已经取代了之前的 monocel2,不过目前仍处于开发版,还有很多功能在完善过程中。

Monocle3 主要有三大功能,

1. 分群、计数细胞 Clustering, classifying, and counting cells

2. 构建细胞轨迹 Constructing single-cell trajectories.

3. 差异表达分析 Differential expression analysis.

官网:https://cole-trapnell-lab.github.io/monocle3/

帮助文档:https://cole-trapnell-lab.github.io/monocle3/docs/introduction/

文章:https://cole-trapnell-lab.github.io/monocle3/papers/

1.2 monocel3 升级功能

相比于 monocel2,新版软件主要做了以下升级。https://cole-trapnell-lab.github.io/monocle3/docs/updates/

1、A better structured workflow to learn developmental trajectories.一个更好的构建分化轨迹的方法

2、Support for the UMAP algorithm to initialize trajectory inference.支持 UMAP 推断发育轨迹

3、Support for trajectories with multiple roots.支持多个祖源(toots)的发育推断

4、Ways to learn trajectories that have loops or points of convergence.Algorithms that automatically partition cells to learn disjoint or parallel trajectories using ideas from "approximate graph abstraction".增加 approximate graph abstraction 理解各条发育轨迹的分离及平行发育的轨迹。

5、A new statistical test for genes that have trajectory-dependent expression. This replaces both the old differentialGeneTest() function and BEAM().新的轨迹依赖表达基因分析方法:替换 monocle2 中的 differalgenetest()函数和 BEAM()

6、Project query data set onto a reference.整合数据集分析;

7、Transfer annotations to query data set from reference.直接将注释结果转换为模板,用于新细胞鉴定;

8、Save and load Monocle objects and transformation models.增加 save_monocle_objects 和 load_monocle_objects 函数保存结果。

9、Mixed negative binomial distribution for fit_models.支持负二项分布模型

10、A 3D interface to visualize trajectories and gene expression.支持 3D 视图可视化轨迹分析和基因差异表达分析结果。

总而言之,QC,聚类,亚群鉴定,细胞轨迹分析等Monocel3都可以完成。

1.3 软件安装

软件是一个 R 包,有多种方式进行安装,下面推荐三种安装方法,适应不同的使用情况。

方法一:Bioconductor 安装

代码语言:javascript
复制
#安装一些依赖包
BiocManager::install(c('BiocGenerics', 'DelayedArray', 'DelayedMatrixStats',
                       'limma', 'lme4', 'S4Vectors', 'SingleCellExperiment',
                       'SummarizedExperiment', 'batchelor', 'Matrix.utils',
                       'HDF5Array', 'terra', 'ggrastr'),lib = "/opt/R/4.2.1/lib/R/library",destdir = '/home/xhs/Rpack/download')

方法二:通过 github 安装

代码语言:javascript
复制
install.packages("devtools")
devtools::install_github('cole-trapnell-lab/monocle3')

如果网络无法连接到 github,可以将安装包下载到本地,然后本地安装。

代码语言:javascript
复制
#下载 github 软件包,本地安装
devtools::install(pkg = "monocle3-master/")

方法三:利用 bioconda 安装

代码语言:javascript
复制
conda install -c bioconda r-monocle3

1.4 分析流程

monocle3 分析流程图

Monocle 包数据分析主要包含以下过程:

1、读入数据,保存为 cell_data_set 类;

代码语言:javascript
复制
cds <- new_cell_data_set(expression_matrix,
 cell_metadata = cell_metadata,
 gene_metadata = gene_annotation)
## Step 1: Normalize and pre-process the data
cds <- preprocess_cds(cds, num_dim = 100)

2、(可选的)移除批次效应;

代码语言:javascript
复制
## Step 2: Remove batch effects with cell alignment
cds <- align_cds(cds, alignment_group = "batch")

3、细胞聚类;

代码语言:javascript
复制
## Step 3: Reduce the dimensions using UMAP
cds <- reduce_dimension(cds)
## Step 4: Cluster the cells
cds <- cluster_cells(cds)

4、(可选的)细胞排序进行拟时分析

代码语言:javascript
复制
## Step 5: Learn a graph
cds <- learn_graph(cds)
## Step 6: Order cells
cds <- order_cells(cds)
plot_cells(cds)

5、差异表达分析

代码语言:javascript
复制
# With regression:
gene_fits <- fit_models(cds, model_formula_str = "~embryo.time")
fit_coefs <- coefficient_table(gene_fits)
emb_time_terms <- fit_coefs %>% filter(term == "embryo.time")
emb_time_terms <- emb_time_terms %>% mutate(q_value = p.adjust(p_value))
sig_genes <- emb_time_terms %>% filter (q_value < 0.05) %>% pull(gene_short_name)
# With graph autocorrelation:
pr_test_res <- graph_test(cds, neighbor_graph="principal_graph", cores=4)
pr_deg_ids <- row.names(subset(pr_test_res, q_value < 0.05))

写在最后:有时间我们会努力更新的。大家互动交流可以前去论坛,地址在下面,复制去浏览器即可访问,弥补下公众号没有留言功能的缺憾。原地址暂未启用(bioinfoer.com)。

代码语言:javascript
复制
sx.voiceclouds.cn

有些板块也可以预设为大家日常趣事的分享等,欢迎大家来提建议。

本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2022-08-18,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 生信喵实验柴 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
灰盒安全测试
腾讯知识图谱(Tencent Knowledge Graph,TKG)是一个集成图数据库、图计算引擎和图可视化分析的一站式平台。支持抽取和融合异构数据,支持千亿级节点关系的存储和计算,支持规则匹配、机器学习、图嵌入等图数据挖掘算法,拥有丰富的图数据渲染和展现的可视化方案。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档