文章预览
教程首页 官网教程地址:https://stemangiola.github.io/tidySingleCellExperiment/articles/introduction.html 降低维度 我们可以使用scater计算前3个UMAP维度。 pbmc_small_UMAP < - pbmc_small_cluster %>% runUMAP(ncomponents=3) pbmc_small_UMAP %>% plot_ly( x=~`UMAP1`, y=~`UMAP2`, z=~`UMAP3`, color=~label, colors=friendly_cols[1:4]) 细胞类型预测 我们可以使用SingleR推断细胞类型)并使用tidyverse操作输出。 # Get cell type reference data blueprint < - celldex::BlueprintEncodeData() # Infer cell identities cell_type_df < - logcounts(pbmc_small_UMAP) %>% Matrix::Matrix(sparse = TRUE) %>% SingleR::SingleR( ref=blueprint, labels=blueprint $label .main, method= "single" ) %>% as.data.frame() %>% as_tibble(rownames= "cell" ) %>% s
………………………………