DE using t-test overest var producing many non DE genes


I’m getting a lot of non-DE genes after I do “t-test overest var” between clusters. Same happens with wilcoxon. I did this on an anndata object that I scaled after mnn_correct and clustering.

## Scale raw mtx 
b = sc.AnnData(X = corr_data.raw.X, var = corr_data.raw.var, 
               obs = corr_data.obs)
# If False, omit zero-centering variables, which allows to handle 
# sparse input efficiently.
sc.pp.scale(b, max_value = 10, zero_center = False)
bdata = corr_data.copy()
del bdata.raw
bdata.raw = b

In Seurat there’s parameters that allow a parameter to exclude genes that don’t meet extra criteria, so to get rid of these streaks that occur across the heatmap. I haven’t tried this function yet but is this the function I should use to try doing the same?

This is discussed here: Why max_out_group_fraction in set to 0.5

This is me mostly talking out loud I guess (apologies) but would like to get someone’s thoughts on this. Also, I previously had an error message saying:

/Users/cahanlab/anaconda3/envs/pyEnv2/lib/python3.6/site-packages/scanpy/tools/ RuntimeWarning: invalid value encountered in log2

I set zero_center = False and that went away. Not sure of the ramifications of this but I do have a sparse matrix and it said it would speed it up so I thought it wouldn’t be that bad. Can someone elaborate on this?