QI2lab / merfish3d-analysis

3D MERFISH data processing
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Implement Moffitt iterative normalization reweighting #20

Closed dpshepherd closed 4 months ago

dpshepherd commented 4 months ago

To identify the proper intensity weightings between each of the images that form each of the 30-bits in our barcodes, we selected 25 FOV at random, used the 90% quantile of pixel intensities to initialize a weighting factor for each image, and then decoded the RNAs found within the selected FOVs as described below. With identified RNAs in these FOVs, we averaged the observed intensity in the corresponding image for all RNAs that have a ‘1’ in that bit of their barcode. These averages provided an estimate of the signal associated with a ‘1’ in each of the different bits, and, in the ideal weighting, this brightness would be the same for all bits. As these averages were not equal, we adjusted the weighting of each image to reflect its deviation from equality and iterated this process for a total of 10 times to identify the optimal image intensity weighting.

Once this optimal weighting was selected, we decoded all FOVs by finding the predicted intensity profile for each barcode that was nearest (via a Euclidean metric) to the weighted intensity vector observed for each pixel across all images. We discarded pixels for which the distance between the intensity vector of that pixel and the predicted intensity profile of the nearest barcode was larger than the distance corresponding to any single-bit flip. Adjacent pixels assigned to the same barcode were then assigned to the same RNA. Individual z-planes in each z-stack were decoded separately. All identified RNAs were then filtered to remove spurious signals based on the total number of pixels assigned to each RNA (which was selected to be greater than 2) and the average normalized brightness across all rounds. The final RNAs and their associated metadata were then exported for subsequent analysis.

From https://www.sciencedirect.com/science/article/pii/S009286742400254X?via%3Dihub#sec5

dpshepherd commented 4 months ago

Completed via cc809d3