No Cluster ID's present when making UMAP for Joint RNA and ATAC analysis: Signac 10x multiomic tutorial
1
0
Entering edit mode
14 days ago
bgbs • 0

Hello,

I've been following the Joint RNA and ATAC analysis: 10x multiomic tutorial with my own snRNAseq + snATACseq data. I've completed all steps until the Joint UMAP visualization step. I skipped the annotating cell types step because I don't have annotations for this data yet, which is from the Primary Visual Cortex (V1) from Macaca fascicularis. I'm trying to create a UMAP for my 7 samples, but I'm not sure why it isn't generating a normal UMAP with cluster id's for each cluster. Below is my code for sample 1.

# build a joint neighbor graph using both assays
liftoff_1_MI5_V1_SO <- FindMultiModalNeighbors(
  object = liftoff_1_MI5_V1_SO,
  reduction.list = list("pca", "lsi"), 
  dims.list = list(1:50, 2:40),
  modality.weight.name = "RNA.weight",
  verbose = TRUE
)

# build a joint UMAP visualization
liftoff_1_MI5_V1_SO <- RunUMAP(
  object = liftoff_1_MI5_V1_SO,
  nn.name = "weighted.nn",
  assay = "RNA",
  verbose = TRUE
)

DimPlot(liftoff_1_MI5_V1_SO, label = TRUE, repel = TRUE, reduction = "umap") + NoLegend()

# not sure why everything is one color?

no cluster id umap

It seems to color all the cells by orig.ident which is not what I was expecting. I then tried the standard Seurat steps from their Guided Clustering Tutorial to generate the UMAP, but I was getting errors.

liftoff_1_MI5_V1_SO <- FindNeighbors(liftoff_1_MI5_V1_SO, dims = 1:30, return.neighbor = TRUE)
# Computing nearest neighbor graph
# Computing SNN

liftoff_1_MI5_V1_SO <- FindClusters(liftoff_1_MI5_V1_SO, resolution = c(0.4, 0.5, 0.6, 0.7, 0.8))
# Error in FindClusters.Seurat(liftoff_1_MI5_V1_SO, resolution = c(0.4,  : 
#   Provided graph.name not present in Seurat object

liftoff_1_MI5_V1_SO <- RunUMAP(liftoff_1_MI5_V1_SO, dims = 1:30)
DimPlot(liftoff_1_MI5_V1_SO, reduction = "umap", label = TRUE)

I'm not sure why I'm getting this error? Do I need to run the Seurat steps to generate the UMAP for each sample? Do I need to run the standard Seurat Find Neighbors, Find Clusters, RunUMAP, & DimPlot separately for the RNA assay and the ATAC assay before making a joint UMAP? How can I calculate the resolution for the joint (snRNAseq + snATACseq) UMAP? How can I make the UMAP so that each cluster has a cluster ID and each cluster has a different color like normal?

multiomics snATACseq snRNAseq • 377 views
ADD COMMENT
0
Entering edit mode
14 days ago

Your object has no clusters set as Idents.

So yes, you need to call clusters first.

liftoff_1_MI5_V1_SO <- FindNeighbors(liftoff_1_MI5_V1_SO, dims = 1:30, return.neighbor = TRUE)

Remove return.neighbor=TRUE, not sure why you're using that.

liftoff_1_MI5_V1_SO <- FindClusters(liftoff_1_MI5_V1_SO, resolution = c(0.4, 0.5, 0.6, 0.7, 0.8))

Only 1 resolution should be provided.

ADD COMMENT
0
Entering edit mode

Thanks for your response. I was able to fix this by first making the UMAP for the snRNAseq assay. I re-ran FindNeighbors and then re-ran FindClusters after specifying the neighbor method to use to find clusters with the graph.name parameter.

liftoff_1_MI5_V1_SO <- FindNeighbors(liftoff_1_MI5_V1_SO, dims = 1:30)
# > names(liftoff_1_MI5_V1_SO@graphs)
# [1] "wknn"    "wsnn"    "SCT_nn"  "SCT_snn"
# try running this find clusters command (WORKED!)
liftoff_1_MI5_V1_SO <- FindClusters(liftoff_1_MI5_V1_SO, graph.name = "SCT_snn", resolution = 0.4)
# "SCT_snn" is used as it corresponds to the shared nearest neighbor (SNN) graph generated during normalization with SCTransform
liftoff_1_MI5_V1_SO <- RunUMAP(liftoff_1_MI5_V1_SO, dims = 1:30)
DimPlot(liftoff_1_MI5_V1_SO, reduction = "umap", group.by = "SCT_snn_res.0.4", label = TRUE)

Next, I made a separate UMAP for the snATACseq assay.

# I already ran SCTransform (snRNAseq) and RunTFIDF, FindTopFeatures, & RunSVD (snATACseq) for each sample
# ATAC analysis
# We exclude the first dimension as this is typically correlated with sequencing depth
liftoff_1_MI5_V1_SO <- RunUMAP(liftoff_1_MI5_V1_SO, reduction = 'lsi', dims = 2:50, reduction.name = "umap.atac", reduction.key = "atacUMAP_")
# reduction.key is what the x and y axis are labeled by (PC1 ON X AND PC2 ON Y)
DimPlot(liftoff_1_MI5_V1_SO, reduction = "umap.atac", label = TRUE, label.size = 2.5, repel = TRUE) + ggtitle("1_MI5_snATAC")

Lastly, I made a combined multiomics UMAP (snRNAseq + snATACseq) using the following tutorial.

# resolution is 0.4
liftoff_1_MI5_V1_SO <- FindMultiModalNeighbors(liftoff_1_MI5_V1_SO, reduction.list = list("pca", "lsi"), dims.list = list(1:30, 2:30))
liftoff_1_MI5_V1_SO <- RunUMAP(liftoff_1_MI5_V1_SO, nn.name = "weighted.nn", reduction.name = "wnn.umap", reduction.key = "wnnUMAP_")
liftoff_1_MI5_V1_SO <- FindClusters(liftoff_1_MI5_V1_SO, graph.name = "wsnn", algorithm = 3, verbose = FALSE)
DimPlot(liftoff_1_MI5_V1_SO, reduction = "wnn.umap", label = TRUE, label.size = 2.5, repel = TRUE) + ggtitle("snRNA + snATAC")
ADD REPLY

Login before adding your answer.

Traffic: 1633 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6