YosefLab / Compass

In-Silico Modeling of Metabolic Heterogeneity using Single-Cell Transcriptomes
BSD 3-Clause "New" or "Revised" License
97 stars 28 forks source link

normalization #110

Open shimasadri opened 4 months ago

shimasadri commented 4 months ago

I tried the following normalization in python sc.pp.normalize_total(adata) sc.pp.scale(adata, max_value=1e4)

but when I run compass I get the following warning message RuntimeWarning: invalid value encountered in log2 result = getattr(ufunc, method)(*inputs, **kwargs)

How can I modify the normalization (in pyhton) to solve this?

Thank you

DPLemonade commented 3 months ago

Hi @shimasadri! COMPASS expects normalized counts as input so running sc.pp.normalize_total(adata) should already be fine (assuming that adata contains raw counts). Also note that COMPASS expects linear-scale data instead of log-transformed data.