Support homeLoupe BrowserAnalysis
Characterize Substructure of Clusters

Characterize Substructure of Clusters

Goal: To find subgroups within the clusters and perform differential gene expression. This tutorial will showcase how to isolate subclusters and identify key differentiating gene markers using a preloaded mouse brain dataset in Loupe Browser.

  • Loupe Brower for macOS or Windows
  • Familiarity with Loupe Brower navigation
  • Access to tutorial dataset

In addition to projecting the spots and their associated clusters onto the image, the clustering can also be viewed as a t-SNE or UMAP projection. The linked window option allows you to visualize both views simultaneously. In this example, the UMAP projection is chosen in the main window using the view selector. Click and select Spatial to open the image view in a new window. Note that the colors of the clusters have been customized. Refer to Spatial Clusters tutorial to learn more.


The default clustering results used in this view are from the Graph-based clustering method. The size of the spots can be adjusted using to make them easier to see. Unselect the Auto-scale box and move the slider to set the markers to the desired size. More details in Toolbox description in the Navigation tutorial. The spots belonging to Cluster 3 on the image are spread over two very different regions in the brain tissue sample. To isolate this, uncheck all of the other clusters.


To explore these two subclusters more, create new groups, one for each sub-cluster. To do this, use to manually select one group of spots, create a new Category called Cluster 3 and a new Cluster name called Subcluster A.


From this Cluster 3 view, go back to the Graph-Based view and repeat the steps to select the second group of spots. Associate the spots to the same Category Cluster 3, but assign them to a new Cluster Subcluster B.


Comparing the projection view for Cluster 3 with the spatial view, there are two spots within Subcluster A labeled as belonging to Subcluster B. We can correct this by these steps:

  • First, select the Subcluster A box
  • Zoom into the region on the UMAP plot
  • Use to select these spots and reassigning them to Subcluster A

Since we are interested in the differences between these two Subclusters, choose the Locally Distinguishing option from the Significant Feature Comparison selector in the bottom right and click calculate Refer to the computing significant genes to learn more about this option.


The data panel view is that of the Feature Table which by default lists the top differential expressed up-regulated genes. You can change this behavior by clicking to change the Filter Features options. The table can be exported in CSV format by clicking

Comparing the top three genes for each cluster, we can confirm that the gene expression corresponds to the spatial distribution of associated cell types.

NameSubclusterEnriched CellsMatches Spatial Location
Gpr88AD1 and D2 medium spiny neurons in striatumYes
Atp2b4AEcitatory neurons in cerebral cortexYes
Camk2dAExcitatory neurons of cerebral cortex and amygdalaYes
Olfml2bBExcitatory neurons of CA3 and granule neuroblasts in dentate gyrusYes
Lefty1BExcitatory neurons of CA1 hippocampus subfieldYes
LctBExcitatory neurons of CA1 and CA3 hippocampus subfields and Granule neurons in dentate gyrusYes

Subcluster B which spatially corresponds to the hippocampus region is made of four distinct subfields. Loupe Browser offers the ability to set up filters to identify barcodes for these subfields. The filtered barcodes from regions of interest can subsequently be exported to be used in community-developed analysis tools. To get started, go back to Spatial view in the main window. Click on the mode selector, choose the Filters option, and click the Create new rule button to get started. The first rule corresponds to spatial location. Choose IN [cluster name] and input Subcluster B in the Cluster box. All the spots where the filter is applied appear in purple. A human-readable version of the filter is visible at the bottom of the panel along with the number of barcodes eligible after filtering.


Click the Create new rule button to add additional rule. The second rule corresponds to identifying the dentate gyrus subfield using log2(count). Choose > under Threshold by log2(count), enter C1ql2 in the feature box, and set the threshold at 2.

Click Assign x barcodes to create a new Category called Hippocampus and a new Cluster called DG.


Go back to the Filters mode. The third rule corresponds to CA1 subfield. First, delete the existing filter for DG marker by clicking Click Create a new rule and choose NOT IN [cluster name] and select DG from the list. The purple spots are updated to reflect the filter. This rule is the global rule that will apply for all CA subfield selections.

To apply the third rule, click Add new ruleset and click Create new rule.

Choose > under Threshold by log2(count), enter Fibcd1 in the feature box, and set the threshold at 2. Click Assign x barcodes to Hippocampus category and a new Cluster called CA1.


Follow the same steps as those for the third rule. Note that since the global rule is already defined, only the subfield-specific rule needs to be applied. For the fourth rule, update the second ruleset with Cacng5 with a threshold of 2. Assign the filtered barcodes using Assign x barcodes to Hippocampus category and a new Cluster called CA2.


For the fifth rule, update the second ruleset with Bok with a threshold of 3. Click Create a new rule in the second ruleset to add another rule.

Choose > under Threshold by log2(count), enter Lpl in the feature box, and set the threshold at 3. Note that the AND/OR applies to each ruleset you create offering the flexibility to build complex filters. Assign the filtered barcodes using Assign x barcodes to Hippocampus category and a new Cluster called CA3.

With the subfields defined, to analyze the differential gene expression between these regions, choose the Locally Distinguishing option from the Significant Feature Comparison selector in the bottom right and click calculate