stereo.utils.data_helper.merge¶
- stereo.utils.data_helper.merge(*data_list, reorganize_coordinate=False, horizontal_offset_additional=0, vertical_offset_additional=0, space_between='0', var_type='intersect', batch_tags=None)[source]¶
Merge several slices of data.
- Parameters:
data_list (
Union[StereoExpData,AnnBasedStereoExpData]) – several slices of data to be merged, at least two slices.reorganize_coordinate (
Union[bool,int]) –whether to reorganize the coordinates of the obs(cells), if set it to a number, like 2, the coordinates will be reorganized to 2 columns on coordinate system as below
data1 data2data3 data4data5 …… …if set to
False, the coordinates maybe overlap between slices.horizontal_offset_additional (
Union[int,float]) – the additional offset between each slice on horizontal direction while reorganizing coordinates.vertical_offset_additional (
Union[int,float]) – the additional offset between each slice on vertical direction while reorganizing coordinates.space_between (
Optional[str]) – the distance between each slice, like ‘10nm’, ‘1um’, …, it will be used for calculating the z-coordinate of each slice.var_type (
str) – how to merge the var(genes), ‘intersect’ or ‘union’, default ‘intersect’.
- Return type:
Union[StereoExpData,AnnBasedStereoExpData]- Returns:
A merged StereoExpData object.