sakura.dataset.rna_count_sparse.SCRNASeqCountDataSparse.collate_fn

SCRNASeqCountDataSparse.collate_fn(batch)

Assemble individual data sample from a batch of samples.

This function processes each sample in the batch, assemble individual item keys into a list,

and export the data of the samples according to item key list indexing.

Parameters:

batch (list[dict[str, Any]]) – A list of samples, where each sample is a dictionary containing data of one ‘item’ key.

Returns:

A dictionary containing data of the specified list of items from the dataset

Return type:

dict[str, Any]