Partek Flow Documentation

Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

 

This tutorial presents an outline of the basic series of steps for analyzing a 10x Genomics Gene Expression with Feature Barcoding (antibody) data set in Partek Flow starting with the output of Cell Ranger.  

If you are starting with the raw data (FASTQ files), please begin with our Processing CITE-Seq data tutorial, which will take you from raw data to count matrix files. 

If you have Cell Hashing data, please see our documentation on Hashtag demultiplexing

This tutorial includes only one sample, but the same steps will be followed when analyzing multiple samples. For notes on a few aspects specific to a multi-sample analysis, please see our Single Cell RNA-Seq Analysis (Multiple Samples) tutorial. 

If you are new to Partek Flow, please see Getting Started with Your Partek Flow Hosted Trial for information about data transfer and import and Creating and Analyzing a Project for information about the Partek Flow user interface.  

Data set

The data set for this tutorial is a demonstration data set from 10x Genomics. The sample includes cells from a dissociated Extranodal Marginal Zone B-Cell Tumor (MALT: Mucosa-Associated Lymphoid Tissue) stained with BioLegend TotalSeq-B antibodies. We are starting with the Feature / cell matrix HDF5 (filtered) produced by Cell Ranger. 

Importing feature barcoding data

  • Click Import data
  • Click Single cell data
  • Choose the filtered HDF5 file produced by Cell Ranger
  • Click Next
  • Name the sample (default is the file name)
  • Specify the annotation used for the gene expression data (here, we choose hg38 and Ensembl 94)
  • Uncheck Report features without counts
  • Click Finish (Figure 1)

Figure 1. Configuring import of the HDF5 file produced by Cell Ranger 3

A Single cell counts data node will be created after the file has been imported.

Split matrix

The Single cell counts data node contains two different types of data, mRNA measurements and protein measurements. So that we can process these two different types of data separately, we will split the data by data type. 

  • Click the Single cell counts data node
  • Click the Pre-analysis tools section of the toolbox
  • Click Split matrix

A rectangle, or task node, will be created for Split matrix along with two output circles, or data nodes, one for each data type (Figure 2). The labels for these data types are determined by features.csv file used when processing the data with Cell Ranger. Here, our data is labeled Gene Expression, for the mRNA data, and Antibody Capture, for the protein data. 

 

Figure 2. Split matrix produces two data nodes, one for each data type

Filter low-quality cells

An important step in analyzing single cell RNA-Seq data is to filter out low-quality cells. A few examples of low-quality cells are doublets, cells damaged during cell isolation, or cells with too few reads to be analyzed. In a CITE-Seq experiment, protein aggregation in the antibody staining reagents can cause a cell to have a very high number of counts; these are low-quality cells are can be excluded. Additionally, if all cells in a data set are expected to show a baseline level of expression for one of the antibodies used, it may be appropriate to filter out cells with very low counts. You can do this in Partek Flow using the Single cell QA/QC task. 

We will start with the protein data.

  • Click the Antibody Capture data node
  • Click the QA/QC section in the toolbox
  • Click Single Cell QA/QC
  • Choose the assembly and annotation used for the gene expression data (Figure 3) from the drop-down menus
  • Click Finish

Figure 3. Configuring Single-cell QA/QC

This produces a Single-cell QA/QC task node (Figure 4). 

 

Figure 4. Single cell QA/QC produces a task node
  • Double-click the Single cell QA/QC task node to open the task report

The task report lists the number of counts per cell and the number of detected features per cell in two violin plots. For more information, please see our documentation for the Single cell QA/QC task. For this analysis, we will set a maximum counts threshold to exclude potential protein aggregates and, because we expect every cell to be bound by several antibodies, we will also set a minimum counts threshold. 

  • Set the Counts filter to Keep cells between 500 and 20000 (Figure 5)

 

 

Figure 5. Single cell QA/QC report - Antibody capture
  • Click Apply filter to run the Filter cells task

The output is a Filtered single cell counts data node (Figure 6).

 

Figure 6. Filtered cells output

Next, we can repeat this process for the Gene Expression data node. 

  • Click the Gene Expression data node
  • Click the QA/QC section in the toolbox
  • Click Single Cell QA/QC
  • Choose the assembly and annotation used for the gene expression data (Figure 3) from the drop-down menus
  • Click Finish

