merquaco.data_loss.FOVDropout.compare_codebook_fov_genes
- static FOVDropout.compare_codebook_fov_genes(fovs: DataFrame, codebook: DataFrame) DataFrame
Compares genes in FOVs and codebook dataframes and removes mismatched genes from consideration.
Genes missing from codebook are removed from FOVs dataframe, since they cannot be false positive corrected
- Parameters:
fovs (pd.DataFrame) – FOVs table
codebook (pd.DataFrame) – Codebook table
- Returns:
fovs – Updated FOVs table including only genes in the codebook
- Return type:
pd.DataFrame
- Raises:
UserWarning – If there are genes in the FOVs table that are not present in the codebook, or vice versa.