cellarium-ai / cellarium-ml

Distributed single-cell data analysis.
BSD 3-Clause "New" or "Revised" License
22 stars 3 forks source link

Use `measured_genes_mask` in `OnePassMeanVarStd` #212

Open ordabayevy opened 4 months ago

ordabayevy commented 4 months ago

Genes that were not measured should not contributed to the summary stats.

ordabayevy commented 3 days ago

Add a new measured_genes_mask_ng boolean argument to the forward method of OnePassMeanVarStd model. This argument tells which genes were measured in each cell. Then use this mask to update self.x_sums, self.x_squared_sums, and self.x_size only for genes that were measured.