This produces a Single-cell QA/QC task node (Figure 7). 

 

Figure 7. Single cell QA/QC produces a task node
  • Double-click the Single cell QA/QC task node to open the task report

The task report lists the number of counts per cell, the number of detected features per cell, and the percentage of mitochondrial reads per cell in three violin plots. For this analysis, we will set a maximum counts threshold maximum and minimum thresholds for total counts and detected genes to exclude potential doublets and a maximum mitochondrial reads percentage filter to exclude potential dead or dying cells. 

  • Set the Counts filter to Keep cells between 1500 and 15000 
  • Set the Detected genes filter to Keep cells between 400 and 4000
  • Set the Mitochondrial counts filter to Keep cells between 0% and 20% (Figure 8)

 

Figure 8. Filtering low-quality cells by gene expression data
  • Click Apply filter to run the Filter cells task

The output is a Filtered single cell counts data node (Figure 9).

 

Figure 9. There are now two Filtered single cell counts data nodes

Normalization

After excluding low-quality cells, we can normalize the data. 

We will start with the protein data. We will normalize this data using Centered log-ratio (CLR). CLR was used to normalize antibody capture protein counts data in the paper that introudced CITE-Seq (Stoeckius et al. 2017) and in subsequent publications on similar assays (Stoeckiius et al. 2018, Mimitou et al. 2018). CLR normalization includes the following steps: Add 1, Divide by Geometric mean, Add 1, log base e.

  • Click the Filtered single cell counts data node produced by filtering the Antibody Capture data node
  • Click the Normalization and scaling section in the toolbox
  • Click Normalization
  • Click the green plus next to CLR or drag CLR to the right-hand panel
  • Click Finish to run (Figure 10)

Figure 10. Performing CLR normalization

Normalization produces a Normalized counts data node on the Antibody Capture branch of the pipeline. 

Next, we can normalize the mRNA data. We will use the recommended normalization method in Partek Flow, which accounts for differences in library size, or the total number of UMI counts, per cell and log transforms the data. To match the CLR normalization used on the Antibody Capture data, we will use a log e transformation instead of the default log 2.

  • Click the Filtered single cell counts data node produced by filtering the Gene Expression data node
  • Click the Normalization and scaling section in the toolbox
  • Click Normalization
  • Click the  button 
  • Change the log base from 2 to e
  • Click Finish to run (Figure 11)

Figure 11. Choosing CLR normalization

Normalization produces a Normalized counts data node on the Gene Expression branch of the pipeline (Figure 12). 

 

 
Figure 12. Both Antibody Capture and Gene Expression data has been normalizied

Merge Protein and mRNA data

For quality filtering and normalization, we needed to have the two data types separate as the processing steps were distinct, but for downstream analysis we want to be able to analyze protein and mRNA data together. To bring the two data types back together, we will merge the two normalized counts data nodes.

  • Click the Normalized counts data node on the Antibody Capture branch of the pipeline
  • Click the Single cell counts data node
  • Click the Pre-analysis tools section of the toolbox
  • Click Merge matrices
  • Click Select data node to launch the data node selector

Data nodes that can be merged with the Antibody Capture branch Normalized counts data node are shown in color (Figure 13).

 

Figure 13. Choosing a data node to merge
  • Click the Normalized counts data node on the Gene Expression branch of the pipeline

A black outline will appear around the chosen data node. 

  • Click Select
  • Click Finish to run the task

The output is a Merged counts data node (Figure 14). This data node will include the normalized counts of our protein and mRNA data. The intersection of cells from the two input data nodes is retained so only cells that passed the quality filter for both protein and mRNA data will be included in the Merged counts data node. 

 

Figure 14. Merging data types prior to downstream analysis

Collapsing tasks to simplify the pipeline

To simplify the appearance of the pipeline, we can group task nodes into a single collapsed task. Here, we will collapse the filtering and normalization steps.

  • Right-click the Split matrix task node 
  • Choose Collapse tasks from the pop-up dialog (Figure 15)

Figure 15. Choosing the first task node to generate a collapsed task

