Data is published in Qian X, et al. - A spatial atlas of inhibitory cell types in mouse hippocampus and available at figshare.com.
Create directories:
mkdir -p data output_dapi output_no_dapiAnd either download raw data and pre-process it, or download already pre-processed data in the compatible format.
In this example we used "3-3" section. So, you need to download "pciSeq_3-3_right.mat" file ("pciSeq_3-3_left.mat" works as well, because they have the same set of molecules) and the corresponding DAPI ("DAPI_3-3.jpg"). To convert .mat file to the compatible csv format, you need to define ISS class (download the file and run run("iss.m") inside your MATLAB session. After that, run the following code:
load("pciSeq_3-3_right.mat")
y = o.SpotGlobalYX(:, 1);
x = o.SpotGlobalYX(:, 2);
gene = o.GeneNames(o.SpotCodeNo);
is_combinatorial = o.SpotCombi;
intensity = o.SpotIntensity;
score = o.SpotScore;
T = table(x, y, gene, is_combinatorial, intensity, score);
writetable(T, "pciSeq_3-3.csv");Afterwards, to obtain segmentation from the DAPI, we ran Watershed segmentation using ImageJ:
- Open DAPI_3-3.jpg image
- Run Process -> Filters -> Gaussian Blur, using Sigma = 1.0
- Run Image -> Adjust -> Auto Threshold, using Method = Mean
- Run Process -> Binary -> Watershed
- Save the image in the .tif format using name "DAPI_3-3_mask.tif"
wget -P data http://pklab.med.harvard.edu/viktor/baysor/iss/DAPI_3-3_mask.tif
wget -P data http://pklab.med.harvard.edu/viktor/baysor/iss/pciSeq_3-3.csvbaysor run --iters 500 --scale 6.5 --plot -c ../../configs/iss.toml -o ./output_no_dapi ./data/pciSeq_3-3.csvbaysor run --iters 500 --plot -c ../../configs/iss.toml -o ./output_dapi ./data/pciSeq_3-3.csv ./data/DAPI_3-3_mask.tif