mcmicro_to_scimap
Short Description
sm.pp.mcmicro_to_scimap
: The function allows users to directly import the output from mcmicro
into scimap
.
Function
mcmicro_to_scimap(feature_table_path, remove_dna=True, remove_string_from_name=None, log=True, drop_markers=None, random_sample=None, unique_CellId=True, CellId='CellID', split='X_centroid', custom_imageid=None, min_cells=None, verbose=True, output_dir=None)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
feature_table_path |
list of str
|
A list containing file paths to single-cell spatial feature tables. Each path corresponds to a unique image's feature table. |
required |
remove_dna |
bool
|
If set to |
True
|
remove_string_from_name |
str
|
Specifies a substring to be removed from all channel names, aiding in the normalization of marker names across datasets. |
None
|
log |
bool
|
If |
True
|
drop_markers |
list of str
|
A list of marker names to exclude from the analysis. For example, to remove specific markers, you would list them here: ["CD3D", "CD20"]. |
None
|
random_sample |
int
|
Specifies the number of cells to include in a subsampled dataset. This parameter is used for downsampling to a specified cell count. |
None
|
CellId |
str
|
The name of the column in the input data that contains cell identifiers. This is used to track individual cells across analyses. |
'CellID'
|
unique_CellId |
bool
|
Determines whether to automatically generate a unique identifier for each cell by combining the |
True
|
split |
str
|
The name of the column that demarcates the boundary between quantitative marker data and additional metadata in the input CSV. Specifying this column allows for the separation of data into counts and metadata components. |
'X_centroid'
|
custom_imageid |
str
|
Allows for the specification of a custom Image ID for each dataset. By default, the Image ID is derived from the name of the input CSV file. |
None
|
min_cells |
int
|
Sets a threshold for the minimum number of cells required for an image to be included in the analysis. Images with fewer cells than this number are excluded. This is useful for filtering out datasets with sparse cellular data. |
None
|
verbose |
bool
|
If set to |
True
|
output_dir |
str
|
The file path to the directory where output files will be saved. This parameter specifies the destination for any generated files. |
None
|
Returns:
Type | Description |
---|---|
AnnData Object (anndata): An annotated data object containing the processed single-cell spatial features, ready for downstream analysis. |
Example
1 2 3 4 |
|
Source code in scimap/preprocessing/mcmicro_to_scimap.py
22 23 24 25 26 27 28 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 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
|