Importing Spatial and Clonotype Data

Learn how to import spatial coordinates post-analysis to combine gene expression data with spatial organization for deeper biological insights.

Import spatial coordinates

At single-cell resolution, spatial data can provide biologically meaningful insights by integrating the spatial location with the gene expression of cells. Understanding the organisational structure of cells can help unravel patterns in cell to cell interaction within their microenvironment in the tissue.

❗️ Note: Spatial data can only be added post-analysis of your dataset on the platform.


Steps

Step 1. From the explorer page of your dataset, open the Cell metadata dropdown and choose the Import button at the bottom.

Step 2. Here you can import a comma separated csv file with the spatial data. See the Example file section below on what we expect in the file.

Step 3. After selecting the file for upload and you can choose to exclude columns in the file. In the demo above, we selected the spatial x and y coordinate values.

Step 4. When the import is successful, you can switch from the current UMAP scatter plot to the spatial from the options beneath the UMAP.

Step 5. If the size of the points are too small, you can increase their size and opacity from the scatter plot settings.

💡 Example file: Spatial coordinates in csv

spatial_data_upload.csv

The example file was made using spatial data from 10X Genomics Space Ranger output files, specifically the file tissue_positions_list.csv which contains the barcodes and the pixel coordinates for the sample in the dataset.

We used the columns pxl_row_in_fullres and pxl_col_in_full_res for our spatial_y and spatial_x coordinates. The columns were renamed for our platform to find the correct data to import. You can choose your own prefix for the coordinate columns, this might be helpful if you are importing multiple spatial coordinates into a dataset with multiple samples.

❗️ Important: We use the barcodes to match to the cells in the uploaded dataset, if you have a merged dataset, please check if the barcodes in the csv match at least a portion of the cells in the dataset.

We look for the two columns that have the same prefix and end with _x and  _y , these will then be used as the coordinates to create the scatter plot.

Learn more about:

10x Genomics Space Ranger - Spatial Outputs

Import  clonotypes from VDJ Sequencing

You can view the clonotype and V(D)J genes with your single cell data on the platform, this can be for B-cell receptors (BCR) or T-cell receptors (TCR).

Steps

Step 1. At the top of the explorer page of your dataset, you will find a TCR/BCR option where you can upload a csv file with VDJ and clonotype data. Currently, we only support the upload of the file  filtered_contig_annotation.csv from 10x Genomics. See more on Cell Ranger vdj Annotations

Step 2. You can upload either or both TCR and BCR files to their corresponding dataset.

💡We use the data from the filtered_contig_annotation.csv file to create this table. This table shows details on the chain, V/D/J genes, CDR3 amino acid sequence, and number of 'cells' for a clonotype id.
Name The number shown under Name is the same from the raw_clonotype_id column. For example, clonotype24 will be 24
Chain The chain associated with this contig
V/D/J Name of the highest-scoring V/D/J segments
CDR3 The amino acid sequence of the predicted CDR3
'#' The number of 'cells' with this same clonotype id

Step 3. From the ‘Group by’ dropdown, you can find the top 15 of the most abundant clonotypes. You can also hover your mouse over the table to highlight the cells.

💡 Tip #1 - You can use the Stacked plot to see the percentage of cells for the top 15 most abundant clonotypes for each cluster or category of cells.
💡 Tip #2 - If you have cell types from your VDJ analysis, you can upload the data in a csv file if you have the cell index or barcodes and a cell type for each cell. See more on how you can import this data: [link to importing cell annotations]
Note: We understand that data from different technologies can be stored in vastly different formats. Please feel free to get in touch with our support team if you have any queries about uploading your data.

Yi Su

Bioinfomatician