Tasks that can for the beginning and end of the collapsed section of the pipeline are highlighted in purple (Figure 16). We have chosen the Split matrix task as the start and we can choose Merge matrices as the end of the collapsed section. 

 

 

Figure 16. Tasks that can be the start or end of a collapsed task are shown in purple
  • Click Merge matrices to choose it as the end of the collapsed section

The section of the pipeline that will form the collapsed task is highlighted in green.

  • Name the Collapsed task Data processing
  • Click Save (Figure 17)

 

Figure 17. Naming the collapsed task
The new collapsed task, Data processing, appears as a single rectangle on the task graph (Figure 18). 

 

Figure 18. Collapsed tasks are represented by a single task node

To view the tasks in Data processing, we can expand the collapsed task.

  • Double-click Data processing to expand it

When expanded, the collapsed task is shown as a shaded section of the pipeline with a title bar (Figure 19).

 

Figure 19. Expanding a collapsed task to show its components

To re-collapse the task, you can double click the title bar or click the  icon in the title bar. To remove the collapsed task, you can click the . Please note that this will not remove tasks, just the grouping.

  • Double-click the Data processing title bar to re-collapse (Figure 18)

Choosing the number of PCs

In this data set, we have two data types. We can choose to run analysis tasks on one or both of the data types. Here, we will run PCA on only the mRNA data to find the optimal number of PCs for the mRNA data. 

  • Click the Merged counts node 
  • Click Exploratory analysis in the task menu
  • Click PCA

Because we have multiple data types, we can choose which we want to use for the PCA calculation. 

  • Click Gene Expression for Include features where "Feature type" is
  • Click Configure to access the advanced settings
  • Click Generate PC quality measures 

This will generate a Scree plot, which is useful for determining how many PCs to use in downstream analysis tasks. 

  • Click Apply 
  • Click Finish to run (Figure 15)

Figure 20. Configuring PCA to run on the Gene Expression data

A PCA task node will be produced. 

  • Double-click the PCA task node to open the PCA task report

The PCA task report includes the PCA plot, the Scree plot, the component loadings table, and the PC projections table. To switch between these elements, use the buttons in the upper right-hand corner of the task report . Each cell is shown as a dot on the PCA scatter plot. 

  • Click  to open the Scree plot

The Scree plot lists PCs on the x-axis and the amount of variance explained by each PC on the y-axis, measured in Eigenvalue. The higher the Eigenvalue, the more variance is explained by the PC. Typically, after an initial set of highly informative PCs,  the amount of variance explained by analyzing additional PCs is minimal. By identifying the point where the Scree plot levels off, you can choose an optimal number of PCs to use in downstream analysis steps like graph-based clustering and t-SNE. 

  • Mouse over the Scree plot to identify the point where additional PCs offer little additional information (Figure 16)

Figure 21. Identifying an optimal number of PCs

In this data set, a reasonable cut-off could be set anywhere between around 10 and 30 PCs. We will use 15 in downstream steps. 

Cluster by Gene Expression data

CITE-Seq data includes both gene and protein expression information. When the data types are combined, we can perform downstream analysis using both data types. We will begin with the mRNA data.

  • Click the Merged counts data node
  • Click Exploratory analysis in the toolbox
  • Click Graph-based clustering 
  • Click Gene Expression for Include features where "Feature type" is
  • Click Configure to access the advanced settings
  • Set Number of principal components to 15
  • Click Apply 
  • Click Finish to run (Figure 17)

Figure 22. Running Graph-based clustering on the Gene Expression data

Once Graph-based clustering has finished running and produced a Clustering result data node, we can visualize the results using UMAP or t-SNE. Both are dimensional reduction techniques that group cells with similar expression into visible clusters. 

  • Click the Clustering result data node 
  • Click Exploratory analysis in the toolbox
  • Click UMAP
  • Click Gene Expression for Include features where "Feature type" is
  • Click Configure to access the advanced settings
  • Set Number of principal components to 15
  • Click Apply 
  • Click Finish to run (Figure 18)

Figure 23. Running UMAP on the Gene Expression data

The Analyses tab now includes a UMAP task node (Figure 18).

 

