f-hamidlab / nuclearpy

MIT License
0 stars 0 forks source link

Normalized intensity of other channels #14

Closed Marcel-Salier closed 2 years ago

Marcel-Salier commented 2 years ago

Dapi normalization now is ready. I got 40 bins and 0.6 of the cells around the mode. After that we have to normalize the other channels we need the same to see where the mode is sitting in a violin plot to select the adequate bins. Not sure if the plot we haver right now comes before or after that. Ideally we should have both to corroborate the changes.

Marcel-Salier commented 2 years ago

And we have to see the 3 channels at the same time to add the same # bins that will fit for the best mode.

fursham-h commented 2 years ago

You can add a line in the notebook to plot all the 3 channels using the function:

obj.plotVarDist(["avg_intensity_rfp", "avg_intensity_beta3", "avg_intensity_ngn"], 
                data_type = "norm", log=False)

To see how the normalization improved the dataset, toggle data_type between "norm" and "raw" . You can also set log to True to get a log-scaled y-axis

fursham-h commented 2 years ago

Please pull the latest version

Marcel-Salier commented 2 years ago

I pulled. What is the no numbers in LaminB1 after the filtration? Also at this time of selection will be the moment to look into the cells for each group.

Marcel-Salier commented 2 years ago
image

GFAP is not normalising correctly, I think we need to discuss this in person.

fursham-h commented 2 years ago

Found a line written by Emilio:

if "avg_intensity" in col and not any(l in col.lower() for l in ["dapi", "gfap", "olig2"]):

which basically skips normalisation for whole-cell ICC. I have removed this, so try the normalisation again

fursham-h commented 2 years ago

@Marcel-Salier did this solve the normalization problem?

Marcel-Salier commented 2 years ago

I'm seeing the same. We should have to have exactly the same procedure than with DAPI. We make sure the Mode is in the right place using the right bins and then apply normalization.

fursham-h commented 2 years ago

Okay, we gotta sit down and look at the before and after normalisation. I will read through the code again

fursham-h commented 2 years ago

We now have one function nornChannel that performs normalization on a specified channel