Page History
Table of Contents | ||||||
---|---|---|---|---|---|---|
|
t-SNE (t-distributed stochastic neighbor embedding) is a visualization method commonly used to analyze single-cell RNA-Seq data. Each cell is shown as a point on the plot and each cell is positioned so that it is close to cells with similar overall gene expression. When working with multiple samples, a t-SNE plot can be drawn for each sample or all samples can be combined into a single plot. Viewing samples individually is the default in Partek Flow Partek® Flow® because sample to sample variation and outlier samples can obscure cell type differences if all samples are plotted together. However, as you will see in this tutorial, in some data sets, cell type differences can be visualized even when samples are combined.
Using the t-SNE plot, cells can be classified based on clustering results or and differences in gene and pathway expressionexpression of key marker genes.
Multiple single-sample t-SNE plots
By default, each sample in a multi-sample data set is plotted on its own t-SNE.
...
Prior to performing t-SNE, it is a good idea to reduce the dimensionality of the data using principal components analysis (PCA).
- Click the Filtered counts data node after the Filter features task
- Select PCA from the Exploratory analysis section of the task menu (Figure 1)
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
- Click Finish to run PCA with default settings (Figure 2)
Note, the default settings include the Split by sample checkbox being selected. This means that the dimensionality reduction will be performed on each sample separately.
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
PCA task and data nodes will be generated.
- Click the PCA data node
- Select t-SNE from the Visualizations Exploratory analysis section of the task menu (Figure 1Figure 3)
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
- Select Click Finish from the t-SNE dialog to run t-SNE with the default settings
...
- (Figure 4)
Numbered figure captions | ||
---|---|---|
|
...
| |||
Because the upstream PCA task was performed separately for each sample, the t-SNE task will also be performed separately for each sample. t-SNE task and data nodes will be generated (Figure 5).
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
Once the t-SNE task has completed, we can view the t-SNE plot.plots
- Select Click the t-SNE task node node
- Select Click Task report from the task menu (Figure 3)
...
- or double click the t-SNE
...
- node
The t-SNE
...
will open in a new data viewer session. The t-SNE plot will open to for the first sample in the data set, Astrocytoma 1 MGH36 (Figure 4)Figure 6), will open on the canvas. Please note that the appearance of the t-SNE plot will may differ each time it is drawn so your t-SNE plots will may look different than those shown in this tutorial; however. However, the cell-to-cell relationships indicated will be the same.
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
The t-SNE plot is in 3D by default. To change the default, click your avatar in the top right > Settings > My Preferences and edit your graphics preferences and change the default scatter plot format from 3D to 2D.
You can rotate the 3D plot by lefleft-clicking and dragging your mouse. You can zoom in and out using your mouse wheel. The 2D t-SNE is also calculated and you can switch between the 2D and 3D plots using the Plot style radio buttons. on the canvas. We will do this later on in the tutorial.
Each sample has its own plot. We can switch between samples using the Back and Next buttons .
- Open the Axes icon on the
...
- Select Next
- left under Configure (Figure 7)
- Navigate to Misc
- Select the icon below the Sample name to go to the next sample
The t-SNE plot has switched to show the next sample, Astrocytoma 2 MGH42 (Figure 57).
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
The goal of this experiment analysis is to compare malignant cells from two different glioma subtypes, astrocytoma and oligodendroglioma. To do this, we need to identify which cells are the malignant cells we want to include and which cell cells are the normal cells we want to exclude.
The t-SNE plot in Partek Flow offers several options for identifying, selecting, and classifying cells. In this tutorial, we will use the expression of known marker genes to identify normal cellscell types.
To visualize the expression of a marker gene, we can color cells on the t-SNE plot by their expression level.
...
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
The cells will turn black and a text box Gene ID will open below the drop-down box.
- Type CD14 in the Gene ID text box
- Select CD14 from the list of genes in the data set (Figure 7)Select any of the count data nodes from Get data on the left (Single cell counts, or any of the Filtered counts, Figure 8)
- Search for the BCAN gene
- Click and drag the BCAN gene onto the plot and drop it over the Green (feature) option
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
The cells will be colored from black to green based on their expression level of CD14BCAN, with cells expressing higher levels more green (Figure 8Figure 9). CD14 is a known marker for microglia and macrophage cells, used by the authors of the original study to classify microglia/macrophage cellsBCAN is highly expressed in glioma cells.
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
In Partek Flow, we can color cells with up to three genes at a timeby more than one gene. We will now add a second glioma marker gene, MOBPGPM6A.
- Select the icon next to CD14
- Type MOBP in the new Gene ID box
- Select MOBP from the list of genes in the data set
...
- any of the count data nodes from the Data card on the left (Single cell counts, or any of the Filtered counts)
- Search for the GPM6A gene
- Click and drag the GPM6A gene onto the plot and drop it over the Red (feature) option
Cells expressing GPM6A are now colored red and cells expressing CD14 BCAN are colored green. Cells expressing both genes are colored yellow, while cells expressing neither are colored black (Figure 9Figure 10).
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
Relative expression of the two genes for selected cells can be visualized on the legend.
...
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
Selected cells are shown in bold and unselected cells are dimmed.
The relative expression of the two genes for the selected cells will be shown on the legend as dots (Figure 11).
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
Numerical expression levels for each gene can be viewed for individual cells.
- Switch modes to pointer mode by selecting clicking in the top right corner of the plot
- Select a cell by pointing and clicking
The expression level for that cell is displayed on the legend for each gene (Figure 12. Expression values can also be viewed by mousing over a cell (Figure 11).
- Deselect the cell by clicking on any black blank space on the plot
Expression values can also be viewing by selecting Gene Expression from the Label by drop-down menu and mousing over a cell.
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
Now that cells are colored by the expression of a microglia/macrophage marker, CD14, and a oligodendrocyte marker, MOBP, two glioma cell markers, we can classify any cell that does not fall into one of these two groups as malignant expresses these genes as glioma cells. Because t-SNE groups cells that are similar across the high-dimensional gene expression data, we will consider cells that form a group with CD14 or MOBP-expressing cells as where the majority of cells express BCAN and/or GPM6A as the same cell type, even if they do not express the either marker gene.
Starting with the Astrocytoma 2 sample, we can classify the malignant cells in each sample.
- Activate the 3D lasso tool by selecting Switch to lasso mode by clicking in the top right of the plot
- Draw the lasso around the cluster of black green, red, and yellow cells and click the circle to close the lasso (Figure 13). You may need to switch to selection mode and rotate the 3D plot to select only cells from the black clusterFigure 12)
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
...
Selected cells are shown in bold and unselected cells are dimmed. The number of selected cells is indicated in the figure legend. The cells are plotted on the color scale depending on their relative expression levels of the two marker genes (Figure 13)
Numbered figure captions | |
---|---|
|
...
|
...
|
...
- Click Classify selection in the Classify icon under Tools
A dialog to give the classification a name will appear.
- Name the classification Malignant Glioma
- Select Click Save (Figure 15Figure 14)
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
Once cells have been classified, the classification is added to the Classifications section of the panel Classify. The number of cells belonging to the classiciation classification is listed; in Astrocytoma 2. In MGH42, there are 253 malignant 460 glioma cells (Figure 15Figure 15).
Numbered figure captions | ||
---|---|---|
|
...
|
...
Classifications made on the t-SNE plot are retained as a draft until you exit the t-SNE task report. The Save classifications button runs a task, Classify cells, which generates a new Classified cells data nodeas part of the data viewer session. In this tutorial, we will classify malignant cells for each sample before we save and apply the classifications, but if necissarynecessary, you can run Classify cells for one sample, exit the t-SNE task report, and continue classifying the next sample later starting with the Classified cells data node.
...
save the data viewer session by clicking the Save icon on the left to retain all of the formatting and draft classifications. The data viewer session will be stored under the Data viewer tab and can be re-opened to continue making classifications at a later time.
- Switch to pointer mode by clicking in the top right corner of the plot
- Deselect the cells by clicking on any blank space on the plot
- Open Axes and navigate to Sample under Misc
- Select the icon below the sample name to go to the next sample, MGH45
- Rotate the 3D t-SNE plot to allow you to select only get a better view of cells from the black green, red, and yellow cluster
- Activate the 3D lasso tool Switch to lasso mode by selecting in the top right corner of the plot
- Draw the lasso around the cluster of black colored cells and click the circle to close the lasso (Figure 16Figure 16).
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
- Select Classify selection selection in the Classify icon
- Type Malignant Glioma or select Malignant Glioma from the prompt (Figure 17drop-down list (Figure 17)
- Select Click Save
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
- Repeat these steps for each of the 5 astrocytoma and 3 oligodendroglioma samples
Once all samples have been classified, it is useful to check the number of cells in each sample assigned to each classification.
...
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
The classifications summary lists every sample, the number of cells in the sample, and the number of cells in each classification (Figure 19).
- 6 remaining samples. Remember to go back to the first sample (MGH36) to classify the glioma cells in that samples too.
There should be 5,322 glioma cells in total across all 8 samples.
- The classification name can be edited or deleted (Figure 18).
Numbered figure captions | ||||||
---|---|---|---|---|---|---|
|
| |||||
With the malignant cells in every sample classified, it is time to save the classifications.
- Select Save classifications
- Select Save when asked to confirm
The pipeline view will open and the Classify cells tasks will run, generating a Classified groups data node (Figure 20).
...
- Click Apply classifications in the Classify icon
- Name the classification attribute Cell type (sample level)
- Click Run (Figure 19)
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
...
| |
The new attribute is stored in the Data tab and is available to any node in the project.
- Click on the Glioma (multi-sample) project name at the top to go back to the Analyses tab
- Your browser may warn you that any unsaved changes to the data viewer session will be lost. Ignore this message and proceed to the Analyses tab
One multi-sample t-SNE plot
For some data sets, cell types can be distinguished when all samples can be visualized together on one t-SNE plot. We will use a t-SNE plot of all samples to classify glioma, microglia/macrophage , and oligodendrocyte cell types.
- Select the Single cell data data node
- Select t-SNE from the Visualizations Click on the Glioma (multi-sample) project name at the top to go back to the Analyses tab
- Click the Filtered counts data node after the Filter features task
- Click PCA in the Exploratory analysis section of the task menu
- Select Configure on the t-SNE dialog Uncheck the Split by sample checkbox (Figure 2122)
- Click Finish
...
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
...
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
...
| |||
The PCA task will run as a new green layer.
- Click the new PCA data node
- Select t-SNE from the Exploratory analysis section of the task menu
- Click Finish to run the t-SNE task with default settings
The t-SNE task will be added as a new to the green layer in the analysis tab (Figure 23).
(Figure 23). Layers are created in Partek Flow when the same task is run on the same data node.
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
Once the task has completed, we can view the plot.
- Select Double-click the green t-SNE plot task node
- Select Task Report from the task menu
...
- data node to open the t-SNE scatter plot
- Click and drag the 2D scatter plot icon onto the canvas and replace the 3D scatter plot (Figure 24)
Numbered figure captions | ||
---|---|---|
|
...
| |||
- Search for and select green t-SNE data node (Figure 25)
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
...
- In the Style icon, choose Sample name from the Color by drop-down list under Color
Viewing the 2D t-SNE plot, while most cells cluster by sample, there are a few clusters with cells from multiple samples (Figure 25Figure 26).
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
Using the known maker marker genes, BCAN (glioma), CD14 and MOBP(microglia), and MAG (oligodendrocytes), we can assess whether these multi-sample clusters belong to our known cell types.
- Select Gene expression from the Color by drop-down menu
- Type CD14 in the new Gene ID box
- Select CD14 from the list of genes in the data set
- Select the icon next to CD14
- Type MOBP in the new Gene ID box
- Select MOBP from the list of genes in the data set
...
- Select any of the count data nodes from the Data card on the left (Single cell counts, or any of the Filtered counts)
- Search for the BCAN gene
- Click and drag the BCAN gene onto the plot and drop it over the Green (feature) option
- Search for the CD14 gene
- Click and drag the CD14 gene onto the plot and drop it over the Red (feature) option
- Search for the MAG gene
- Click and drag the MAG gene onto the plot and drop it over the Blue (feature) option
After coloring by these marker genes, three cell populations are clearly visible (Figure 26Figure 27).
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
...
The red cells are CD14 positive, indicating that they are the microglia from every sample.
- Switch to lasso mode by clicking the icon in the top right of the plot
- Draw the lasso around the cluster of red cells and click the circle to close the lasso (Figure 27Figure 28)
- Open the Classify tool and click Classify selection
- Name the classification Microglia
- Click Save
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
- Select Save classifications
...
The blue cells are MOBP MAG positive, indicating that they are the oligodendrocytes from every sample.
- Name the classification Oligodendrocytes
- Select Save
To clearly see the CD14 positive population, clear the current selection.
- Switch modes by selecting
- Deselect Switch to pointer mode by clicking in the top right corner of the plot
- Deselect the cells by clicking on any black blank space on the plot
Green CD14 positive cells are the microglia/macrophages from every sample.
- Activate the 3D lasso tool by selecting Switch to lasso mode again by clicking the icon in the top right of the plot
- Draw the lasso around the cluster of green blue cells and click the circle to close the lasso (Figure 28)
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
- Select Save classifications
- Name the classification Microglia
- Select Save
- Switch modes by selecting
- Deselect by clicking on any black space on the plot
- Open the Classify tool and click Classify selection
- Name the classification Oligodendrocytes
- Click Save
Finally, we will classify all unclassified the BCAN expressing cells on the plot as the malignant glioma cells from every sample.
- Select Classifications from the Color by drop-down menu
Cells are now colored by classification, with Oligodendrocytes in blue, Microglia in red, and unclassified cells in grey.
- Activate the 3D lasso tool by selecting Switch to pointer mode by clicking in the top right corner of the plot
- Deselect the cells by clicking on any blank space on the plot
- Switch to lasso mode again by clicking the icon in the top right of the plot
- Draw the lasso around the grey cluster of green cells and click the circle to close the lasso
- Open the Classify tool and click Classify selection
- Name the classification Glioma
- Click Save
- Switch to pointer mode by clicking in the top right corner of the plot
- Deselect the cells by clicking on any blank space on the plot
The number of cells classified as microglia, oligodendrocytes, and glioma are shown in Classify (Figure 29)
Numbered figure captions | |
---|---|
|
...
|
...
- Select Save classifications
- Name the classification Malignant
- Select Save
With every cell from every sample classified, we can proceed to save classifications.
- Select Save classifications
- Select Save when asked to confirm
The pipeline view will open and the Classify cells tasks will run, generating a new green-layer Classified groups data node (Figure 30).
...
|
...
- Click Apply classifications in the Classify icon (Figure 30)
Numbered figure captions | ||||
---|---|---|---|---|
| ||||
- Name the classification attribute Cell type (multi-sample) (Figure 31)
- Click Run
Numbered figure captions | ||||||
---|---|---|---|---|---|---|
| ||||||
The new attribute is now available for downstream analysis.
- Click on the Glioma (multi-sample) project name at the top to go back to the Analyses tab
- Your browser may warn you that any unsaved changes to the data viewer session will be lost. Ignore this message and proceed to the Analyses tab
Page Turner | ||
---|---|---|
|
Additional assistance |
---|
Rate Macro | ||
---|---|---|
|
...