Figure 24. Appearance of the Analyses tab after Graph-based clustering and UMAP on Gene Expression data
  • Double-click the UMAP task node to open the task report

The UMAP task report includes a scatter plot with the clustering results coloring the points (Figure 19).

 

Figure 25. UMAP calculated on Gene Expression values. Colored by Graph-based clustering results.

An advantage of UMAP over t-SNE is that is preserves more of the global structure of the data. This means that with UMAP, more similar clusters are closer together while dissimilar clusters are further apart. With t-SNE, the relative positions of clusters to each other are often uninformative.  

  • Click the 2D radio button for Plot style to switch to the 2D UMAP (Figure 20)

Figure 26. Viewing the 2D UMAP

Classifying cells by clustering, gene, and protein expression

  • Click  to activate the lasso tool
  • Draw a lasso around clusters 3, 4, and 6 (Figure 21) to select them

Figure 27. Selecting a group of clusters
  • Click  to filter to include only the selected cells
  • Click  to rescale the axes to the included cells (Figure 22)

Figure 28. Zooming to a group of clusters in UMAP

Because we merged the gene and protein expression data, we can visualize a mix of genes and proteins on the gene expression UMAP.

  • Choose Expression from the Color by drop-down menu
  • Type NKG7 in the search box and choose NKG7 from the drop-down (Figure 23)

Figure 29. Coloring by NKG7 expression
This will color the plot by NKG7 gene expression, a marker for cytotoxic cells. We can color by two T cell protein markers to distinguish cytotoxic T cells from helper T cells. 

  • Click  to color by a second feature (gene or protein)
  • Type CD4 and choose CD4_TotalSeqB from the drop-down (Figure 24)

Figure 30. Coloring by a second feature

This will color the plot by NKG7 gene expression and CD4 protein expression, a marker for helper T cells. We can add a third feature.

  • Click  to color by a second feature (gene or protein)
  • Type CD3 and choose CD3_TotalSeqB from the drop-down

This will color the plot by NKG7 gene expression, CD4 protein expression, and CD3 protein expression. Each feature gets a color channel, green, red, or blue. Cells without expression are black and the mix of green, red, and blue is determined by the relative expression of the three genes. Cells expressing both CD4 protein (red) and CD3 protein (blue), but not NKG7 (green) are purple, while cells expressing both NKG7 (green) and CD3 protein (blue) are teal (Figure 25). CD3 is a pan-T cells marker, which helps confirm that this group of clusters is composed of T cells. 

Figure 31. UMAP colored by gene and protein expression

In addition to coloring by the expression of genes and proteins, we can select cells by their expression levels.

  • Click the Features tab in the Selection / Filtering section of the control panel
  • Type NKG7 in the ID search bar of the Features tab
  • Click NKG7 to select it
  • Click  to add a filter for NKG7 expression

By default, any cell that expresses >= 1 normalized count of NKG7 is now selected (Figure 26).

 

Figure 32. Selecting by NKG7 expression
  • Type CD3 in the ID search bar of the Features tab
  • Click CD3_TotalSeqB in the drop-down
  • Click  to add a filter for CD3 protein expression

Now, any cell that expresses >= 1 normalized count for NKG7 gene and CD3 protein is selected. You can also require that a cell not express a gene or protein.

  • Type CD4 in the ID search bar of the Features tab
  • Click CD4_TotalSeqB in the drop-down
  • Click  to add a filter for CD4 protein expression
  • Set the CD4_TotalSeqB filter to <= 2 

We have now selected only cells that express >= 1 normalized count for NKG7 gene and CD3 protein, but also have <= 2 normalized count for CD4 protein (Figure 27).

Figure 33. Filtering using multiple genes and proteins

We can classify these cells. Because they express the pan T cell maker, CD3, and the cytotoxic marker, NKG7, but not the helper T cell marker, CD4, we can classify these cells as Cytotoxic T cells. 

  • Click Classify selection
  • Type Cytotoxic T cells for the name
  • Click Save

To classify the helper T-cells, we can modify the selection criteria. 

  • Set NKG7 to =< 1
  • Set CD4_TotalSeqB to >= 2

