napari_ndev._plate_mapper
#
PlateMapper
#
A class for creating and manipulating plate maps.
Attributes:
-
plate_size
(int
) –The size of the plate (e.g., 96, 384).
-
wells
(dict
) –A dictionary mapping plate sizes to the number of rows and columns.
-
plate_map
(DataFrame
) –The plate map DataFrame with well labels.
-
plate_map_pivot
(DataFrame
) –The wide-formatted plate map DataFrame with treatments as columns.
Methods:
-
__init__
–Initializes a PlateMapper object.
-
create_empty_plate_map
–Creates an empty plate map DataFrame for a given plate size.
-
assign_treatments
–Assigns treatments to specific wells in a plate map.
-
get_pivoted_plate_map
–Pivots a plate map DataFrame to create a wide-formatted DataFrame with a single treatment as columns.
-
get_styled_plate_map
–Styles a plate map DataFrame with different background colors for each unique value.
Source code in src/napari_ndev/_plate_mapper.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 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 |
|
__init__
#
__init__(plate_size=96)
Initialize a PlateMapper object.
Parameters:
Source code in src/napari_ndev/_plate_mapper.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
|
assign_treatments
#
assign_treatments(treatments)
Assign treatments to specific wells in a plate map.
Parameters:
Returns:
-
DataFrame
–The updated plate map with treatments assigned to specific wells.
Source code in src/napari_ndev/_plate_mapper.py
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 |
|
create_empty_plate_map
#
create_empty_plate_map()
Create an empty plate map DataFrame for a given plate size.
Returns:
-
DataFrame
–The empty plate map DataFrame with well labels.
Source code in src/napari_ndev/_plate_mapper.py
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 |
|
get_pivoted_plate_map
#
get_pivoted_plate_map(treatment)
Pivot a plate map DataFrame to create a wide-formatted DataFrame with a single treatment as columns.
Parameters:
Returns:
-
DataFrame
–The wide-formatted plate map DataFrame with treatments as columns.
Source code in src/napari_ndev/_plate_mapper.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
|
get_styled_plate_map
#
get_styled_plate_map(treatment, palette='colorblind')
Style a plate map with background colors for each unique value.
Parameters:
-
treatment
#str
) –The column name of the treatment variable in the plate map DataFrame.
-
palette
#str or list
, default:'colorblind'
) –The color palette to use for styling. Defaults to 'colorblind'.
Returns:
-
Styler
–The styled plate map DataFrame with different background colors for each unique value.
Source code in src/napari_ndev/_plate_mapper.py
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 |
|