Changes between Version 58 and Version 59 of SOP/scRNA-seq


Ignore:
Timestamp:
04/25/24 11:27:04 (3 weeks ago)
Author:
gbell
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SOP/scRNA-seq

    v58 v59  
    207207}}}
    208208The clustering at different resolutions are stored in all_Filt$RNA_snn_res.0.3, all_Filt$RNA_snn_res.0.4, and all_Filt$RNA_snn_res.0.5
     209
     210=== Optimize UMAP plots ===
     211
     212Default UMAP plots have at least two shortcomings: (1) axes are labeled like 'UMAP_1' instead of the clearer-to-read 'UMAP 1', and (2) cluster numbering starts with 0, even though most people start counting at 1.  These can both be corrected.
     213
     214{{{
     215# Change the x-axis and y-axis labels from "UMAP_1/UMAP_2" to "UMAP 1/UMAP 2"
     216DimPlot(all_Filt, reduction = "umap") + xlab('UMAP 1') +  ylab('UMAP 2') + ggtitle('UMAP with relabeled axes') + theme(plot.title = element_text(hjust = 0.5))
     217# Rename the cluster numbers by adding 1
     218all_Filt$new_labels <- as.numeric(as.character(all_Filt$seurat_clusters)) + 1
     219# Plot the cells using these new labels
     220DimPlot(all_Filt, reduction = "umap", group.by = "new_labels") + xlab('UMAP 1') +  ylab('UMAP 2') + ggtitle('UMAP with relabeled axes and new cluster numbers') + theme(plot.title = element_text(hjust = 0.5))
     221# Add cluster labels (slightly transparent) on top of each cluster
     222DimPlot(all_Filt, reduction = "umap", group.by = "new_labels", label = T, label.size=10, label.color="#00000088") + xlab('UMAP 1') +  ylab('UMAP 2') + ggtitle('Final UMAP') + theme(plot.title = element_text(hjust = 0.5))
     223}}}
     224
    209225=== Identify genes that differentially expressed between samples or clusters ===
    210226
     
    234250                                        ident.2 = "18"
    235251}}}
     252
    236253=== Add biological annotations to cells or cell clusters  ===
    237254