Open cartal opened 5 years ago
Was this ever resolved?
Yes, I'm also wondering how you get the coefficients for multiple factor levels of a covariate? If you have 4 clusters, how do you get the beta for each of the clusters? And what about interaction terms like ~ leiden:treatment
I am facing similar problem. I am testing multiple groups like this:
dmat, coefs = de.utils.design_matrix(adata, formula='~1 + time + group + time:group')
# select only the interactions
coef_to_test = coefs[6:]
test = de.test.wald(
data = adata
formula_loc= '~1 + time + group + time:group',
coef_to_test = coef_to_test,
)
test.summary()
gives a DataFrame
with genes that are selected for all those coefficients, while I wanted genes for each of them. So far, the only thing I could do is to test each coefficient separately
test = de.test.wald(
data = adata
formula_loc= '~1 + time + group + time:group',
coef_to_test = coef_to_test[x],
)
where x
changes in a loop.
Hi,
I'm trying to use
diffxpy
with an AnnData object that has been clustered using the Leiden algorithm.When I run the following command:
wilcox_test = de.test.wilcoxon(data = batches_bbknn, grouping = "leiden")
diffxpy_wilcox = wilcox_test.summary().iloc[:30000,:]
diffxpy_wilcox = diffxpy_wilcox[diffxpy_wilcox.log2fc > 1]
diffxpy_wilcox.head(10)
I get a nice table of markers, however I don't know which cluster is expressing which genes. Maybe I've missed this somewhere in the documentation, but do you know how to get this from the output?
Also, is there a way I can add multiple conditions to the model? Say I have
leiden
and I want to addpatient
and ignoresource
. Is this possible?Thank you!