the of this cell type was set to zero for all genes except hbb - bt, hbb - bs, hba - a1, hba - a2 for mouse and hbb, hba1, hba2 for human, which were modelled as free parameters. - similarly, the expression of complement factors ( c3, c2, c4b / c4b ) within hepatocytes was modelled as free parameters. - a capture bias per gene, which corrects for technical and biological differences between spatial and sc / sn - rna - seq. the capture bias was modelled as a latent variable with prior source paper: pmc8809252 - a red blood cell cell type, which was not included in the reference dataset but nonetheless had a dominant presence in the spatial data. the of this cell type was set to zero for all genes except hbb - bt, hbb - bs, hba - a1, hba - a2 for mouse and hbb, hba1, hba2 for human, which were modelled as free parameters. - similarly, the expression of complement factors ( c3, c2, c4b / c4b ) within hepatocytes was modelled as free parameters. a background signal shared for all spots was also modelled as follows: source paper: pmc8809252 with a latent variable specific to each spot and a latent variable specific to each gene. a likelihood ratio test was used to assess whether a cell type was significantly present in a spot. specifically, if is the gene expression of all genes at a particular spot, we used monte carlo samples from the posterior to estimate: p ( x | ν c e l l t y p e ) p ( x | ν c e l l t y p e = 0 ) source paper: pmc8809252 a cell type was deemed significantly present if the log - likelihood was higher than 10. the zonation of spots was modelled as a univariate latent variable specific to each spot. this latent variable influenced the gene expression using a spline function by using a gaussian basis function ( ) with 10 knots at uniform fixed positions. the coefficients of this spline were modelled as a latent variable specific for each gene, with prior a gaussian random walk distribution, and the step. was determined empirically as 2 times the standard deviation of the log1p transformed expression values in the whole dataset. the variational parameters of the zonation and were not optimized directly but were estimated using an amortization function. this amortization function used the count matrix as input, and estimated the variational parameters using the following layers: linear ( with 100 output dimensions ), batchnorm, relu, linear ( again with 100 output dimensions ), relu, and a final linear layer. this amortization function was used to transfer the zonation onto a different dataset, i. e., 1 ) to transfer the zonation trained on mouse spatial transcriptomics onto mouse visium highly multiplexed protein and 2 ) to transfer the zonation trained on human low steatosis ( < 10 % ) onto human high steatosis ( > 30 % ). to determine the differential abundance of a cell type across zonation, the significant presence of a cell type within a spot was modelled using a spline function with the zonation of a cell type as input. the coefficients of this spline function were modelled as a latent variable with the step size. to determine differences in abundance between patients with high and low steatosis, we first modelled the zonation on human data on patients with steatosis < 10 %. potential interaction effects between zonation and steatosis status were then modelled using a spline function as before, but with a separate set of coefficients for both high and low steatosis. a likelihood ratio test was then used to determine whether this interaction was present significantly, by comparing the likelihood of this model with a model with shared coefficients. to analyze cell - cell communication in the hepatic mac niches, we applied differential nichenet, which is an extension of the default nichenet pipeline to compare cell - cell interactions between different niches and better predict niche - specific ligand - receptor ( l - r ) pairs. it uses a flexible prioritization scheme that allows ranking l - r pairs according to several properties, such as niche - and region - specific expression of the l - r pair, ligand activity, and level of database curation. this in contrast to the default nichenet pipeline which prioritizes expressed l - r pairs solely based on ligand activity predictions. all analyses were conducted according to the differential nichenet tutorial ( https: / / github. com / saeyslab / nichenetr / blob / master / vignettes / differential _ nichenet. md ). as input to the differential nichenet pipeline, we used the data after normalization via sctransform and integration of scrna - seq and snrna - seq according to the seurat procedure for integration ( stuart et al., 2019 ). for the mouse analyses, differential nichenet was first performed for the following 3 niche comparisons: 1 ) kcs versus central vein macs; 2 ) kcs versus capsule macs; 3 ) kcs versus lams. following sender cell types were considered for these niches: kc niche: periportal hepatocytes, periportal lsecs, and periportal stellate cells; central vein mac niche: central vein ecs and central vein fibroblasts; capsule mac niche: mesothelial cells and capsule fibroblasts; lam niche: cholangio cytes and bile duct fibroblasts. because of the preferentially periportal localization of kcs in the mouse liver, we also included a ‘ region specificity ' factor in the differential nichenet prioritization framework. this was done to increase the ranking of ligands that are more strongly expressed in periportal than pericentral niche cells. periportal sender cells were determined after subclustering based on the following markers: hal and sds for hepatocytes; mecom, msr1, and efnb2 for lsecs; ngfr, igfbp3, and dach1 for stellate cells. in the heatmap ( figure s8 g ), we show the prioritization scores of the top 40 ligands ( and their highest scoring receptor ) in the kc niche ( score averaged over the 3 analyses ), and of all the non - kc niche l - r pairs with a prioritization score ≥ the score of the lowest scoring kc l - r pair of this top 40. for each l - r pair / niche combination, we only displayed the score of the sender cell with the highest score ( e. g. for the csf1 - csf1r interaction in the kc niche, the score is shown for the lsec - kc interaction because that score was higher than for stellate – kc and hepatocyte – kc; in the lam niche, the score of csf1 - csf1r is shown for the bile duct fibroblast – lam interaction and not for the cholangio cyte – lam interaction, etc. ). because of the strong concordance between the top - ranked l - r pairs in these 3 non - kc mac niches, it was decided to also conduct a subsequent analysis in which the kc niche is compared against all non - kc hepatic mac niches combined. for this final ‘ kc versus all non - kc mac analysis ’, kcs were compared to central vein macs, capsule macs, and lams together, with the same sender cell types as described here above ( but now analyzed together ). for the human analyses, differential nichenet was performed to compare the kc niche with the non - kc mac niches ( similarly as the final analysis in mouse ). for the kc niche, all hepatocytes, lsecs, and stellate cells were selected as sender cells; and kcs as receiver cells. for the non - kc mac niche, cholangio cytes, fibroblasts, and central vein ecs were considered as the sender cells; mat. lams, imm. lams, and mac1s as the receiver cells ( figure 4 h ). to find kc - niche - specific l - r pairs that are conserved across mouse and human, the individual mouse and human prioritization scores were averaged to form a ‘ conservation score ’. the 40 ligands ( and maximally 3 of their highest scoring receptors ) with the highest conservation score were selected for further analysis ( note: the l - r pair should be expressed by the same sender - receiver pair in both species ). in the circos plot ( figure 6 c; gu et al., 2014 ), only a subset of these top l - r pairs is shown to keep the figure clearly interpretable.