单细胞行数据集
SingleCellRowDataset
基类:SingleCellRowDatasetCore
, Dataset
ann 数据帧(具有备用数组格式的 hdf5 文件)中的一行。
源代码在 bionemo/scdl/api/single_cell_row_dataset.py
中
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
|
load(data_path)
abstractmethod
从数据路径加载数据。
调用 len 和 getitem 在调用此方法后必须有效。
源代码在 bionemo/scdl/api/single_cell_row_dataset.py
中
93 94 95 96 97 98 99 100 |
|
save(data_path)
abstractmethod
将类保存到数据路径的存档中。
源代码在 bionemo/scdl/api/single_cell_row_dataset.py
中
102 103 104 105 |
|
SingleCellRowDatasetCore
基类:ABC
实现实际的类似 ann 数据的接口。
源代码在 bionemo/scdl/api/single_cell_row_dataset.py
中
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
|
load_h5ad(h5ad_path)
abstractmethod
加载 H5AD 文件并将其转换为后备表示形式。
调用 len 和 getitem 在调用此方法后必须有效。
源代码在 bionemo/scdl/api/single_cell_row_dataset.py
中
32 33 34 35 36 37 38 39 |
|
number_nonzero_values()
abstractmethod
返回数据中非零值的数量。
源代码在 bionemo/scdl/api/single_cell_row_dataset.py
中
41 42 43 44 |
|
number_of_rows()
abstractmethod
返回数据中的行数。
源代码在 bionemo/scdl/api/single_cell_row_dataset.py
中
51 52 53 54 |
|
number_of_values()
abstractmethod
返回数据中值的总数。
源代码在 bionemo/scdl/api/single_cell_row_dataset.py
中
46 47 48 49 |
|
shape()
abstractmethod
返回对象的形状,该形状可能是参差不齐的。
参差不齐的数据集是指每行的特征数量和维度可能不同的数据集。
源代码在 bionemo/scdl/api/single_cell_row_dataset.py
中
56 57 58 59 60 61 62 63 |
|
sparsity()
返回底层数据的稀疏性。
稀疏性定义为数据中零值的比例。它在 [0, 1.0] 范围内。如果没有值,则稀疏性定义为 0.0。
源代码在 bionemo/scdl/api/single_cell_row_dataset.py
中
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
|
version()
abstractmethod
返回版本号。
(遵循
源代码在 bionemo/scdl/api/single_cell_row_dataset.py
中
81 82 83 84 85 86 87 |
|