theislab / diffxpy

Differential expression analysis for single-cell RNA-seq data.
https://diffxpy.rtfd.io
BSD 3-Clause "New" or "Revised" License
191 stars 23 forks source link

Accessor method for getting all coefficients from Wald tests #151

Open gokceneraslan opened 4 years ago

gokceneraslan commented 4 years ago

Hey David,

Is there an easy way to get all coefficients individually here:

https://nbviewer.jupyter.org/github/theislab/diffxpy_tutorials/blob/master/diffxpy_tutorials/test/introduction_differential_testing.ipynb#Test-selected-coefficients

Is the reason of getting only one coef just technical e.g. code structure or related to the nature of Wald test (which I don't know much about)?

Cheers.

gokceneraslan commented 4 years ago

or in other words why are the coefs not shown in the summary here https://github.com/theislab/diffxpy/blob/master/diffxpy/testing/det.py#L832

gokceneraslan commented 4 years ago

ok, I managed to get them:

pd.DataFrame(test.theta_mle,
             index = np.array(coefs)[test.coef_loc_totest.tolist()],
             columns=test.gene_ids).T

but it'd be great to have either a separate function doing that or a way to show them in summary().

davidsebfischer commented 4 years ago

Hi @gokceneraslan, yes, i can add an accessor function! I tried to keep summary streamlined independent of the size and type of the model so I didnt add the individual parameter estimates in there, a separate accessor is a good idea! Thanks!