31 Editing meta data

Ryabhatta

31.1 Combine meta data

In cases where two meta data categories need to be analyzed simultaneously, it is possible to create a new meta data category in Ryabhatta using the Edit meta data panel. In this panel select Combine meta data button to initiate this process.

In the selection bar that opens, select two or more meta data categories to combine. Press the Merge meta button. This create a new category of meta data which is a linear combination of the two meta data categories for each cell. For example: If the initial meta data values for the individual cells were as follows:

Treatment TimePoint
Cell1 Drug1 0h
Cell2 Drug1 1h
Cell3 Drug2 0h
Cell4 Drug2 1h
Cell5 Control 0h
Cell6 Drug1 1h

selecting and merging Treatment and Timepoint will create a new meta data category Treatment_Timepoint. This will generate values for each cell as follows:

Treatment TimePoint Treatment_TimePoint
Cell1 Drug1 0h Drug1_0h
Cell2 Drug1 1h Drug1_1h
Cell3 Drug2 0h Drug2_0h
Cell4 Drug2 1h Drug2_1h
Cell5 Control 0h Control_0h
Cell6 Drug1 1h Drug1_1h

Note that the order of the meta data chosen is important as the values are combined in that order. Switching the order of the meta data from Treatment, TimePoint to TimePoint, Treatment will result in values that are correspondingly switched. In the example above values for Cell1 in the merged column (called TimePoint_Treatment) in the new meta data will be “0h_Drug1”

While the metadata is added to the Seurat object, it is not written to the disk. Save the Seurat object if the new meta data category needs to be used in future sessions.

31.2 Change meta data name

Sometimes meta data names might need to be changed. For example, if the meta data name is too long: “Incubated_Temperature_during_drug_treatment” it might be truncated in the plots or affect proper rendering of the plots. These names can be changed using the Rename meta data button.

Select the meta data category you wish to rename, provide a new name and press the Change meta name.

The values of the meta data category are copied to the new name without any change to the actual values. We have not provided the option to edit the values for individual cells as this might lead to typo errors that produce artificial categories or mislabel cells. Future versions of the app might have this capability based on demand.

31.3 Split on meta

A large Seurat object could be split into separate Seurat objects based on the values of a meta data category using the Create subset objects button.

This generate a prompt seeking confirmation on the number of Seurat objects that will created. Clicking on the Confirm button will generate new Seurat objects equal to unique values in the metadata category. For example if three unique values exists in the “Treament” meta data category with values “Drug1”, “Drug2”, “Control”, then three Seurat objects with the names “Drug1”, “Drug2”, “Control” will be created.

The new Seurat objects (subsets) can be accessed using the Start Panel.

The new Seurat objects are NOT saved to the disc automatically. Please use the Save all the files in Env button to save all of them as part of a single .RDS file or save individual files using the Save Current Seurat Object button to save the individual objects after selecting and loading them from the start panel.

While this feature is provided as a convenience feature to quickly generate a subset of the Seurat object, we recommend that the Seurat object is re-processed with Natian to repeat PCA analysis and Dimensionality reduction. This is important because dimensionality reduction methods such as UMAP and tSNE provide a relative projection of the cells among all of the other cells present in the sample. Therefore, it is possible that cell-to-cell differences within a cluster are not obvious when viewed next to other clusters. This artifact is carried over during the quick subset process. Repeating the dimensionality reduction step on the subset cells will provide a more informative dimensionality reduction plot and clusters.

Also, note that genes with 0 expression in all cells could be included in the subset Seurat object. This is because the larger Seurat object might have genes that are expressed in only a specific cluster or condition. These genes might possess 0 expression in the selected cluster or category. This can affect plotting steps in future and result in the app crashing. Also, it is possible that these genes result in unnecessary computation steps during differential expression analysis as they lead to inflated number of individual tests done. To avoid this issue use the Analyze Individual Clusters section to create a new Seurat object from a specific cluster or meta data category.