We have now selected the CD4 positive, CD3 positive, NKG7 negative helper T cells (Figure 28).

 

Figure 34. Modifying the selection criteria lets us select helper T cells
  • Click Classify selection
  • Type Helper T cells for the name
  • Click Save

We can check the results of our classification.

  • Click Clear selection
  • Select Classification from the Color by drop-down menu (Figure 29)

Figure 35. Viewing cytotoxic and helper T cell classifications

To return to the full data set, we can clear the filter.

  • Click Clear filters 

The zoom level will also be reset (Figure 30).

 

Figure 36. Resetting filters also resets the zoom level

In addition to T-cells, we would expect to see B lymphocytes, at least some of which are malignant, in a MALT tumor sample. We can color the plot by expression of a B cell marker to locate these cells on the UMAP plot. 

  • Choose Expression from the Color by drop-down menu
  • Type CD19 in the search box
  • Click CD19_TotalSeqB in the drop-down

 There are several clusters that show high levels of CD19 protein expression (Figure 31). We can filter to these cells to examine them more closely.

 

Figure 37. Viewing CD19 protein expression on the UMAP plot
  • Click  to activate the lasso tool
  • Draw a lasso around the CD19 protein-expressing clusters to select them
  • Click  to filter to include only the selected cells
  • Click  to rescale the axes to the included cells (Figure 32)

Figure 38. Filtering to CD19 expressing clusters

We can use information from the graph-based clustering results to help us find sub-groups within the CD19 protein-expressing cells.

  • Choose Graph-based from the Color by drop-down menu 

With the help of the Group biomarkers table, we can quickly characterize a few notable sub-groups based on their clusters (Figure 33).

 

Figure 39. Viewing B lymphocyte clusters

Cluster 7, shown in pink, lists IL7R and CD3D, genes typically expressed by T cells, as two of its top biomarkers. Biomarkers are genes or proteins that are expressed highly in a clusters when compared with the other clusters. Therefore, the cells in cluster 7 are likely doublets as they express both B cell (CD19) and T cell (CD3D) markers. 

  • Choose Graph-based from the Select by drop-down in the Attributes tab of the Selection / Filtering section of the control panel (Figure 34)

Figure 40. Selecting by cluster
  • Click the check box for to select cluster 7
  • Click Classify selection 
  • Name the cells Doublets 
  • Click Save 
  • Click Clear selection 

The biomarkers for clusters 1 and 2 also show an interesting pattern. Cluster 1 lists IGHD as its top biomarker, while cluster 2 lists IGHA1. Both IGHD (Immunoglobulin Heavy Constant Delta) and IGHA1 (Immunoglobulin Heavy Constant Alpha 1) encode classes of the immunoglobulin heavy chain constant region. IGHD is part of IgD, which is expressed by mature B cells, and IGHA1 is part of IgA1, which is produced by plasma cells. We can color the plot by both of these genes to visualize their expression.

  • Click IGHD in the Group biomarkers table
  • Hold Ctrl on your keyboard and click IGHA1 in the Group biomarkers table

This will color the plot by IGHD and IGHA1 (Figure 35).

 

 

Figure 41. Coloring by two genes from the Group biomarkers table

The clusters on the left show expression of IGHA1 while the larger or the two clusters on the right expresses IGHD. We can use the lasso tool to classify these populations.

  • Select the left-hand cluster with IGHA1 expression (Figure 36)

Figure 42. Selecting the IGHA1+ cells
  • Click Classify selection
  • Name them Plasma cells 
  • Click Save
  • Double-click any white-space on the plot to clear the selection

We can now classify the cluster that expresses IGHD as mature B cells. 

  • Draw a lasso around the right-hand cluster (Figure 37)

Figure 43. Selecting the IGHD+ mature B cells
  • Click Classify selection
  • Name them Mature B cells
  • Click Save
  • Double-click any white-space on the plot to clear the selection

We can visualize our classifications.

  • Select Classifications from the Color by drop-down menu
  • Click Clear filters to view all cells (Figure 38)

Figure 44. Viewing classifications

To use these classifications in downstream, we can apply the classifications.

  • Click Apply classifications 
  • Click Apply to confirm

This will produce a Classified groups data node. 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • No labels