akoyabio / phenoptrReports

Create analysis reports from inForm data.
https://akoyabio.github.io/phenoptrReports
zlib License
15 stars 7 forks source link

Include expression-based phenotype columns to count_within.txt and nearest_neighbors.txt #36

Closed ccoltharp-Akoya closed 4 years ago

ccoltharp-Akoya commented 4 years ago

We're missing a couple columns in 'count_within.txt' that we'd like to use for making a spatial plot using the Spatial Map Viewer. Our goal was to plot two phenotypes, but only those cells that are within 25 microns of the opposite phenotype. This would be pretty easy to do with the count_within.txt file if we had 'normal' phenotypes, but we were using two expression-based phenotypes (e.g. using Membrane PD1 (Opal 650) Mean>15.2 for PD1+). In the count_within.txt, we do see the proximity columns for how many PD1+ cells are near each cell. But, we can't tell the PD1 phenotype of each cell. The only phenotype columns listed are those where the column name starts with "Phenotype". Looks like 'nearest_neighbors.txt' is the same way.

If we input expression-based phenotypes to the Analysis app, could those phenotype columns be added to count_within.txt and nearest_neighbors.txt?

(slight tangent -- the expression we needed in order to plot the cells with a close-by PD1+ cell is ugly: ~`~\`Membrane PD1 (Opal 650) Mean\`>15.2 within 25`>0)

AB-Kent commented 4 years ago

That's a good idea. I didn't want to include all the columns from the cell seg data but including the columns needed for the phenotypes makes a lot of sense. If I copy the original column then the same expression can be used in the spatial map viewer.

ccoltharp-Akoya commented 4 years ago

Yep - that would work for me!

AB-Kent commented 4 years ago

Regarding your tangent -- agreed, the column names for the expression-based phenotypes are awkward. A couple of options:

I prefer the first option, I don't think the " is needed and it adds noise. What do you think?

ccoltharp-Akoya commented 4 years ago

Agree - the first option is fine with me.