Update Single Cell Sample Name
There are a number of situations where the sample name needs to be updated:
- When analyzing
- scATAC-Seq or scV(D)J-Seq with matched scRNA-Seq, data originating from the same sample must be annotated with the same sample name.
- spatial transcriptomics data, the Spatial Transcriptomics Plot and corresponding Expression Matrix/Dimensionality Reduction Plot must have the same sample name.
- Multiple samples may be multiplexed with a hashtag identifying the sample. The hashtags are first translated to Cell Annotations (
) (see Create Cell Annotations from Hashtags) and then the samples are demultiplexed using these annotations.
- When analyzing multiple samples produced using a Parse Biosciences kit. The matrix created by Demultiplex Parse Bio Samples can be used to update the sample for other elements, such as the Cell Annotations (
) containing QC metrics generated by QC for Single Cell.
Update Single Cell Sample Name can be used in such situations. It can be found at:
Tools | Single Cell Analysis () | Utility Tools (
) | Update Single Cell Sample Name (
)
The tool takes as input an element of one of the types below:
- Sequence List (
) that has been annotated with Annotate Single Cell Reads;
- Expression Matrix (
) / (
);
- Peak Count Matrix (
);
- Velocity Matrix (
);
- Cell Clusters (
);
- Cell Annotations (
);
- Cell Clonotypes (
) / (
);
- Spatial Transcriptomics Plot (
).
The output is a copy of the input where the sample name is updated.
The sample name can be provided in one of three ways (figure 18.2).
Figure 18.2: Options for updating the sample name.
Specify sample name
When the input contains only one sample, the sample name can be set as specified in the Sample name option. A combination of placeholders and text can be used to set the sample name. Hover the mouse cursor over the field to see a tooltip with several examples. Simultaneously pressing Shift and F1 displays all available placeholders. Different placeholders are available when the tool is run from the Tools menu or as part of a workflow.
From element
The sample name can be updated to that found in a second element provided in the Element option. The element can be of one of the types below:
- Sequence List (
) that has been annotated with Annotate Single Cell Reads;
- Expression Matrix (
) / (
);
- Peak Count Matrix (
);
- Velocity Matrix (
);
- Cell Clusters (
);
- Cell Annotations (
);
- Cell Clonotypes (
) / (
);
- Dot Plot (
);
- Violin Plot (
);
- Dimensionality Reduction Plot (
);
- Spatial Transcriptomics Plot (
).
The following options for how to Update the sample are available:
- All cells to one sample. The sample name for all input cells is set to the sample name found in the element. This requires that both the input and the element contain one sample each.
- Cells with matching barcodes. The sample name for the input cells is set to the sample name of the matching barcode found in the element. Only barcodes that are unique in both the input and element can be matched. Input cells with non-unique barcodes are handled according to Sample cannot be determined, see below.
As Sequence Lists (
) can only represent one sample, their sample name cannot be set using this option.
Using an input with one sample and an element containing multiple samples makes it possible to demultiplex the input into multiple samples.
From cell annotations
The sample name can be set from a category from a Cell Annotations () element, making it possible to demultiplex to multiple samples. For this, the input cells are matched with the cells from the Cell Annotations as follows:
- Cells with the same barcode that are unique in both the input and Cell Annotations are matched. Input cells with non-unique barcodes are handled according to Sample cannot be determined, see below.
- Cells with the same barcode and sample in both the input and Cell Annotations are matched. Input cells not found in the Cell Annotations are handled according to Sample cannot be determined, see below.
As Sequence Lists () can only represent one sample, their sample name cannot be set using Cell Annotations.
Sample cannot be determined
The following options are available for cells where the sample name cannot be determined:
- Use original sample name. The sample name in the output will be the same as in the input.
- Discard cell. The cells will not be part of the output.