5.3.3 scRNA的3大R包对比

刘小泽写于19.9.3

将主要介绍Seurat V2、V3、Scater、Monocle V2、Monocle V3之间的差异 表格可以左右滑动哦!

用法

Seurat 2.x

Seurat 3.x

Scater

Monocle2.x

Monocle3.x

创建R包要求的对象

CreateSeuratObject()

函数不变,参数取消了raw.data,min.genes更改为min.features

SingleCellExperiment()

newCellDataSet(),其中的phenoData、featureData参数都是用new()建立的AnnotatedDataFrame对象

new_cell_data_set(),其中的cell_metadata、gene_metadata参数都是数据框

添加注释信息

AddMetaData()

AddMetaData()或者直接通过object$meta_name

可以直接使用sce$meta_name

addCellType()添加细胞类型

可以用基础R函数

QC and selecting cell

sce@raw.data

GetAssayData()

calculateQCMetrics(),其中的feature_controls参数可以指定过滤指标,然后有一系列的可视化函数。过滤用filter()或isOutlier()

用基础R函数进行初步过滤,还可以用detectGenes()函数加上subset()过滤

用基础R函数进行初步过滤

表达量的标准化或者归一化

NormalizeData(),归一化后检测用sce@data

NormalizeData(),归一化后检测用sce[['RNA']]

计算CPM:calculateCPM()、归一化:normalize()

estimateSizeFactors()还有estimateDispersions

preprocess_cds()

寻找重要的基因

FindVariableGenes()

FindVariableFeatures(),其中算法有变动

没有专门函数

differentialGeneTest()函数

版本3和版本2的差异分析可以说是完全不同,版本3取代了2中的differentialGeneTest() and BEAM()。它利用fit_models()或graph_test()

去除干扰因素

ScaleData(),结果存储在sce@scale.data中

ScaleData(),结果存储在sce[["RNA"]]@scale.data中

limma的removeBatchEffect()、scran的mnnCorrect()

去除干扰因素的功能被包装在降维函数中

preprocess_cds()中指定参数residual_model_formula_str

降维

PCA:RunPCA(),参数pc.genes,结果存储在sce@dr$pca@gene.loadings tSNE:RunTSNE()

PCA:RunPCA(),参数features,结果存储在sce@reductions$pca@feature.loadings tSNE:RunTSNE()

PCA:runPCA(),结果在reducedDims中; tSNE:runTSNE()

reduceDimension函数,可以选择多种参数

reduce_dimension(),算法包括UMAP", "tSNE", "PCA" and "LSI"

降维后可视化

VizPCA和PCElbowPlot;PCAPlot或者TSNEPlot

VizDimLoadings()、DimPlot()、DimHeatmap()、ElbowPlot()

plotReducedDim()、plotPCA()

plot_cell_clusters()

plot_cells()

细胞聚类

FindClusters()

FindNeighbors() + FindClusters()

没有包装聚类函数,可以辅助其它R包,或者R基础函数

clusterCells()

cluster_cells(),依赖一个Python模块louvain

找marker基因

FindMarkers()或FindAllMarkers()

FindMarkers()或FindAllMarkers(),VlnPlot()、FeaturePlot()可视化

借助SC3包

newCellTypeHierarchy()、 classifyCells()

top_markers()

绘图相关

基因相关性绘图:GenePlot();细胞相关性绘图:CellPlot(),选择细胞用sce@cell.names

基因相关性绘图:FeatureScatter();细胞相关性绘图:CellScatter(),选择细胞用colnames(sce)

基因相关性绘图:绘制基因表达相关plotExpression();检测高表达基因plotHighestExprs()、表达频率plotExprsFreqVsMean()、细胞质控plotColData()、表达量累计贡献plotScater()

plot_cell_trajectory()、plot_genes_in_pseudotime()、plot_genes_jitter()、plot_pseudotime_heatmap()、plot_genes_branched_heatmap()、plot_genes_branched_pseudotime()

plot_pc_variance_explained()、对每组的marker基因可视化: plot_genes_by_group()、3D发育轨迹plot_cells_3d()、画小提琴图:plot_genes_violin()

最后更新于