diffxpy
diffxpy copied to clipboard
de.test.design_matrix(): allow no absortion of first factor level into offset
Relevant for constraint scenarios.
Requested by @LuckyMD
Is it just this?
dmat_cond = pat.dmatrix("condition", adata.obs, return_type='dataframe')
dmat_samp = pat.dmatrix("sample-1", adata.obs, return_type='dataframe')
dmat_chip = pat.dmatrix("chip-1", adata.obs, return_type='dataframe')
dmat = dmat_cond.join(dmat_samp).join(dmat_chip)
Yes @LuckyMD, this is how you would do it in patsy.