Hi Anna,
Currently, the extend_formula_ncem function (referenced below) computes a list of coef_couplings:
coef_couplings = [f"{PREFIX_INDEX}{x}:{PREFIX_NEIGHBOR}{y}" for y in cell_types for x in cell_types]
For my cell types, this list looks like:
['index_AcinarCells:neighbor_AcinarCells', 'index_AcinarCells:neighbor_B', 'index_AcinarCells:neighbor_Basal', ...]
However, the get_dmats_from_deconvoluted generates a different list of coefficients. When I inspect dmats[x].design_info.column_names, I instead see
['index_AcinarCells[False]:neighbor_AcinarCells', 'index_AcinarCells[True]:neighbor_AcinarCells', 'index_AcinarCells[False]:neighbor_B', 'index_AcinarCells[True]:neighbor_B', ...]
Note the addition of [False] and [True]. The fact that these lists are different leads to problems when we run test_deconvoluted.
I think this issue can be fixed by updating the extend_formula_ncem function. I'll take a look at it and let you know when I have a solution.
|
coef_couplings = [f"{PREFIX_INDEX}{x}:{PREFIX_NEIGHBOR}{y}" for y in cell_types for x in cell_types] |
Hi Anna,
Currently, the
extend_formula_ncemfunction (referenced below) computes a list of coef_couplings:For my cell types, this list looks like:
However, the
get_dmats_from_deconvolutedgenerates a different list of coefficients. When I inspectdmats[x].design_info.column_names, I instead seeNote the addition of [False] and [True]. The fact that these lists are different leads to problems when we run
test_deconvoluted.I think this issue can be fixed by updating the
extend_formula_ncemfunction. I'll take a look at it and let you know when I have a solution.ncem/ncem/tl/fit/backend/design_matrix.py
Line 64 in 216fd57