OMP
Coefficients
view_omp
Diagnostic to show omp coefficients of all genes in neighbourhood of spot. Only genes for which a significant number of pixels are non-zero will be plotted.
Requires access to nb.file_names.tile_dir
Parameters:
Name | Type | Description | Default |
---|---|---|---|
nb |
Notebook
|
Notebook containing experiment details. Must have run at least as far as |
required |
spot_no |
int
|
Spot of interest to be plotted. |
required |
method |
str
|
|
'omp'
|
im_size |
int
|
Radius of image to be plotted for each gene. |
8
|
Source code in coppafish/plot/omp/coefs.py
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 |
|
view_omp_fit
Diagnostic to run omp on a single pixel and see which genes fitted at which iteration. Right-clicking on a particular bled code will cause coppafish.plot.call_spots.dot_product.view_score to run, indicating how the dot product calculation for that iteration was performed.
Left-clicking on background image will cause coppafish.plot.call_spots.background.view_background to run, indicating how the dot product calculation for performed.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
nb |
Notebook
|
Notebook containing experiment details. Must have run at least as far as |
required |
spot_no |
int
|
Spot of interest to be plotted. |
required |
method |
str
|
|
'omp'
|
dp_thresh |
Optional[float]
|
If None, will use value in omp section of config file. |
None
|
max_genes |
Optional[int]
|
If None, will use value in omp section of config file. |
None
|
Source code in coppafish/plot/omp/coefs.py
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 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
|
get_coef_images
Gets image of \(yxz\) dimension (2*im_size[0]+1) x (2*im_size[1]+1) x (2*im_size[2]+1)
of the coefficients
fitted by omp for each gene.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
nb |
Notebook
|
Notebook containing experiment details. Must have run at least as far as |
required |
spot_no |
int
|
Spot of interest to get gene coefficient images for. |
required |
method |
str
|
|
required |
im_size |
List[int]
|
\(yxz\) radius of image to get for each gene. |
required |
Returns:
Type | Description |
---|---|
np.ndarray
|
|
List[float]
|
|
List[float]
|
|
Source code in coppafish/plot/omp/coefs.py
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 |
|
Score Shape
view_omp_score
Diagnostic to show how score is computed in the omp method Hatched region in top plot shows pixels which contribute to the final score. Score is actually equal to the absolute sum of the top plots in the hatched regions.
Can also see how score_omp_multiplier
affects the final score. The larger this is, the more
the positive pixels contribute compared to the negative.
Requires access to nb.file_names.tile_dir
Parameters:
Name | Type | Description | Default |
---|---|---|---|
nb |
Notebook
|
Notebook containing experiment details. Must have run at least as far as |
required |
spot_no |
int
|
Spot of interest to be plotted. |
required |
method |
str
|
|
'omp'
|
score_multiplier |
Optional[float]
|
Initial value of |
None
|
check |
bool
|
If |
False
|
Source code in coppafish/plot/omp/score_shape.py
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 |
|
Score Histogram
histogram_score
If method is anchor, this will show the histogram of nb.ref_spots.score
with the option to
view the histogram of the score computed using various other configurations of background
fitting
and gene_efficiency
. This allows one to see how the these affect the score.
If method
is omp, this will show the histogram of omp score, computed with
coppafish.call_spots.omp_spot_score
.
There will also be the option to view the histograms shown for the anchor method.
I.e. we compute the dot product score for the omp spots.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
nb |
Notebook
|
Notebook containing at least |
required |
method |
str
|
|
'omp'
|
score_omp_multiplier |
Optional[float]
|
Can specify the value of score_omp_multiplier to use to compute omp score.
If |
None
|
check |
bool
|
If |
False
|
hist_spacing |
float
|
Initial width of bin in histogram. |
0.001
|
show_plot |
bool
|
Whether to run |
True
|
Source code in coppafish/plot/omp/score_hist.py
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 |
|
histogram_2d_score
This plots the bivariate histogram to see the correlation between the omp spot score, \(\gamma_s\) and the dot product score \(\Delta_s\).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
nb |
Notebook
|
Notebook containing at least |
required |
score_omp_multiplier |
Optional[float]
|
Can specify the value of score_omp_multiplier to use to compute omp score.
If |
None
|
Source code in coppafish/plot/omp/score_hist.py
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 |
|
Track Fit
get_track_info(nb, spot_no, method, dp_thresh=None, max_genes=None)
This runs omp while tracking the residual at each stage.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
nb |
Notebook
|
Notebook containing experiment details. Must have run at least as far as |
required |
spot_no |
int
|
Spot of interest to get track_info for. |
required |
method |
str
|
|
required |
dp_thresh |
Optional[float]
|
If None, will use value in omp section of config file. |
None
|
max_genes |
Optional[int]
|
If None, will use value in omp section of config file. |
None
|
Returns:
Type | Description |
---|---|
dict
|
|
np.ndarray
|
|
float
|
|
Source code in coppafish/plot/omp/track_fit.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 |
|