YosefLab / Compass

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

normalization #110

Open shimasadri opened 1 month ago

shimasadri commented 1 month 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 1 month 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.