scRNA的3大R包对比

评论2,969
用法Seurat 2.xSeurat 3.xScaterMonocle2.xMonocle3.x
创建R包要求的对象CreateSeuratObject()函数不变,参数取消了raw.data,min.genes更改为min.featuresSingleCellExperiment()newCellDataSet(),其中的phenoData、featureData参数都是用new()建立的AnnotatedDataFrame对象new_cell_data_set(),其中的cell_metadata、gene_metadata参数都是数据框
添加注释信息AddMetaData()AddMetaData()或者直接通过object$meta_name可以直接使用sce$meta_nameaddCellType()添加细胞类型可以用基础R函数
QC and selecting cellsce@raw.dataGetAssayData()calculateQCMetrics(),其中的feature_controls参数可以指定过滤指标,然后有一系列的可视化函数。过滤用filter()或isOutlier()用基础R函数进行初步过滤,还可以用detectGenes()函数加上subset()过滤用基础R函数进行初步过滤
表达量的标准化或者归一化NormalizeData(),归一化后检测用sce@dataNormalizeData(),归一化后检测用sce[['RNA']]计算CPM:calculateCPM()、归一化:normalize()estimateSizeFactors()还有estimateDispersionspreprocess_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或者TSNEPlotVizDimLoadings()、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()

发表评论

匿名网友