Closed lcolladotor closed 2 years ago
I started a script that exports the label assignments at https://github.com/LieberInstitute/Visium_IF_AD/blob/master/code/09_pathology_vs_BayesSpace/04_label_pathology_spots.R but we still need to find the neighbors https://github.com/LieberInstitute/Visium_IF_AD/blob/master/code/09_pathology_vs_BayesSpace/04_label_pathology_spots.R#L30.
I think that we'll be able to use BayesSpace:::.find_neighbors()
for this: https://github.com/edward130603/BayesSpace/blob/master/R/spatialCluster.R#L201-L252.
Sang Ho @shkwon17 talked about 5 domains:
We first need to define thresholds for Abeta+ and pTau+.
Here's an schematic of percent and number:
For the thresholds, we can look at plots like https://github.com/LieberInstitute/Visium_IF_AD/blob/master/plots/07_spot_qc/segmentation_distribution_Percent_Abeta.pdf and related ones.
Note that those plots include the 21 glare spots that we dropped later at https://github.com/LieberInstitute/Visium_IF_AD/blob/master/code/07_spot_qc/qc_metrics_and_segmentation.R#L312-L317. We could look at the location of the glare spots https://github.com/LieberInstitute/Visium_IF_AD/blob/master/code/07_spot_qc/qc_metrics_and_segmentation.R#L299-L310 and make a PDF for highlighting them, or remake the boxplots with the "postqc" SPE data (aka, re-run https://github.com/LieberInstitute/Visium_IF_AD/blob/master/code/07_spot_qc/qc_metrics_and_segmentation.R#L238-L251 and save into new PDFs).
Thinking about the above, it seems like we have way more than 21 outliers in the boxplots, so checking the glare spots in detail might be less relevant.
Hmm, we could start with 2x2 tables looking at the number of spots with n > 0 Abeta vs the number of spots with % > 0.01 Abeta (and something similar for pTau, then maybe pTau vs Abeta). Basically, are the spots that are outliers in the % also outliers in the number (n)?
We are doing EDA (Exploratory Data Analysis) with this info =)